-
Notifications
You must be signed in to change notification settings - Fork 0
/
SportCar.cpp
44 lines (31 loc) · 975 Bytes
/
SportCar.cpp
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
34
35
36
37
38
39
40
41
42
#include "SportCar.h"
#include <iostream>
//Sport Car class constructors
SportCar::SportCar(){}
SportCar::SportCar(string sportCarOwner, string sportCarMake, string sportCarModel,
int sportCarYear, double sportCarTopSpeed, double sportCarZeroToSixty){
owner = sportCarOwner;
make = sportCarMake;
model = sportCarModel;
year = sportCarYear;
topSpeed = sportCarTopSpeed;
zeroToSixty=sportCarZeroToSixty;
}
//Sport Car class setters/getters
void SportCar::setcarTopSpeed(double carTopSpeed) {
topSpeed = carTopSpeed;
}
double SportCar::getcarTopSpeed() {
return topSpeed;
}
void SportCar::setcarZeroToSixty(double carZeroToSixty) {
zeroToSixty = carZeroToSixty;
}
double SportCar::getcarZertoToSixty() {
return zeroToSixty;
}
//Functions
void SportCar::getInfo(){
cout << owner << ": " << make << ", " << model << ", " << year << ", "
<< topSpeed << " MPH, " << zeroToSixty << " seconds" <<endl;
}