hw2.s10

# hw2.s10 - CS 60 Programming Assignment #2 Due Date: April...

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

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS 60 Programming Assignment #2 Due Date: April 15, 2010 (1:00 PM). 60 Points. Remember: Points will be deducted if turned in after the Due Date. Deadline: April 16, 2010 (1:00 PM) Remember: No homework will be accepted after the Deadline You must work on this assignment independently. TURN IN YOUR ASSIGNMENT USING THE TURNIN PROGRAM to hw02@cs60 (SEE CLASS WEB PAGE) The Gonzalez Boat Company manufactures a line of custom-built pleasure craft. A buyer can choose his/her particular vessel by specifying combinations from the following list of characteristics: (a) Length can be from 15 to 75 feet, in increments of 1 foot. (b) Width can be from 5 to 25 feet, in increments of 1 foot. (c) Number of sleeping accommodations can be from 0 to 14. (d) Engine horsepower can be anyone of 10, 20, 50, 150, 250, 350, 500, or 1000. The price of a Gonzalez boat is \$25 times the square of the length, plus \$150 for each berth, plus \$9 per unit horsepower. The tax is 8 . 5% of the sales price. Some combinations of the specifications listed above would result in ludicrous boat de- signs; so certain constraints must be introduced. Specifically, the length of a boat must be at least three times, but no more than five times, its width. The horsepower can be no greater than 0.6 times the product of length and width. And the number of sleeping berths cannot exceed 1/100 of the length times the width. Should any of these constraints be violated, the customer is to receive the following notifications: the design request is too wide for its length, the design request is too narrow for its length, the design request is overpowered, too many sleeping accommodations requested for a boat of this size....
View Full Document

## This note was uploaded on 03/21/2011 for the course CMPSC 60 taught by Professor Gonzalez during the Spring '10 term at UCSB.

### Page1 / 4

hw2.s10 - CS 60 Programming Assignment #2 Due Date: April...

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

View Full Document
Ask a homework question - tutors are online