COP4226, Assignment 1
Due Thursday, September 28 at 11:59 pm.
Zip your entire project and upload on the web. Exclude the
Debug and Release directories. Be sure to include the
res directory.
Submitting
Homework Online.
Eventually, I will provide an executable for you to view.
Create a dialog based application that does several calcuations as described
below
-
Create a set of radio buttons to indicate the type of calculations to perform:
Conversions, Geometry, Constants.
-
Change the title of the form to agree with the selected button.
-
When a radio button is clicked, make drop down list visible (see next section).
-
Create a Drop Down List box. The contents of the Drop Down List box will
change depending on the selected radio button.
-
Conversions should have the following options in the Drop List
-
"Choose a Conversion"
-
"Inches to Feet". Input: inches.
-
Add two more conversions of your choice. Do not choose the ones from my example.
-
Geometry should have the following options in the Drop List
-
"Choose a Calculation"
-
"Circumference of a circle". Input: radius.
-
"Area of a rectangle". Input: length, width.
-
Add two more geometric formulas of your choice. Do not choose the ones from
my example.
-
Constants should have the following options in the Drop List
-
"Choose a Constant"
-
"Pi"
-
"e"
-
Add two more constants of your choice. Do not choose the ones from my example.
-
When the user selects an option from the list box, other than the first option,
display the appropriate number of input boxes, with appropriate labels, and
a button that will preform the operation.
- All input should be floating point.
- Clear input boxes when a new operation is selected from the drop down list.
-
When the button is clicked, make a text box visible that displays the output.
The user should not be able to edit the text box.
-
When the user clicks the button to perform the calculation, validate that
all input are floating point numbers that are greater than 0.
-
Use an error provider to display an icon next to invalid input.
-
Validate all the input when the calculate button is clicked. There should
be an error icon next to all invalid input boxes.
-
If the data is valid, display the output as a complete sentence that echoes
the input and displays the result.
-
Display constants to 9 decimal places. (Hint: String.Format)
-
Display geometric calculations rounded to 2 decimal places. When echoing
the input, round to 2 decimal places, too.
-
Hide the output textbox when any control other than the button is clicked.
-
When the form is resized, be sure that the controls in the form spread out
over the entire client area, in a pleasing arrangement. Set the minimum size so that
no controls ever overlap each other.
-
Add a control library to the solution.
-
Add a control that contains your fill name. Use a new font, size and color
for your name.
-
Add a control that contains the course and section. Use the same font and
color as was used for your name.
-
Center the course in the control. Center the section on the line below the course.
-
Make the size of the course smaller than the size of the name.
-
Make the size of the section smaller than the size of the course.
-
Center your name, from the control library, at the top of the form. When
the form is resized, the name should remain centered.
-
Add a menu to the form.
-
Add a top level menu named Options.
-
Add a menu item named Resize.
-
When this is selected, toggle a check mark for the item.
-
When in the checked state, the form will resize as controls become visible
or disappear.
-
When in the unchecked state, the form will remain a constant size that is
large enough to contain all of the controls, whether or not they are visible.
-
Add a menu item named Trasparent.
-
When this is selected, toggle a check mark for the item.
-
When in the checked state, the form will be partially transparent.
-
When in the unchecked state, the form will be opaque.
-
Add a top level menu named Help.
-
Add a menu item named Oath. When clicked, display a new modal form.
-
Set an appropriate title for the new form.
-
Set the location of the new form so that it appears adjacent to
the main form.
-
Center the user control for the name at the top of the form.
-
Center the user control for the course below the name.
-
Add a multiline label that contains the following.
I attest that the homework I am uploading was done by me.
I understand that if it is determined that I shared my
assignment with another person, or copied my assignment
from another person's work, then I and the other person
will suffer the following consequences:
1. This assignment will be graded as a zero.
2. A full letter grade will be removed from the final
grade for the course I am taking. 3. A letter will be
placed in my permanent file in the School of Computer
Science.
4. If this is a second transgression, then I will receive
an F in this course. My case will be forwarded to the
Dean for further action.
-
Add a menu item named About. When clicked, display a new modal form.
-
Set an appropriate title for the new form.
-
Set the location of the new form so that it appears adjacent to
the main form.
-
Center the user control for the name at the top of the form.
-
Center the user control for the course below the name.
-
Add a multiline label that describes this assignment.