Title: Module 07 Assignments Methods
Course: Advance C# > Section: Module 07

Homework Assignments for the Module

Complete the following assignments on or before following class period.

1. Read Chapter 10.  It explains how to use classes and objects.
2. Complete the following exercises:
a. Create a Console application with the name Module07_Rect.
b. Change the default name of the Class from Program to TestClass.  Use Refactor to change the name.
c. In the Main method, write a program to sum 2 integer numbers and display the result.  Save and test the program.
d. Change the program.  Write a method (Add) to receive 2 integers, return the sum of those 2 integers.
e. Add an overloaded Add method to receive 3 integers and return the sum.
f. Add a Class to your project (Rectangle).  To the Class, add integer variables length and width. Add the getters and setters for both.  Add a constructor for the class.
g. Add a public method to the class (RectangleArea).  Return the Length * Width.
h. Call the RectangleArea method from TestClass.  Display the result of integers 4 and 5.
3. a. Create a Console application with the name Module07_Ary.
b. Change the default name of the Class from Program to TestAry.  Use Refactor to change the name.
c. In the Main method, write a program to display the values of an integer array.  The integer array will contain 6 values. 23,44,55,12,6 and 99.
d. Pass the array to a method.
e. Use a loop to display the the values in the array.
f. Add a Class to your project (TestArray).  To the Class, add string variable msg.  Add a constructor for the class to set the msg to "Array of values above 50".
g. Add a void public method to the class (AryDisplay).  Display the values of the array above 50. You will need to pass the array from the calling Class.
4. After you complete the exercises, zip the completed assignments, attach and email via Canvas to the instructor.  Subject Module xx Your Name.  Answer these questions in the subject body:
1. Which exercise(s) were completed?  Any problems running the exercises?
2. What was the most difficult concept in this assignment?
3. How long did it take to complete this assignment?
4. Attach your assignment.