-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
93 lines (61 loc) · 1.72 KB
/
main.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#include <iostream>
#include "MouseTrapCar.h"
#include "Interface.h"
int main() {
Interface Operator = Interface();
MouseTrapCar Car = MouseTrapCar();
int input;
do {
Operator.HUD(Car);
input = Operator.controller();
switch (input) {
case 0 :
std::cout << "Response was not valid." << std::endl;
case 1 : {
double mass;
std::cout << "\n \nEnter mass: ";
std::cin >> mass;
Car.set_mass(mass);
break;
}
case 2 : {
std::cout << "\n \nEnter wheel diameter: ";
double wheelDiameter;
std::cin >> wheelDiameter;
Car.set_wheel_diameter(wheelDiameter);
break;
}
case 3 : {
std::cout << "\n \nEnter length: ";
double length;
std::cin >> length;
Car.set_length(length);
break;
}
case 4 : {
std::cout << "\n \nEnter forward wind: ";
int wind;
std::cin >> wind;
Car.set_fwind(wind);
break;
}
case 5 : {
std::cout << "\n \nEnter bacwkard wind: ";
int wind;
std::cin >> wind;
Car.set_bwind(wind);
break;
}
case 6 : {
Car.simulate();
break;
}
default: {
break;
}
}
Operator.reset();
}
while(input!= -1);
return 0;
}