Repository navigation
Expand file tree
/
Copy pathmain.cpp
More file actions
166 lines (138 loc) · 4.87 KB
/
Copy pathmain.cpp
File metadata and controls
166 lines (138 loc) · 4.87 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
159
160
161
162
163
164
165
166
#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: Wrist
// action 1: the wrist rotates
wrist.rotates();
// action 2: the wrist swivels
wrist.swivels();
// action 3: the wrist extends
wrist.extends();
// 2)
// Noun: guitarAmp
// action 1: the guitar amp makes sound
guitarAmp.makesSound();
// action 2: The guitar plugs into the amp
guitar.plugsIntoAmp();
// action 3: the guitar amp uses electricity
guitarAmp.usesElectricity();
// 3)
// Noun: doctors
// action 1: doctors cure people
doctors.curePeople();
// action 2: doctors use medicine
doctors.useMedicine();
// action 3: doctors wear white coats
doctors.wearWhiteCoats();
// 4)
// Noun: fish
// action 1: fish swim in water
fish.swimWater();
// action 2: fish eat food
fish.eatFood();
// action 3: fish breath underwater
fish.breathUnderWater();
// 5)
// Noun: computers
// action 1:computers process numbers
computers.processNumbers();
// action 2:computers store data
computers.storeData();
// action 3: computers use binary code
computers.useBinaryCode();
// 6)
// Noun: eye
// action 1: the eye opens
eye.opens();
// action 2: the eye closes
eye.closes();
// action 3: the eye blinks
eye.blinks();
// 7)
// Noun: fingers
// action 1: fingers bend at the joints
fingers.bendAtJoints();
// action 2: fingers grip things
fingers.gripThings();
// action 3: fingers play the piano
fingers.playPiano();
// 8)
// Noun: cat
// action 1: the cat chases the mouse
cat.chasesMouse();
// action 2: the cat runs fast
cat.runsFast();
// action 3: the cat jumps
cat.jumps();
// 9)
// Noun: televison
// action 1: the televison displays the image
televison.displaysImage();
// action 2: the television makes sound
televison.makesSound();
// action 3: the televison distorts sound
televison.distortsSound();
// 10)
// Noun: clock
// action 1: the clock displays the time
clock.displaysTime();
// action 2: the clock uses numbers
clock.usesNumbers();
// action 3: the clock hangs on the wall
clock.hangsOnWall();
#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;
}