Question: In C# Please Create a new .NET 7 console application. Create a base Vehicle class. Include the following properties: Make Model HasMotor It should also

In C# Please

Create a new .NET 7 console application.

Create a base Vehicle class. Include the following properties:

Make

Model

HasMotor

It should also have the following method(s):

Turn - this takes a direction as a paremter and outputs the direction it is turning to the console.

Create a Radio class with the following properties:

CurrentStation

CurrentVolume

It should also have the following method(s):

PlayRadio - should have the following output: "Playing {CurrentStation} at {Current Volume}".

Create two classes (Car and Bike) that are set to inherit from your Vehicle class.

Your Car class should have the following properties:

NumberOfWheels

IsAutomatic

CurrentMileage

Also include the following method(s):

Honk: this should display the string "HONK HONK" to the console.

Make use of composition by including your Radio class as one of the properties in your Car class.

Your Bike class should have the following properties:

BikeType - Possible types for bikes could be Mountain or Road

Also include the following method(s):

RingBell - should output "RING RING" to the console.

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!