Question
Objective: This assignment aims to create a class based on one of the objects in your room (except the one I did in the class)
Objective: This assignment aims to create a class based on one of the objects in your room (except the one I did in the class) in C# using UML and implement it in the main class by creating four objects of the Choice class, initializing them with different parameters, and printing their values. Note the object you are selecting must be an object in your room. Make sure to comment your UML on the top of your code Sample UML Diagram: Copy code +------------------------+ | Choice | +------------------------+ | + option1 : string | | + option2 : string | | +option3 : int | | +option4 : double | +------------------------+ | + Choice() | | + Choice(string,string,int,double)| | + ToString() : string | | afunction() | +------------------------+ Class Description: The Choice class will have four public fields, option1, option2, option3, and option4, 2 of them string, one integer, and one double type. It will have two constructors, one with no parameters and another with four parameters. It will also have an overridden ToString() method that will return a string representation of the Choice object. You also need add your own function to this class. Main Class: Create four objects of the Choice class using different parameters. Print the values of the four objects using the overridden ToString() method.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started