Then define an array of type Employee and fill it with the following Employee objects firstName John David astName White Ford Beech Howe Brand department Department object 1 (Sales) Department object...


Then define an array of type Employee and fill it with the following Employee objects<br>firstName<br>John<br>David<br>astName<br>White<br>Ford<br>Beech<br>Howe<br>Brand<br>department<br>Department object 1 (Sales)<br>Department object 1 (Sales)<br>Department object 1 (Sales)<br>Department object 2 (Accounting)<br>Department object 2 (Accounting)<br>salary<br>1000<br>1<br>2<br>1500<br>3<br>Sophie<br>Mary<br>Susan<br>1200<br>1300<br>1400<br>4<br>the program should show the user the following menu and wait for input from the user:<br>1. Show all employees<br>2. Show employees for department<br>3. Show employee with max salary<br>Option 1: shows the employee's full name, salary and department name for all employees<br>1. show all enployees<br>2. show employees for department<br>3. shaw employee with max salary<br>Nane<br>Salary Departnent<br>John White 1080.0 Sales<br>Sophie Beech<br>David Ford 1500.0 Sales<br>1280.0 Sales<br>Mary Howe 1380.0 Accounting<br>Susan Brand 1480.0 Accounting<br>Process finished with exit code e<br>Option 2: asks the user for a department name then shows the employee's full name, salary<br>and department name for that department.<br>

Extracted text: Then define an array of type Employee and fill it with the following Employee objects firstName John David astName White Ford Beech Howe Brand department Department object 1 (Sales) Department object 1 (Sales) Department object 1 (Sales) Department object 2 (Accounting) Department object 2 (Accounting) salary 1000 1 2 1500 3 Sophie Mary Susan 1200 1300 1400 4 the program should show the user the following menu and wait for input from the user: 1. Show all employees 2. Show employees for department 3. Show employee with max salary Option 1: shows the employee's full name, salary and department name for all employees 1. show all enployees 2. show employees for department 3. shaw employee with max salary Nane Salary Departnent John White 1080.0 Sales Sophie Beech David Ford 1500.0 Sales 1280.0 Sales Mary Howe 1380.0 Accounting Susan Brand 1480.0 Accounting Process finished with exit code e Option 2: asks the user for a department name then shows the employee's full name, salary and department name for that department.
Write a Java program that stores information about a company. You should define two classes:<br>Employee which represents the employees in the company, and Department which represents<br>the departments the employees are in.<br>Class definition<br>The classes should have the following fields:<br>• Department<br>• String name<br>Employee<br>• String firstName<br>• String lastName<br>• double salary<br>• Department department<br>Notes:<br>1. All fields should be private.<br>2. You should define a constructor that takes as parameters all fields in each class.<br>3. You should define a getter and a setter for all fields in each class.<br>4. The field salary on class Employee should never be a negative number.<br>5. You should define a method getfullName on class Employee that returns the<br>employees full name as a String.<br>Main Program<br>after you have defined the classes, In the main method define two objects of type Department<br>as follows:<br>name<br>Sales<br>1<br>Accounting<br>

Extracted text: Write a Java program that stores information about a company. You should define two classes: Employee which represents the employees in the company, and Department which represents the departments the employees are in. Class definition The classes should have the following fields: • Department • String name Employee • String firstName • String lastName • double salary • Department department Notes: 1. All fields should be private. 2. You should define a constructor that takes as parameters all fields in each class. 3. You should define a getter and a setter for all fields in each class. 4. The field salary on class Employee should never be a negative number. 5. You should define a method getfullName on class Employee that returns the employees full name as a String. Main Program after you have defined the classes, In the main method define two objects of type Department as follows: name Sales 1 Accounting
Jun 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here