Answer to Question #188937 in C++ for zain ul abdeen

Question #188937

Q1. write 4 classess like, body of car, engine of car, tyres of car etc and call these classes in main metod. Note all classess must return some funtionality.


1
Expert's answer
2021-05-04T05:22:24-0400
#include <iostream>


using namespace std;


class BodyOfCar{
    public:
        BodyOfCar(){
         cout<<"\n This is the body of the car.";
        }
};




class EngineOfCar{
    public:
        EngineOfCar(){
         cout<<"\n This is the engine of the car.";
        }
};


class TyresOfCar{
    public:
        TyresOfCar(){
         cout<<"\n This is the tyres of the car.";
        }
};


class WindscreenOfCar{
    public:
        WindscreenOfCar(){
         cout<<"\n This is the windscreen of the car.";
        }
};


int main(){
    BodyOfCar body;
    EngineOfCar engine;
    TyresOfCar tyres;
    WindscreenOfCar windscreen;


    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS