1. Java - Review
This lab is there for you to review Java before moving to data structures.
1.1. Person
A student is a person, and so is an employee.
Create a class
Person
that has attributes common to both students and employees:name
social security number
age
gender
address
telephone number
Create and implement the appropriate method definitions.
Create a class
Student
.A student has a grade‐point average (GPA), a major, and year of graduation.
Create a class
Employee
.An employee has a department, a job title, and year of hire.
In addition, create two new class
HourlyEmployee
(hourly rate, hours worked, and union dues) andSalariedEmployee
(annual salary).
1.2. Computer
Create a pricing system for a company that makes individualized computers, such as you might see on a website.
There are two kinds of computers: notebooks and desktop computers.
The customer can select the processor speed, the amount of memory, and the amount of storage.
The customer can also choose a wireless network, a DVD drive or both.
For notebooks, there is a choice of screen size and whether the screen is a touch screen.
You should have an abstract class
Computer
and subclassesDeskTop
andNotebook
.Each subclass should have methods for calculating the price of a computer, given the base price plus the cost of the different options.
You should have methods for calculating memory price, hard drive price, and so on. There should be a method to calculate shipping cost.