CS 1401 Assignment #3

Date Assigned: Wednesday, February 2, 2005

Due Date: Wednesday, February 9, 2004, before the beginning of your lab section.

Goals: the main goal of this assignment are to learn how to implement arithmetic operations in Java.

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: 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):

To earn all of us such a discount, design an application class that will do the following: Keep the price per square foot (at present, $30), the hardwood floor cost price per square meter (at present, 2,000 pesos), and the discount (at present, 15%) 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.08941 as named constants.

Reminder: the area of a rectangular room is equal to width * depth. A 15% discount means that the actual cost is (1 - 15/100) * original_cost. For example, if the original cost was $100, after the 15% discount, we only pay $85.


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