blob: 5a48b277eb935f6a0c20a4e589963881d1ede357 (
plain) (
blame)
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
|
#ifndef _ELECTRICVEHICLE
#define _ELECTRICVEHICLE
#include "Vehicle.h"
#include <istream>
#include <ostream>
class ElectricVehicle : public Vehicle {
double batteryCapacity;
double range;
double chargingCapacity;
public:
ElectricVehicle();
double GetBatteryCapacity() const;
void SetBatteryCapacity(double batteryCapacity);
double GetRange() const;
void SetRange(double range);
double GetCharingCapacity() const;
void SetChargingCapacity(double chargingCapacity);
friend std::ostream& operator<<(std::ostream& ostr, const ElectricVehicle& vehicle);
friend std::istream& operator>>(std::istream& istr, ElectricVehicle& vehicle);
static bool IsElectricVehicle(const Vehicle& vehicle);
};
#endif /* _ELECTRICVEHICLE */
|