CS 1401 Assignment #4

Date Assigned: Wednesday, February 9, 2005

Due Date: Wednesday, February 16, 2005, before the beginning of your lab section.

Goals: to learn how to design objects and value-returning methods.

Points: This assignment is worth a total of 20 points. No late assignments will be accepted, but credit will be given for partially completed assignments turned in on time. Hand your assignments to your TA.

Assignment: In this assignment, we will deal with the same new building assignment as in Assignment 3, with the following difference:

Reminder: One of our alumni suddenly became rich, so he donated money to build a new Computer Science building. This new building will include new TA offices, new faculty offices, and new student lounges. Two companies will be constructing the building: an El Paso-based US company will be building the walls, and a Cd. Juarez-based Mexican company will place hardwood floors in every room. To help in constructing this building, we need to design an application that would, given the width and depth of every room (in feet):

The US contractor price per square foot is $30, the hardwood floor cost price is 2,000 pesos per square meter, the discount is 15%, I foot is 0.3048 meters, and 1 peso is 0.08941 dollars. These values should be stored as named constants, to make it easier to change them later on.

Desired structure: define three classes:

Class User should contain:

Class Office should contain:

Named constants related to offices and costs (price per square foot, price per square meter, feet-to-meters, pesos-to-dollars, and the discount) should be defined in the class Office.

The application class should do the following:

Deliverables: as announced in the labs and explained in the handouts given to you in the labs.