FOR C++, PLASE SEND THE ANSER IN 30 MINUTES.
ACCORDING TO CODE BELOW,
#include"Vehicle.hh"
classShip:publicVehicle{
private:
intpassenger;
public:
Ship();
Ship(int,float,float);
intgetPassenger();
voidsetPassenger(int);
voidprint();
};
(DEFINE FUNCTIONS CORRESPONDING TO SHIP HEADER CLASS IN PART 2 BELOW)
#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