Home / Expert Answers / Computer Science / complete-1-on-page-187-under-programming-challenges-submit-the-employee-java-employeetester-ja-pa379

(Solved): Complete#1 on page 187 (under programming challenges). Submit the Employee.java, EmployeeTester.ja ...



Programming Challenges
1. Employee Class
Write a class named Employee that has the following fields:
- name. The name field i\# Employee Class UML (4) - Windows Photo Viewer
File - Print E-mail Bum \( - \) Open \( = \)
\begin{tabular}{|l|}
\hline \mu

Complete#1 on page 187 (under programming challenges). Submit the Employee.java, EmployeeTester.java files and output screenshot. Follow the attached UML diagram to write the code for the Employee class.

Note*: Use three different constructors to create three different employee objects. The constructors are listed on the UML diagram. Only the second constructor creates an object with all information in it. The first constructor creates an empty object, so you will need to call the set methods on the object to populate it with the information. The third constructor creates an object with just a name and ID. Use set method to add department and position.

Programming Challenges 1. Employee Class 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 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: \# Employee Class UML (4) - Windows Photo Viewer File - Print E-mail Bum \( - \) Open \( = \) \begin{tabular}{|l|} \hline \multicolumn{1}{|c|}{ Employee } \\ \hline - name : String \\ - idNumber : int \\ - department : String \\ - position : String \\ \hline + Employee() \\ +Employee( : String, id : int, \\ dept : String, pos : String) \\ + Employee( \( n \) : String, id : int) \\ + setName( : String) : void \\ + setldNumber(num : int) : void \\ + setDepartment(d : String) : void \\ + setPosition(p: : String) : void \\ + getName() : String \\ + getldNumber() : int \\ + getDepartment() : String \\ + getPosition() : String \\ \hline \end{tabular}


We have an Answer from Expert

View Expert Answer

Expert Answer


Employee.Java Class code package com.education; public class Employee { private String name; private int idNumber; private String department; private
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe