Question
C-Sharp Create a new class, in a separate file, called ElectricScooterBundle . The file name should be ElectricScooterBundle.cs. Add the following properties: Id (int), Scooter
C-Sharp
Create a new class, in a separate file, called ElectricScooterBundle. The file name should be ElectricScooterBundle.cs. Add the following properties: Id (int), Scooter (ElectricScooter) and Accessories (List
(I have most of the code (download the link below to get the c# file) I need help matching the "sample run"
Sample run: Electric Scooter: number: 1 name: E Prime Electric Scooter color: Silver run time:30 price 379.99 Electric Scooter: number: 2 name: Power A2 Electric Scooter color: Silver run time:40 price 199.99 Electric Scooter: number: 3 name: E300 Electric Scooter color: Blue run time: 40 price 279.99 Electric Scooter: number: 4 name: RX200 Electric Scooter color: Green run time: 40 price 269.99 select number 2 You selected: Power A2 Electric Scooter Add an accessory (Y/N)? y Accessory: number: 1 name: Adult Helmet color: Black price 24.99 Accessory: number: 2 name: Child Helmet color: Black price 19.99 Accessory: number: 3 name: Foam Grips color: Blue price 9.99 Accessory: number: 4 name: Child Elbow & Knee Pads color: Pink price 19.99 select number 2 Add an accessory (Y/N)? Y Accessory: number: 1 name: Adult Helmet color: Black price 24.99 Accessory: number: 2 name: Child Helmet color: Black price 19.99 Accessory: number: 3 name: Foam Grips color: Blue price 9.99 Accessory: number: 4 name: Child Elbow & Knee Pads color: Pink price 19.99 select number 3 Add an accessory (Y/N)? Y Accessory: number: 1 name: Adult Helmet color: Black price 24.99 Accessory: number: 2 name: Child Helmet color: Black price 19.99 Accessory: number: 3 name: Foam Grips color: Blue price 9.99 Accessory: number: 4 name: Child Elbow & Knee Pads color: Pink price 19.99 select number 4 Add an accessory (Y/N)? N Electric Scooter Bundle: number: 1 Scooter: Electric Scooter: number: 2 name: Power A2 Electric Scooter color: Silver run time:40 price 199.99 bundle price 249.96 Accessory: number: 2 name: Child Helmet color: Black price 19.99 Accessory: number: 3 name: Foam Grips color: Blue price 9.99 Accessory: number: 4 name: Child Elbow & Knee Pads color: Pink price19.99
Please download this .ZIP file (link) with the c# file (code) that I have worked with some code.
https://www.dropbox.com/s/3cudftjdepsyw5k/Assignment-Lab-09.zip?dl=0
DebugDefault 2017 for Msc Program.c Console.WriteLine(item.Value. ToString)); 127 128 129 130 131 132 133 134 135 136 137 138 139 148 Packagos Propartias /taking user input Console.Write("Enter Accessory number to select: "); int input = Convert.ToInt32 (Console.ReadLine()); if (dictionary.ContainsKey(input)) Console.WriteLine("Invalid entry, try again"): return ChooseElectricScooterFromDictionary(dictionary); else return dictionary[inputl; //Console.WriteLine(selectedScoot); 142 143 144 145 146 147 148 149 158 151 152 153 154 155 156 157 158 159 160 public static void Problem5() //write a program in Problem5 method that lets the user select one scooter and as many accessories as they wish, //then create an ElectricScooterBundle object, add the accessories to the bundle object and print the bundle object //Be sure to use the methods and classes created previously to help solve the problem Dictionarycint, ElectricScooter> dictionaryofElectricscooter LoadElectricScooter; ElectricScooter selectedScooter-ChooseElectricScooterFromDictionarydictionaryofElectricscooter); ListcAccessory> accessoryList new List
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