CS 1401 Assignment #4

Date Assigned: Thursday, September 22, 2005 or Friday, September 23, 2005.

Due Date: correspondingly, Thursday, September 29, 2005, or Friday, September 30, 2005, before the beginning of your lab section.

Goals: to learn 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.

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

Reminder: Many computer science students have complained about the parking, so Bill Gates donated money to build a parking garage for CS students at UTEP.

There are two competing plans: to place this garage near UTEP campus and to place it across the border so that students will be able to take a shuttle to school.

To help in constructing this garage, we need to design an application that would, given the width and depth of every floor (in feet) and the number of floors:

Keep the price per square foot (at present, $30), the Juarez price per square meter (at present, 200 pesos), and the discount (at present, 10%) as named constants, to make it easier to change them later on.

It is also a good idea to define FEET_TO_METERS = 0.3048 and PESOS_TO_DOLLARS = 0.1 (for simplicity) as named constants.

Desired structure: define three classes:

Class Architect should contain:

Class Design 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 Design.

The application class should do the following:

Deliverables: as announced in the labs.