lab 4 instructions - 1. Review the design recipe for...

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

View Full Document Right Arrow Icon
1. Review the design recipe for classes (attached below) 2. Using the design recipe for classes (attached below), write a class definition and a template for: a microwave; a shirt; an MS Word document; a sound (think of what a sound consists of. ..) 3. (You know I had to do it): Using the design recipe for classes, write a class definition for a checkbook. Write a template using your design recipe. Now, using the template, write a function that adds money to the balance of the checkbook. Using the template, write a function that with- draws money from the checkbook balance as follows: if the amount to be withdrawn is less than the current balance, adjust the balance accordingly. If, however, the balance is less than the amount to be withdrawn, a warning message is printed (saying something like, “Sorry, you can- not withdraw that amount because your balance is only. ..”) and the checkbook balance remains the same. 4. At any given moment, the weather consists of temperature (in Fahrenheit), the relative humid- ity, and wind speeds. Using the Design Recipe for classes, write a class definition for the weath- er. Write a template. Now, using the template, write a function that returns the wind chill temper- ature, which is calculated using 35.74 + 0.6215 x T – 35.75 x V 0.16 + 0.4275 x T x V 0.16 , where T is the current temperature and V is the current wind velocity (speed) in miles per hour. 5. Using the Design recipe for classes, write a class definition for a sumo wrestler (that must in-
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/11/2011 for the course CISC 106 taught by Professor Mcgeary during the Fall '08 term at University of Delaware.

Page1 / 2

lab 4 instructions - 1. Review the design recipe for...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online