- تاريخ التسجيل
- 9 سبتمبر 2009
- المشاركات
- 10,976
- المجموعة
- أنثى
- الدفعة الدراسية
- 2009
- الكلية
- كلية تقنية المعلومات
- التخصص
- computer engineering
اختي تقصدين هذا السؤال ؟؟؟
1. Write a definition of a class Named MenuType for a restaurant. The class includes:
* As private member's data:
1. ItemName(string)// Name of the Item
2. ItemPrice(float)//Price of the Item
3. ItemType(string) // offered for("Breakfast", "Lunch" or "Dinner")
* As public member's functions:
1) SetItem which set data for all data members of the object(ItemName, ItemPrice and ItemType).
2) GetItem which will return all data members of the object(ItemName, ItemPrice and ItemType).
3) IncreasePrice which adds an amount to the ItemPrice of the object.
4) showMenu that output data members of the object(ItemName, ItemPrice and ItemType) in one line.
2. Write the code to implementation the above member functions of the class MenuType.
3. Write a main function to test the class MenuType.
1) Define an object plate1 of Type class MenuType.
2) Set the object plate1 with the values: "Plan Egg" 5.2 "Breakfast"
3) Write one statement to increase the price of plate1 by 1.2BD
4) Write one statement to output the plate1.
-----------------
اذا هذا هو النهاية الي يطلع لش فيه ايرور ما يحتاج تسوينه و في فنكشن زيادة بعد مسويتنها انتين
1. Write a definition of a class Named MenuType for a restaurant. The class includes:
* As private member's data:
1. ItemName(string)// Name of the Item
2. ItemPrice(float)//Price of the Item
3. ItemType(string) // offered for("Breakfast", "Lunch" or "Dinner")
* As public member's functions:
1) SetItem which set data for all data members of the object(ItemName, ItemPrice and ItemType).
2) GetItem which will return all data members of the object(ItemName, ItemPrice and ItemType).
3) IncreasePrice which adds an amount to the ItemPrice of the object.
4) showMenu that output data members of the object(ItemName, ItemPrice and ItemType) in one line.
2. Write the code to implementation the above member functions of the class MenuType.
3. Write a main function to test the class MenuType.
1) Define an object plate1 of Type class MenuType.
2) Set the object plate1 with the values: "Plan Egg" 5.2 "Breakfast"
3) Write one statement to increase the price of plate1 by 1.2BD
4) Write one statement to output the plate1.
-----------------
اذا هذا هو النهاية الي يطلع لش فيه ايرور ما يحتاج تسوينه و في فنكشن زيادة بعد مسويتنها انتين
آسفة بس توني منتبهة ان المفروض ما يكون في باراميترز
الكول بشرحه الاثنين لأن ما كملناه

ثاانكس