-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCar.h
More file actions
33 lines (31 loc) · 719 Bytes
/
Car.h
File metadata and controls
33 lines (31 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef CAR_H
#define CAR_H
#include <string>
using std::string;
using std::ostream;
#include "Vehicle.h"
//has all vehicle things
class Car : public Vehicle
{
public:
Car( const int, const int, const string &, const int, const int, const string &, const int poll);
~Car();
//gets engine
int getengine() const;
//gets gas
string getgas() const;
//gets pollution level
int getpoll() const;
//virtual print function
virtual void print() const;
//operator overloading
friend ostream &operator<<( ostream &output, const Car &);
private:
//engine size
int engine;
//gas type(premium regular or plus)
string gas;
//pollution level
int poll;
};
#endif