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

السؤال

نشر

Develop a simple Payroll application for a company, there are three kinds of employees in the system: salaried employee, hourly employee, and commissioned employee. The system should take input as an array containing employee objects, calculate salary polymorphically (according to employee object), and generates report. In the SalariedEmp, salary is the salary – (salary * taxRate). In HourlyEmp, salary is (hours*hourlyRate) – (hours * hourlyRate * taxRate). In CommEmp, salary is (sales * commRate) – (sales * commRate * taxRate). Write a main() program to test the employee classes by creating array of pointer (size 3). Each pointer should be dynamically allocated to SalariedEmp, HourlyEmp and CommEmp respectively. Then, displaying the  data  (name and salary) using public method.

ااا.png

Recommended Posts

  • 0
نشر

مرحبا ليلي
الرجاء التوضيح ما هي لغة البرمجة التي سوف تستخدم في كتابة البرنامج المطلوب؟

  • 0
نشر

 

بتاريخ منذ ساعة مضت قال Nabil Tayeh:

مرحبا ليلي
الرجاء التوضيح ما هي لغة البرمجة التي سوف تستخدم في كتابة البرنامج المطلوب؟

oop بc++

انضم إلى النقاش

يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.

زائر
أجب على هذا السؤال...

×   لقد أضفت محتوى بخط أو تنسيق مختلف.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   جرى استعادة المحتوى السابق..   امسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

  • إعلانات

  • تابعنا على



×
×
  • أضف...