forked from matkatmusic/PFMCPP_Project1
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
158 lines (138 loc) · 5.24 KB
/
Copy pathmain.cpp
File metadata and controls
158 lines (138 loc) · 5.24 KB
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
#if false
/*
PFM::C++ For Musicians Task
Project 1 - Part 1 / 1
Video: Chapter 2 Part 1
Create a branch named Part1
Purpose: This project will get you thinking correctly about choosing good names for the tasks that your objects will perform.
This project will also introduce you to the review process, and how Pull Requests work.
I will request a change be made to one of your 10 nouns for the sole purpose of showing how the review process works.
1) write out 10 nouns in the space provided below.
Choose nouns that do things.
avoid choosing nouns that have things done TO them.
If your noun consists of multiple words, use camelCaseToNameIt.
2) for each of the 10 nouns, write out 3 actions it might perform, in plain english.
a) AVOID state-checking actions, like "Car has a horn". i.e.
car.hasHorn()
b) We use 'can' and 'has' to check the state of objects, so they aren't really 'action' verbs.
"the Car blows its horn" is a better action, because the car is doing something. its state is not being checked. i.e.
car.blowsHorn()
c) choose actions that your noun does. Do not write out actions that are performed on your noun.
for example:
noun: lightBulb.
action: turns on.
This is a bad action because someone else turns on the light. the light doesn't turn itself on.
a better action would be:
illuminates room
This is a better action, because this is what lightbulbs do.
other actions that would work:
action: consume electricity
action: burn out and destroy filament.
3) write out how you'd call that action in pseudo code, in the space after the plain-english action
4) If the action requires multiple words, use camelCaseToNameIt
don't forget the semi-colon after each statement
*/
// example)
// Noun: arm // 1)
// action 1: the arm extends // 2)
arm.extend(); // 3)
// action 2: the arm flexes // 2)
arm.flex(); // 3)
// action 3: the arm rotates conter-clockwise
arm.rotateCounterClockwise(); // 4) demonstrates CamelCase
// 1)
// Noun: plane
// action 1: the plane deploys wheels
plane.deployWheels();
// action 2: the plane rotates vertically
plane.verticalRotation();
// action 3: the plane consumes fuel
plane.consumeFuel();
// 2)
// Noun: Boat
// action 1: the boat floats over water
boat.float();
// action 2: the boat rotates horizontally
boat.horizontalRotation();
// action 3: the boat consumes fuel
boat.consumeFuel();
// 3)
// Noun: Electric Bike
// action 1: the electric bike drives forward
electricBike.driveForward();
// action 2: the electric bike drives backward
electricBike.driveBackward();
// action 3: the electric bike charge dynamo battery
electricBike.chargeDynamoBattery();
// 4)
// Noun: Space Rocket
// action 1: the space rocket fly vertically
spaceRocket.fly();
// action 2: the space rocket detach itself from the space shuttle
spaceRocket.detach();
// action 3: the space rocket consumes fuel
spaceRocket.consumeFuel();
// 5)
// Noun: Hand
// action 1: the hand opens
hand.open();
// action 2: the hand hold an object
hand.holdObject();
// action 3: the hand flexes
hand.flex();
// 6)
// Noun: Television
// action 1: the television displays image
television.displayImage();
// action 2: the television creates sound
television.createSound();
// action 3: the television displays an external source
television.displayExternalSource();
// 7)
// Noun: Washer
// action 1: the washer spins
washer.spin();
// action 2: the washer fills up with water
washer.fillWater();
// action 3: the washer evacuates the water
washer.evacuateWater();
// 8)
// Noun: Refrigerator
// action 1: the refrigerator consume electricity
refrigerator.consumeElectricity();
// action 2: the refrigerator changes temperature
refrigerator.changeTemperature();
// action 3: the refrigerator light up the interior
refrigerator.lightUpInterior();
// 9)
// Noun: Computer
// action 1: the computer receives keyboard input
computer.keyboardInput();
// action 2: the computer records video input
computer.recordVideo();
// action 3: the computer displays screen
computer.displayScreen();
// 10)
// Noun: Speaker
// action 1: the speaker vibrates the cone
speaker.vibrateCone();
// action 2: the speaker moves the electrical magnet
speaker.moveMagnet();
// action 3: the speaker consumes electrcity
speaker.consumeElectricity();
#endif
/*
MAKE SURE YOU ARE NOT ON THE MASTER BRANCH
Commit your changes by clicking on the Source Control panel on the left, entering a message, and click [Commit and push].
If you didn't already:
Make a pull request after you make your first commit
pin the pull request link and this repl.it link to our DM thread in a single message.
send me a DM to review your pull request when the project is ready for review.
Wait for my code review.
*/
#include <iostream>
int main()
{
std::cout << "good to go" << std::endl;
return 0;
}