首页 > > 详细

代写CSCI111 Employee调试C/C++程序、C/C++实验代写

代写C++基础作业,根据UML图完成相应的Class.

Requirement

Consider the class hierarchy shown in this figure:

  1. Create the super abstract class “Employee” that has the following instance variables, constructor, and methods( you may need to add more methods):
    • a) name
    • b) date_of_birth
    • c) starting_date
    • d) ssn
    • e) phone_number
    • f) Constructor
    • g) set/get methods
    • h) toString method
  2. Create the sub class “Hourly_Based_Employee” that is derived from the super class
    “Employee” and has the following instance variables, constructor, and methods:
    • a) name
    • b) date_of_birth
    • c) starting_date
    • d) ssn
    • e) phone_number
    • f) per_Hour
    • g) hours
    • h) Constructor
    • i) set/get methods
    • j) compute_Salary that is based on the hours* per_hour
    • k) toString method
  3. Create the sub class “Salary_Based_Employee” that is derived from the super class
    “Employee” and has the following instance variables, constructor, and methods:
    • a) name
    • b) date_of_birth
    • c) starting_date
    • d) ssn
    • e) phone_number
    • f) salary
    • g) Constructor
    • h) set/get methods
    • i) compute_salary that is based on his salary
    • j) toString method
    • k)
  4. Create the sub class “Manager_Employee” that is derived from the class
    “Salary_Based_Employee” and has the following instance variables, constructor, and methods:
    • a) name
    • b) date_of_birth
    • c) starting_date
    • d) ssn
    • e) phone_number
    • f) salary
    • g) bonus
    • h) Constructor
    • i) set/get methods
    • j) compute_salary that is based on his salary and bonus
    • k) toString method
  5. Create the “Testing” class that has the main method and does the following:
    • a) Are you able to create an object of Employee class?
    • b) Use the constructor to create object of Hourly_Based_Employee class.
    • c) Use the constructor to create object of Salary_Based_Employee class.
    • d) Use the constructor to create object of Manager_Employee class.
    • e) Define three elements array of “Employee”.
    • f) Let each element in the array refer to objects created in b, c, and d
    • g) Call compute_salary and toString using objects created in b, c, and d
    • h) Call compute_salary and toString using array elements defined in f. You need to design the abstract class in a way that allow you to call this method.
    • i) What is the difference between results obtained from g and h.
联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp
热点文章
程序代写更多图片

联系我们 - QQ: 99515681 微信:codinghelp
© 2014 www.7daixie.com
程序代写网!