Question: Answer needs to be in c#. The car class has an issue in the code that i cant figure out. i added better pictures. Grading

Answer needs to be in c#. The car class has an issue in the code that i cant figure out.  Answer needs to be in c#. The car class has an
issue in the code that i cant figure out. i added better
pictures. Grading elinas Dobugines i When you hroe compiofed is statie volat
Hosir? bution to reserd your mese. yourcar coleril paurcat fruse rertucres. Cuipurince
thesincar colog. toifoes artel. 1 1 Elars chr privete steins oviar pityath
intipichi gubits fing do this a mow the il) retuin geifies ariend
i added better pictures.
endet) Bolis cercime erife bine notor? 21/ You cen construct a far
u ing a price ang tolor 3. Wor Just a price, in
which boge a Eat (B black using syotemi using it tatic Syot

Grading elinas Dobugines i When you hroe compiofed is statie volat Hosir? bution to reserd your mese. yourcar coleril paurcat fruse rertucres. Cuipurince thesincar colog. toifoes artel. 1 1 Elars chr privete steins oviar pityath intipichi gubits fing do this a mow the il) retuin geifies ariend endet) Bolis cercime erife bine notor? 21/ You cen construct a far u ing a price ang tolor 3. Wor Just a price, in which boge a Eat (B black using syotemi using it tatic Syot oit. Consoled 7. using Syston. Globalization; 4 elasa Debuginine3 9 it statio void inath Cax mycax = nem tur (acon Cradr) ) Car thetrcox new cae (f 1 chass Cher 1 private itrine cosor. private int pr zoe. 1 pubirc cat (ibe prtce) thief) i puatip certurt pricos atring color) ptwease serfig e0rox private int price; publie cers () this (1eace, tbleckin) publie car (int price) lethrs ) f publife car (int price, string.color) I Price pitice? b. Color = color: publte tring Colot i) get f return color? ] set: color value; 1. public int Price get return price? 1 set price = valuet F Creates a Car class 21/ You can construct a Car using a price and color 3. / or just a price, in which case a Car is black 4/1 or no parameters, in which case a Car ia $10,000 and black 5 using System; 6 using static System. Console; 7 using system, Globalization; 8 class Debugnines f \} 1/ You can construct a Car using a price and color If or just a price, in which case a Car is black 11 or no parameters, in which case a Car is $10,000 and black using System; using static System. Console; using System.Globalization; class DebugNine3 \{ static void Main() \{ Car myCar = new Car(32000, "red" ); Car yourCar = new Car(14000, "black"); Car theirCar = new Car(); Writeline("My {0} car cost {1}" ", myCar. Color, myCar. Price. ToString("c2", CultureInfo. GetCultureInfo("en-US"))); Writeline("Your {0} car cost {1} ", yourCar.Color, yourCar.Price. ToString("c2", CultureInfo.GetCultureInfo( "en-US"))); Writeline("Their {0} car cost {1}" ", theirCar.Color, theirCar.Price.ToString("c2", CultureInfo.GetCultureInfo("en-US"))); \} class Car \{ private string color; private int price; public Car() : this (10000, "black") \{ \} public Car(int price) : this() \{ My red car cost $32,000.00 Your black car cost $14,000.00 Their black car cost $10,000.00

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!