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.

  1. Create a class Person that has attributes common to both students and employees:

    • name

    • social security number

    • age

    • gender

    • address

    • telephone number

  2. Create and implement the appropriate method definitions.

  3. Create a class Student.

    • A student has a grade‐point average (GPA), a major, and year of graduation.

  4. Create a class Employee.

    • An employee has a department, a job title, and year of hire.

  5. In addition, create two new class HourlyEmployee (hourly rate, hours worked, and union dues) and SalariedEmployee (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.

  1. You should have an abstract class Computer and subclasses DeskTop and Notebook.

  2. Each subclass should have methods for calculating the price of a computer, given the base price plus the cost of the different options.

  3. You should have methods for calculating memory price, hard drive price, and so on. There should be a method to calculate shipping cost.

ENSURE WE HAVE RECORDED YOUR COMPLETION. FAILURE TO DO SO WILL RESULT IN A GRADE OF 0!