utilizing microsoft visual c#, please answer the below questions.

From Microsoft Visual C# 2008: An Introduction to Object-Oriented Programming 3rd Edition

Utilizing Microsoft Visual C#, please answer the below questions.

Don't use plagiarized sources. Get Your Custom Essay on
utilizing microsoft visual c#, please answer the below questions.
Just from $13/Page
Order Essay

1.

A. Create a class named Numbers whose Main() method holds two integer variables. Assign values to the variables. Within the class, create two methods, Sum () and Difference (), that compute the sum of and difference between the values of the two variables, respectively. Each method should perform the computation and display the results. In turn, call each of the two methods from Main(), passing the values of the two integer variables. Save the program as Numbers.cs.

 

 

B. Add a method named Product () to the Numbers class. This method should compute the multiplication product of two integers, but not display the answer. Instead, it should return the answer to the calling Main() method, which displays the answer. Save the program as Numbers2.cs.

 

 

2.

Create a class named Square. In the Main() method, declare an integer and prompt the user for a value. Display the value of the integer, then pass it to a method that accepts the value as a reference parameter and prints its square (the number times itself). In Main(), print the value again, proving that the original argument to the method was altered. Save the program as Square.cs.

 

 

3.

Create a class named Square that contains fields for area and the length of a side and whose constructor requires a parameter for the length of one side of a Square. The constructor assigns its parameter to the length of the Square’s side field and calls a private method that computes the area field. Also include read-only properties to get a Square’s side and area. Create a class named DemoSquares that instantiates an array of 10 Square objects with sides that have values of 1 through 10. Display the values for each Square. Save the class as DemoSquares.es.

Calculator

Calculate the price of your paper

Total price:$26
Our features

We've got everything to become your favourite writing service

Need a better grade?
We've got you covered.

Order your paper