Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Q2 Answer Q2(a)-Q2(f) based on Figure Q2. Employee Programmer Promoter FIGURE Q2 (a) Create a class named Employee having the private attributes of name, address,
Q2 Answer Q2(a)-Q2(f) based on Figure Q2. Employee Programmer Promoter FIGURE Q2 (a) Create a class named Employee having the private attributes of name, address, phone number, salary and email address. (6 marks) (6) Write a mutator for Employee named setName() to assign name. (3 marks) (c) Write an accessor for Employee named getName() to display name. . (3 marks) (d) Create a class named Programmer that inherits Employee with the private attributes of programming language and project manager name. (4 marks) (e) Create a class named Promoter that inherits Employee with the private attributes of total commission and total sales. (4 marks) (f) Write an overloading method for setName() in Programmer with additional parameter to set project manager's name. (4 marks)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started