Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data And Information Quality Dimensions, Principles And Techniques

Authors: Carlo Batini, Monica Scannapieco

1st Edition

3319241060, 9783319241067

More Books

Students also viewed these Databases questions

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago