ISYS 350, Spring
2012, Assignment 2,
Due Date: 2/20/12
Part 1:
Create a C# Form
with a textbox and a button. The box is
for a user to enter a number of seconds.
And when the user clicks the button, the program displays the equivalent
number of hours, minutes and seconds using a messageBox.Show
method. If the seconds entered is less
than 60, your program should only display the seconds; if the seconds is a
least 60 and less than 3600, your program should display minutes and seconds;
if the second is at least 3600, your program should display hours, minutes and
seconds. Use the following data to test
your program:
750 seconds: 12 minutes, 30 seconds
7565 seconds: 2 hours, 6 minutes, 5
seconds
Requirements:
1. Input validation: The number of seconds cannot exceed 86400. You must use textbox’s Validating event to do the validation.
2. Turn in the form’s screenshot and the code.
(Note: You can use the Alt + PrintScrn keys to
capture only the active window.)
Part 2:
An Internet service provider offers three subscription packages to its customers, plus a discount for nonprofit organizations:
Package A: 10 hours of access for $9.95 per month. Additional hours are $2.00 per hour.
Package B: 20 hours of access for $14.95 per month. Additional hours are $1.00 per hour.
Package C: Unlimited access for $19.95 per month.
Nonprofit organizations: 20% discount on all packages.
The user should select the package the customer has purchased from a set of radio buttons and enter the number of hours used in a textbox. A check box captioned “Nonprofit organization” should appear on the form. The application should calculate and display the total amount due using a label control.
Requirements:
1. Input validation: The number of hours used in a month
cannot exceed 744. You must use textbox’s Validating
event to do the validation.
2. Turn in the form’s screenshots and the code.
Part 3: 2 extra credits
Search internet to find a solution for a textbox to accept only digits; non-digit characters will not be displayed in the box.