Menu

[Solved]Create Car Class Following 1 Enum Type Make Following Values Bmw Audi Porche Alpha Romero Q37290313

Create a Car class with the following: 1. ENUM type of Make withthe following values: BMW, AUDI, PORCHE, ALPHA ROMERO 2. ENUM typeof Colors with the following values: RED, WHITE, BLACK, SILVER,BLUE, GREEN, YELLOW 3. ENUM type of Status with the followingvalues: FOR SALE, SOLD, PENDING CONTRACT 4. Constructor toinitialize the car’s make, color, and status 5. Getters and settersmethods for make, color, and status 6. A method calledStatus_Message that will display a message depending upon the makeand color. Here are the conditions: If Make is ‘BMW’ and Color is’Red’ or ‘White’ – message should be “BMW is FOR SALE” If Make is’BMW’ and Color is ‘Black’ or ‘Silver’ or ‘Blue’ – message shouldbe “BMW is SOLD” If Make is ‘BMW’ and Color is ‘Green’ or ‘Yellow’- message should be “BMW is PENDING CONTRACT” If Make is ‘Audi’ andColor is ‘Red’ – message should be “Audi is FOR SALE” If Make is’Audi’ and Color is ‘White’ or ‘Black’ or ‘Silver’ or ‘Blue’ -message should be “AUDI is SOLD” If Make is ‘Audi’ and Color is’Green’ or ‘Yellow’ – message should be “Audi is PENDING CONTRACT”If Make is ‘Porche’ and any color – message should be “Porche isPENDING CONTRACT” 7. Create a main method to do the following: -Ask user for Three entries: Make (BMW, AUDI, PORCHE, ALPHA ROMERO),Color (RED, WHITE, BLACK, SILVER, BLUE, GREEN, YELLOW), and Status(FOR SALE, SOLD, PENDING CONTRACT) – Create an instance of the Carclass initializing the entries from the user (above). – Call theStatus_Message method to display the appropriate message for themake and color.

For javascript

Expert Answer


Answer to Create a Car class with the following: 1. ENUM type of Make with the following values: BMW, AUDI, PORCHE, ALPHA ROMERO 2… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *