Answered step by step
Verified Expert Solution
Link Copied!

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,

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

1801072248, 978-1801072243

More Books

Students also viewed these Databases questions

Question

assume x = 2 and y = 3 what will be returned by y 3

Answered: 1 week ago