SlideShare a Scribd company logo
1 of 3
Download to read offline
Title: Creating a class in C# using UML
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.
Upload your CS files (program.cs , class.cs) together here.
Title: Creating a class in C# using UML
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.
Upload your CS files (program.cs , class.cs) together here.

More Related Content

More from adinathfashion1

THis is from an Applied Mixed Models class Answer just part.pdf
THis is from an Applied Mixed Models class Answer just part.pdfTHis is from an Applied Mixed Models class Answer just part.pdf
THis is from an Applied Mixed Models class Answer just part.pdf
adinathfashion1
 
Title Media culture Objectives 1 To apply aseptic techniq.pdf
Title Media culture Objectives 1 To apply aseptic techniq.pdfTitle Media culture Objectives 1 To apply aseptic techniq.pdf
Title Media culture Objectives 1 To apply aseptic techniq.pdf
adinathfashion1
 
TitleInvestigating the effect of counterfeit permits on the.pdf
TitleInvestigating the effect of counterfeit permits on the.pdfTitleInvestigating the effect of counterfeit permits on the.pdf
TitleInvestigating the effect of counterfeit permits on the.pdf
adinathfashion1
 

More from adinathfashion1 (20)

Tim and Stephanie are devastated when they find out their ne.pdf
Tim and Stephanie are devastated when they find out their ne.pdfTim and Stephanie are devastated when they find out their ne.pdf
Tim and Stephanie are devastated when they find out their ne.pdf
 
THis is from an Applied Mixed Models class Answer just part.pdf
THis is from an Applied Mixed Models class Answer just part.pdfTHis is from an Applied Mixed Models class Answer just part.pdf
THis is from an Applied Mixed Models class Answer just part.pdf
 
This is not working for me at allAnd I cannot edit anythi.pdf
This is not working for me at allAnd I cannot edit anythi.pdfThis is not working for me at allAnd I cannot edit anythi.pdf
This is not working for me at allAnd I cannot edit anythi.pdf
 
This is false please explain Assuming that the reserve req.pdf
This is false please explain Assuming that the reserve req.pdfThis is false please explain Assuming that the reserve req.pdf
This is false please explain Assuming that the reserve req.pdf
 
This is NOT TRUE concerning courtship sounds Question 2 opt.pdf
This is NOT TRUE concerning courtship sounds Question 2 opt.pdfThis is NOT TRUE concerning courtship sounds Question 2 opt.pdf
This is NOT TRUE concerning courtship sounds Question 2 opt.pdf
 
This is what I got for 54 but Im unsure if its right Prepa.pdf
This is what I got for 54 but Im unsure if its right Prepa.pdfThis is what I got for 54 but Im unsure if its right Prepa.pdf
This is what I got for 54 but Im unsure if its right Prepa.pdf
 
This PNF technique starts with the same process as the the h.pdf
This PNF technique starts with the same process as the the h.pdfThis PNF technique starts with the same process as the the h.pdf
This PNF technique starts with the same process as the the h.pdf
 
This is where you set up the project infrastructure to help .pdf
This is where you set up the project infrastructure to help .pdfThis is where you set up the project infrastructure to help .pdf
This is where you set up the project infrastructure to help .pdf
 
This is a true case study A woman kept coming to the doctor.pdf
This is a true case study A woman kept coming to the doctor.pdfThis is a true case study A woman kept coming to the doctor.pdf
This is a true case study A woman kept coming to the doctor.pdf
 
To answer Questions 14 and 15 read the article Britain.pdf
To answer Questions 14 and 15 read the article Britain.pdfTo answer Questions 14 and 15 read the article Britain.pdf
To answer Questions 14 and 15 read the article Britain.pdf
 
To adhere to Endangered Species Act ESA guidelines the Fi.pdf
To adhere to Endangered Species Act ESA guidelines the Fi.pdfTo adhere to Endangered Species Act ESA guidelines the Fi.pdf
To adhere to Endangered Species Act ESA guidelines the Fi.pdf
 
Title Media culture Objectives 1 To apply aseptic techniq.pdf
Title Media culture Objectives 1 To apply aseptic techniq.pdfTitle Media culture Objectives 1 To apply aseptic techniq.pdf
Title Media culture Objectives 1 To apply aseptic techniq.pdf
 
TitleInvestigating the effect of counterfeit permits on the.pdf
TitleInvestigating the effect of counterfeit permits on the.pdfTitleInvestigating the effect of counterfeit permits on the.pdf
TitleInvestigating the effect of counterfeit permits on the.pdf
 
Tketici talebindeki kk deiiklikler aadaki nedenlerle ve.pdf
Tketici talebindeki kk deiiklikler aadaki nedenlerle ve.pdfTketici talebindeki kk deiiklikler aadaki nedenlerle ve.pdf
Tketici talebindeki kk deiiklikler aadaki nedenlerle ve.pdf
 
Titanic Project Management Blunders Links to an external s.pdf
Titanic  Project Management Blunders Links to an external s.pdfTitanic  Project Management Blunders Links to an external s.pdf
Titanic Project Management Blunders Links to an external s.pdf
 
This is my table met Mry anlea Nole isch studein las diru ev.pdf
This is my table met Mry anlea Nole isch studein las diru ev.pdfThis is my table met Mry anlea Nole isch studein las diru ev.pdf
This is my table met Mry anlea Nole isch studein las diru ev.pdf
 
TITLE MAKE A PROJECT ON THE WORKING OF PARLIAMENTARY FORM O.pdf
TITLE MAKE A PROJECT ON THE WORKING OF PARLIAMENTARY FORM O.pdfTITLE MAKE A PROJECT ON THE WORKING OF PARLIAMENTARY FORM O.pdf
TITLE MAKE A PROJECT ON THE WORKING OF PARLIAMENTARY FORM O.pdf
 
Tipik bir yklenim dzenlemesinde yatrm bankacl firmas I H.pdf
Tipik bir yklenim dzenlemesinde yatrm bankacl firmas I H.pdfTipik bir yklenim dzenlemesinde yatrm bankacl firmas I H.pdf
Tipik bir yklenim dzenlemesinde yatrm bankacl firmas I H.pdf
 
Tiyatro iin Orta ada din tiyatroyu nasl etkiledi .pdf
Tiyatro iin    Orta ada din tiyatroyu nasl etkiledi    .pdfTiyatro iin    Orta ada din tiyatroyu nasl etkiledi    .pdf
Tiyatro iin Orta ada din tiyatroyu nasl etkiledi .pdf
 
tissues were taken from two populations to investigate.pdf
tissues were taken from two populations to investigate.pdftissues were taken from two populations to investigate.pdf
tissues were taken from two populations to investigate.pdf
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 

Title Creating a class in C using UMLObjective This assig.pdf

  • 1. Title: Creating a class in C# using UML 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.
  • 2. Main Class: Create four objects of the Choice class using different parameters. Print the values of the four objects using the overridden ToString() method. Upload your CS files (program.cs , class.cs) together here. Title: Creating a class in C# using UML 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 |
  • 3. | +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. Upload your CS files (program.cs , class.cs) together here.