Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with a Java program. I am having troubles understanding what I need to do. I have attached pictures and files below. Here's

I need help with a Java program. I am having troubles understanding what I need to do. I have attached pictures and files below. Here's the link to the problem http://gauss.ececs.uc.edu/Courses/c4003/labs/lab1.html

image text in transcribedimage text in transcribedimage text in transcribedYou can find the wages,java file using this link http://gauss.ececs.uc.edu/Courses/c4003/labs/Wages.java. I have fixed the image issues. Please follow this link if there's still issues http://gauss.ececs.uc.edu/Courses/c4003/labs/lab1.html

Important You should not solve this by thinking this is a stand-alone, one-shot problem. Think of this as a way to develop a class hierarchy that can be placed in a library and never be modified afterward to accommodate new user classes that might be developed. So, in wages.java we give you a class Employee, and subclasses ageEmployee, Manager, Programmer, salesperson, and SalesManager and ask you to write an EmployeeList container class that implements methods for the maintenance of a database of Employee objects. The properties that the Employeelist should have are described below. Your code should be designed in such a way that is does not break by adding, for example, a President class, or a part-time Worker Class, or a Student co-op class, or any other class of object that might be derived from one of the subclasses of the Employee class and added t the EmployeeList database. This is an exercise in polymorphism. virtual functions are one means that C++ and Java have to support polymorphism . Lab Problem: Create a class called Employeelist that is a container of objects of the following kind abstract class Employee String name; Employee 0 Employee (String nm) name-nm abstract double computePay) void display O f) void setHours (double hrs) t) void setsales (double sales) t) void setselary (double salary) System.out-println"NO!")) This class and subclasses of this class are contained in file Wages.java, which compiles correctly without the Employeelist class. You will add your implementation of the Employeelist class to this file, uncomment the code at the bottom of the file, and maybe modify some of the existing code to see it rurn. The EmployeeList class should provide the following methods: Employee find (String nm) that returns an object in the container whose name matches nm, or null if no such Employee is in the container; void setHours (String nm, double hrs) that invokes setHours(hrs) on the employee in the container whose name matches nm; void setsalary (String nm, double salary) that invokes setsalary(salery) on the employee in the container whose name matches nm; void setsales (String nm, double sales) that invokes setSales(sales) on the employee in the container whose name matches nm; double payroll) that computes the total payroll of all Employee objects in the container using the computePay) method of each; and void display() which invokes display() of each employee in the container

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

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions

Question

Detailed note on the contributions of F.W.Taylor

Answered: 1 week ago