Question: Write a set of classes and a GUI program using those classes. Each class should be in its own file. For each class, provide set
Write a set of classes and a GUI program using those classes. Each class should be in its own file. For each class, provide set and get methods for all instance data, the toString method, a default constructor and a constructor that initializes all instance data with data passed as paramaters. All instance data will be private. The Employee class will contain instance data name(String) and age(int) and the float method getIncome(no paramaters). The SalaryEmployee class will be derived from Employee and include instance data salary(float)and provides implementation of getIncome. The EmployeeList class will contain an Arraylist of Employee and the methods getData, getAverageIncome, getHighestIncome, getLowestIncome, and sortNames, sortAge, and sortIncome. FOr this program, all Employees will be Salary Employees.
There will be a GUI portion which will have a menu with 3 menu headings: File, Sort, and Help. Under FIle there will be 3 menu items: New, Add and Exit with a separator before Exit. Under Sort, there should be 3 items: Name, Age, Income - these should be RadioButtons. Under Help there should be one item: About. The menu item Exit will terminate the program; About will display a dialog box containing a copyright message, you name and a short description of the program; New will display a dialog box asking for Salary employees and creates a new list of Employees; Add will display a dialog box asking for employees to be addedto the current list. All menus and menu itms should have shortcut keys defined. The main screen should have a heading of Name Age Income with the data beneath it. The string data should be left justified, numeric data right justified and use anti-aliasing. At the bottom, you will aslso print the average, highest and lowest income and it should be labeled. In this program, we are just dealing with SalaryEmployee. Make the getIncome method abstract, implement Comparable
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
