Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Help with creating a car class with the following attributes in C++. .Create a class called CAR. Have several variables - use necessary variables that
Help with creating a car class with the following attributes in C++.
.Create a class called CAR. Have several variables - use necessary variables that store gas level, amount of gas, gear car is in, car in motion, etc. Have functions that do: .Check the battery level Check the gas level .Turn right, Left, .Go Straight Put car in forward gear Put car in backward gear Start Car (function should check if batter is good and you have gas) Example: If good then print message "car started", if not " print car not started because..." Park Car Move car # number of feet. (Car uses 1 unit of gas per 50 feet) (subtract 1 unit of gas per 50 feet traveled) As the car moves (determine if it needs gas) Note: as you instruct the computer to perform a command in the main function, have your function print out messages for each action Have a dashboard/Interface in which the user can make interactive/Live choices on how to drive the carStep 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