1) Design a form’s Load event handler that will use the Circle class created in question 1 to execute the following tasks when the form is loaded:
- Create an object of the Circle class. Note: make up your own initial radius value.
- Use the property created in the Circle class to assign the radius which is entered into the
txtRadius text box by the user. The previously created object should be used.
- Use the message box and the property that returns circle’s area to show the area of the
Write a complete definition of the Form1_Load event handler
2)Write a complete definition of the C# class Circle which contains the following members:
- a private non-static data field to store a circle’s radius
- a constant PI (=3.141592)
- a public read/write property that can be used to read/write radius
- a public read-only property that is returning circle’s area (Note: PI*radius*radius)
- a public constructor with a parameter that is used to initialize radius
3) If it is assumed that a text file named [login to view URL] has been created and it contains many records/lines that consists of a part description and a part quantity separated by a comma as shown in the following record/line example: MOUSE,150
Write code segments to execute the following tasks:
- Open this file for reading and read/copy all file records into an array. Include all necessary declarations and error checking/handling code when opening this file.
- Print all file records saved into the array in a list box or any other control of your choice. It is required to use a foreach loop for this task.
4) If the following label is created in code as: Label lblStudent = new Label( );
A) Write a statement that will assign your first and last name to this label. Note: a corresponding label’s Text property should be used.
B) Write a statement that will show the form object named frmTest as a modal form.