CS 1401 Assignment #3

Date Assigned: Thursday, September 15, 2005 or Friday, September 16, 2005.

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

Goals: The main goal of this assignment is 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: 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:

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

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

Example:

Deliverables: as announced in the labs.