CIS 162 AD - C# Programming I - Section 5832
Worksheet #8
Due Thursday, May 4, 2006
Name:
I. Definitions:
please explain the following terms:
- abstract method
- single inheritance
- exception
- stack trace
- finally block
- exception handler
II. Questions or short essay:
- What is the syntax of a try . . . catch block?
- If you have multiple catch blocks, why is the order that you place them important?
- What information does the message property of an exception give you?
III. Programming Exercise:Write source code for the following:
- Create a Form that contains three Labels that hold famous quotes of your choice. When the program starts, the background color of the Form and each Label should be black. When the user passes a mouse over a Label, change its BackColor to white, revealing the text of the quote.
- Design and implement an application that contains GUI components and calculates an investment value. It should have text boxes to allow the user to enter the amount invested, the number of years for the investment, and the annual interest rate. When the user presses the button it will accept the inputs and calculate the total value of the investment after the specified number of years. The answer should be written to a label.