MIS 21 under Dr. Vergara Summer 2009
HOW MUCH WATER IS IN THE GLASS?
A spherical ball with radius R cm is submerged in water in a glass that is T cm
tall. The diameter of the glass is D cm. The glass is filled with water.
How much water is in the glass?
Write a program that determines the amount of water in the glass, given R,
T, and D.
You may assume that the dimensions are integers,
but the resulting amount is a double.
Optional: When the glass has been emptied, some surfaces will remain wet
(sphere and glass). Compute the total area of the wet surface.
Write both a console application and a windows application.
that demonstrates multiple types (classes,enums,structs) in a single source.
Activities for today while waiting for your instructor:
Work on these tasks. Moodle submission may be required, but
wait for your instructor, or keep posted on this website for details.
Lab exercise due May 1 12 noon:
Create a multi-form Windows application that uses the Desserts library.
The first form creates the dessert with an icecream topping.
The second form, invoked from the first form, adds additional toppings.
The dessert contents should be displayed and updated accordingly
in the forms.
Make sure to use the updated
Desserts.DLL file ;
it now contains Properties to facilitate simpler display
and provides read access to the extra toppings
(the previous versions did not provide this functionality).
Sample xml file
to be used for today. Exercise:
create a windows application that supports the following features,
through buttons from a main form:
- From an add record button,
a new song record is inserted into the xml data file.
A new form should pop up that facilitates entry of fields.
- From a print report button,
list all records in the xml data file,
using the ReportClass provided by the DLL.
Code to be used for today's lecture.
Try it against this
Sample Handson Exam
Create a Windows application that connects to
with two tables (PERSON and THING).
The application should start with a form with two buttons that:
For the search function, display "Not Found" if there is no
matching record (10 points).
The second button should not open the second form if a person has
not been selected; instead, display a message box
with the message "Select Owner First" (10 points).
You may pattern your program after this
- searches for a PERSON record given his/her initials,
and displays that person's first and last name (40 points)
- opens a new form that lists all THINGs (description) that the
selected person owns (40 points).
The new form should display the name of the person as well.
You do not need to submit this exercise.
Note that there will be an actual handson exam on Monday, May 18.
We will not hold classes today.
Between 12-12:45, I will be around for consultation on the project.
Note that Project 1 is due midnight today.
Excel sheet to be used as a database today.
Review class today. Final Exam tomorrow (Berchmans 104),
4:30pm on May 27.