Create a console


1. Create a console application.
2. Add a public class called compute_product.
3. In compute_product declare two private fields (class variables) named value1 and value2.
4. For field (class variable) value2 create a public property named Value2 and implement the get and set.
5. Add a constructor to assign a value to the value1 field by passing an integer value to the constructor when the constructor is instantiated in Main.
6. Add a method named public void display_product_calc() and use a Console.WriteLine to display the result of multiplying value1* Value2 to the console.
7. In Main declare a variable named myValue1 and assign the value 5 to it.
8. In Main instantiate a compute_product object named myproduct and pass myValue1 in the constructor parameter list.
9. In Main use the Value2 class property to set the value of class variable value2 to integer 10.
10. Call the compute_product class display_product_calc method from Main; the displayed result will be 5

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Create a console
Reference No:- TGS0636709

Expected delivery within 24 Hours