اذهب إلى المحتوى

بسمة امل2

الأعضاء
  • المساهمات

    3
  • تاريخ الانضمام

  • تاريخ آخر زيارة

آخر الزوار

لوحة آخر الزوار معطلة ولن تظهر للأعضاء

إنجازات بسمة امل2

عضو مبتدئ

عضو مبتدئ (1/3)

1

السمعة بالموقع

  1. اشكرك بارك الله بيك وبكل من يساهم في مساعدة الاخرين وبكل من ساهم في عمل هذا الموقع الرائع اشكرك استاذ مصطفى على جهدك المبذول وبارك الله بيك وجزاك خير الجزاء
  2. السلام عليكم ياريت تساعدوني بحل هذا السؤال Create a C++ class called employee that stores the name (a string) and number (type int) of an employee. From this class derive two classes: manager, which adds a tilte (type string); and scientist, which adds a number of publications (type int). Each of the three classes should have a getdata function (method) to get its data from the user at the keyboard, and a putdata function to display the data. Add a member function of type bool called isOverweight to the manager and scientist classes. Let’s say that an employee with more than 90kg is considered overweight. You can access this function from main() and display the string “Overweight” for overweighted managers and scientists when you display their other data. If manager and scientist objects are to be accessed using pointers to them that are stored in an array of type employee, what do you need to add to the employee base class? Can you instantiate members of this base class? Create a C++ program and instances of manager and scientist classes and call their methods. Then, create pointers of manager and scientist classes and store them in an array of type employee and call the isOverweight method.
×
×
  • أضف...