Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef VHC_H
- #define VHC_H
- #include <iostream>
- using namespace std;
- class Vehicle{
- private:
- string manufacturer;
- int seat;
- protected:
- string type;
- public:
- Vehicle(){
- manufacturer = "XXX";
- type = "YYY";
- seat = 1;
- }
- Vehicle(string ma,string ty,int se){
- manufacturer = ma;
- type = ty;
- seat = se;
- }
- void setManufacturer(string ma){
- manufacturer = ma;
- }
- string getManufacturer(){
- return manufacturer;
- }
- void setType(string ty){
- type = ty;
- }
- string getType(){
- return type;
- }
- void setSeat(int se){
- seat = se;
- }
- int getSeat(){
- return seat;
- }
- void display(){
- cout<<"Manufacturer: "<< manufacturer <<endl
- <<"Type: "<< type << endl
- <<"Seat Number: " << seat <<endl;
- }
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement