You are on page 1of 2

FUNCTION DESCRIPTION

Autogear ()
It is used as default constructor to initialize the
Member functions as {gear=0; speed=0; nitro=5;
dist=0 ; fuel=0;}
Void main ()
It is used to execute the class and take entry
from the user of the car company, current stats,
Asking user for more driving. Moreover it is
used for displaying the program menu before
the user.
Speedcntr ()
It is used to first initialize the fuel to zero and then
start checking for the speed which is entered by the
user and then change the speed to its required
speed and further look on nitro.
Enter ()
It is just used to set the company by the user. The it
Starts the car driving and then the car type and
brand is asked for from user.
Calcfuel ()
It initializes the fuel to 50 if it is for first time else if
there is no fuel car stops and we quit the program.
Gearctrl ()
It is used to set the gear according to the
programmer based on some conditions for speed.
If the speed entered by the user changes then the
Gear changes automatically which is reflected in
the screen to the user.

You might also like