الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

المساعدة يامبرمجي oop

مغلق
بدأه Anwar Ahmed في 1 أبريل 2007 · 2 رد · 608 مشاهدة · في الأسئلة المجابة
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

Write an OO-based program that will make use of two classes in creating

composed objects.

The first class is the Customer class that is to contain the following:

• Function to print the customer’s data.

• Function to calculate the total cost for the customer.

• Objects made of this class will contain a

o Customer name

o Customer phone number and

o Array of three pointers to objects of type Call.

• Use a friend functions bubble-sort to sort data by cost.

• Use a static data member to keep track of the total revenues based

on all customers. The accumulated cost of all the customers will be

the total revenues made by the company.

The other class is the Call class to represent the data for one call. It is to

contain the following:

• Overload the "<<" to print the objects of type Call.

• Three data elements

o Country

o Number called and

o Cost of call.

You may add other functions to the above classes as you see fit. Use

gets and set conventions. Include proper constructors and

destructors.

The program is to:

1. Received three strings as input. Each string contains one

customer’s data in the following format (see example at end):

“Customer-name his-number country called number cost country

called number cost country called number cost”.

a. You may assume three customers, one call per country and

three calls per customer.

b. Use the input data and output format provided at the end of

the assignment for the final run.

2. Calculate and print total cost of the calls for each customer.

3. Calculate and print the total revenues from all the customers.

4. Print the calls of each customer sorted by cost in ascending order.

5. Use Dynamic allocation /de-allocation of memory where possible.

#2

يا اخوي تبينا نحل لك الواجب ؟

حط حلك واذا فيه غلط بنساعدك اذا حلينا عنك ذا تبي تجي تطلب حل الثاني والثالث

#3

طلب ل المشرفين ارجو منع اي مشاركه بهذة الصورة

لانه بعد فترة بيصبح المنتدي ل حل الواجبات

هذا الموضوع مغلق.

مواضيع مشابهة