Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java Write a class named Employee that has the following fields: name: The name field is a String object that holds the employee's name. idNumber:

java

Write a class named Employee that has the following fields:

name: The name field is a String object that holds the employee's name.

idNumber: The idNumber is an int variable that holds the employee's ID number.

department: The department field is a String object that holds the name of the department where the employee works.

position: the position field is a string object that holds the employee's job title.

Write appropriate mutator methods that store the values in these fields and accessor methods that return the values in these fields.

Once you have written the class, add a main method that creates three Employee objects to hold the following data:

Name ID Number Department Position

Susan Meyers 47899 Marketing Sales Rep

Mark Jones 39119 IT Programmer

Joy Rogers 81774 Manufacturing Engineer

The program should store this data in the three objects and then display the data

for each employee in the format:

Name, employee number ID Number, works as a Position in Department.

For example:

Susan Meyers, employee 47899, works as a Sales Rep in Marketing.

Print each statement on a separate line in the order Susan, Mark, Joy.

sample run:

SusanMeyers,employeenumber47899,worksasaSalesRepinMarketing.

MarkJones,employeenumber39119,worksasaProgrammerinIT.

JoyRogers,employeenumber81774,worksasaEngineerinManufacturing.

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

2nd Edition

0471180742, 978-0471180746

More Books

Students also viewed these Databases questions

Question

What is meant by Non-programmed decision?

Answered: 1 week ago

Question

What are the different techniques used in decision making?

Answered: 1 week ago