Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PROBLEM DEFINITION: Write a class named Employee that holds the following data about an employee in attributes: name IDnumber department jobTitle The class should have

PROBLEM DEFINITION: Write a class named Employee that holds the following data about an employee in attributes:

name

IDnumber

department

jobTitle

The class should have 8 methods as follows:

For each attribute, there should be a method that takes a parameter to be assigned to the attribute

For each attribute, there should be a method that returns the attribute Once you have written the class, write a main function that creates three Employee objects. Your main function should then do the following for each of the three objects:

Once you have written the class, write a main function that creates three Employee objects. Your main function should then do the following for each of the three objects:

a. Display a message asking user to enter employee name, ID, department, and title

b. Read employee name into a variable

c. Call the set name method of the first object passing the name

d. Read employee ID into a variable

e. Call the set IDnumber method of the first object passing ID

f. Read employee department into a variable

g. Call the set department method of the first object passing the department

h. Read employee title into a variable

i. Call the set job title method of the first object passing the title

After reading and storing the employee information, the main function should call a function called displayEmployees passing the three objects as arguments. The displayEmployees function should call the methods of the objects that return attributes and display the returned values. The output should be formatted as follows:

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

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

More Books

Students also viewed these Databases questions

Question

10. Microsoft Corporation

Answered: 1 week ago

Question

4. EMC Corporation

Answered: 1 week ago