Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Solution C++ (cpp) program Project Name: Water Vehicle You are required to autom

ID: 3773775 • Letter: S

Question

Solution C++ (cpp) program

Project Name:

Water Vehicle You are required to automate the following specifications of a water vehicle:

We can increase the speed of water vehicle by nitro.

We have a limited quantity of nitro.

Quantity of nitro increase according to distance travelled. There is a GPS system to find the location of a water vehicle.

Water vehicle have both systems to drive on road and sea.

Water Vehicle is armed by some Weapons which are executed by programming.(different for road and water)

(Tips: Menus will be displayed.You may use different functions to handle different scenarios.)

Explanation / Answer

#include<iostream.h>

#include<conio.h>

void main()

{int speed=20;

float nitro=10.0;

int distance_on_land;

int distance_on_water;

int location;

String weapons[10];

cout<<"enter the distance to be travelled on land";

cin>>distance_on_land;

cout<<"enter distance to be travelled on water";

cin>distance_on_water;

int choice; /* 1= vehicle on land ,2-vehicle on water */

if(choice==1)

watervehicle_on_land();/* to demonstrate speed and nitro on land*/

else

watervehicle_on_water();

}

void watervehicle_on_land()

{ nitro++;

speed++;

cout<<"the valued of nitro on land"<< nitro;

cout<<"the value of speed on land"<<speed;

}

void watervehicle_on_water()

{ nitro++;

speed++;

cout<<nitro ;

cout<< speed; /* on water*/

}

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote