- MHS Comp Sci

advertisement
Comp Sci 1
VB.NET
Variables
1. OBJECT HEIGHT The height (in meters) of an object at any given time dropped from
a starting height of 100 meters is given by the equation h  100  4.9t 2 where t is the
time in seconds. Create an Object Height application that asks the user for a time less
than 4.5 seconds and displays the height of the object at that time. Include all appropriate
objects on your form. As a bonus, display an error message if the user enters an invalid
time.
2. TEMPERATURE CONVERSION Create a Temperature Conversion application that asks
the user for a temperature in Fahrenheit and displays the temperature in Celsius using the
formula C  95 F  32 . Test the program with values such as 212, 32, 98.6, and -40. As
usual your form should display all appropriate objects.
3. RECTANGLE AREA AND PERIMETER Create a Rectangle Area and Perimeter
application that allows the user to enter the length and width of a rectangle and displays
the rectangle’s area and perimeter.
4. AREA OF A CIRCLE Create an application that allows the user to input the radius of a
circle and then displays the area and circumference of that circle. As usual, your form
must include all relevant objects.
5. PIZZA COST Create a Pizza Cost application that allows the user to enter the size of
the pizza they want, and then displays the cost of the pizza when a ‘Calculate’ button is
pressed.
The cost of making a pizza at Alberto’s Pizza Shop is as follows:
 Labor cost is $0.75 per pizza, regardless of size
 Rent cost is $1.00 per pizza, regardless of size
 Materials cost varies by pizza size according to the formula:
$0.05 * diameter * diameter (diameter is measured in inches)
A possible upgrade could be adding toppings as an option for an extra fee!
Download