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 integer 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 mutator methods that store values in these fields and accessor methods that return the values in these fields. Once you have written the class, write a separate program that creates three Employee objects to hold the following data. ID Number Department Computer Science Biomedical Name Position Azah Samsudin Mira Kamal | Che Yah Sam Programmer Researcher 11011 35125 80001 Language Lecturer The program should store the data in the three objects and then display the data for each omplo vee on the

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter4: More Object Concepts
Section: Chapter Questions
Problem 11PE
icon
Related questions
Question
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 integer 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 mutator methods that store values in these fields and accessor methods that return
the values in these fields. Once you have written the class, write a separate program that
creates three Employee objects to hold the following data.
Name
ID Number
Azah Samsudin
Mira Kamal
Che Yah Sam
Department
Computer Science
Biomedical
Language
Position
Programmer
Researcher
Lecturer
11011
35125
80001
The program should store the data in the three objects and then display the data for each
employee on the screen.
Transcribed Image Text: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 integer 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 mutator methods that store values in these fields and accessor methods that return the values in these fields. Once you have written the class, write a separate program that creates three Employee objects to hold the following data. Name ID Number Azah Samsudin Mira Kamal Che Yah Sam Department Computer Science Biomedical Language Position Programmer Researcher Lecturer 11011 35125 80001 The program should store the data in the three objects and then display the data for each employee on the screen.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage