FOR C++, ACCORDING THE VEHICLE HEADER, FILL THE PART 1 OF THE CODE
#ifndef_Vehicle_hh_
#define_Vehicle_hh_
classVehicle{
private:
floatspeed;
floatmile;
public:
Vehicle();
Vehicle(float,float);
floatgetSpeed();
floatgetMile();
voidsetSpeed(float);
voidsetMile(float);
voidprint();
};
#endif
(DEFINE FUNCTIONS CORRESPONDING TO VEHICLE HEADER CLASS IN PART 1 BELOW)
#include"Vehicle.hh"
#include"Ship.hh"
#includeusingnamespacestd;// *** DEFINE --VEHICLE-- FUNCTIONS FOR PART 1 ***// *** DEFINE --SHIP-- FUNCTIONS FOR PART 2 ***voidreduceSpeed(Ship*,float);voidtakePassenger(Ship*,int);intmain() {return0;}// reduce the speed of ship given in percentage (0 < percentage=""><>voidreduceSpeed(Ship*s,floatpercentage) { // *** FILL THIS FUNCTION FOR PART 3 ***}// takes the number of passengers to the shipvoidtakePassenger(Ship*s,intpas) { // *** FILL THIS FUNCTION FOR PART 4 ***}
usingnamespacestd;
// *** DEFINE --VEHICLE-- FUNCTIONS FOR PART 1 ***
// *** DEFINE --SHIP-- FUNCTIONS FOR PART 2 ***
voidreduceSpeed(Ship*,float);
voidtakePassenger(Ship*,int);
intmain() {
return0;
}
// reduce the speed of ship given in percentage (0 < percentage=""><>
voidreduceSpeed(Ship*s,floatpercentage) {
// *** FILL THIS FUNCTION FOR PART 3 ***
// takes the number of passengers to the ship
voidtakePassenger(Ship*s,intpas) {
// *** FILL THIS FUNCTION FOR PART 4 ***
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here