Homework2a[1]

Homework2a[1] - Homework 2 (20 points) Due date 25th Feb...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Homework 2 (20 points) Due date 25th Feb 09. (To be turned into D2L drop box) 1. Create an abstract class DiscountPolicy. It should have a single abstract method computeDiscount that will return the discount for the purchase of a given number of a single item. The method has two parameters, count and itemCost (2 points) 2. Define DiscountPolicy as an interface instead of the abstract class described in above problem. (2 points) 3. Define a class named Employee whose objects are records for employees. Derive this class from the class Person given below. An employee record inherits an employees name from the class Person. In addition, an employee record contains an annual salary represented as a single value of type double, a hire date that gives the year hired as a single value of type int, and an identification number that is a value of type String. Give your class a reasonable complement of constructors, accessor methods, and mutator methods, as well as an equals method. Write a driver program to fully of constructors, accessor methods, and mutator methods, as well as an equals method....
View Full Document

This note was uploaded on 09/28/2011 for the course CS 2133 taught by Professor Rao during the Fall '10 term at Oklahoma State.

Page1 / 2

Homework2a[1] - Homework 2 (20 points) Due date 25th Feb...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online