|
@@ -5,7 +5,7 @@
|
5
|
5
|

|
6
|
6
|
|
7
|
7
|
|
8
|
|
-[version 2016.01.29]
|
|
8
|
+[Verano 2016 - Ive]
|
9
|
9
|
|
10
|
10
|
Arithmetic expressions are an essential part of almost any algorithm that solves a useful problem. Therefore, a basic skill in any computer programming language is to implement arithmetic expressions correctly. In this laboratory experience you will practice the implementation of arithmetic expressions in C++ by writing parametric equations to plot interesting curves.
|
11
|
11
|
|
|
@@ -35,6 +35,8 @@ Before you get to the laboratory you should have:
|
35
|
35
|
|
36
|
36
|
2. Studied the concepts and instructions for the laboratory session.
|
37
|
37
|
|
|
38
|
+3. Taken the Pre-Lab quiz, available in Moodle.
|
|
39
|
+
|
38
|
40
|
---
|
39
|
41
|
|
40
|
42
|
---
|
|
@@ -88,22 +90,17 @@ To plot a curve that is described by parametric equations, we compute the $$x$$
|
88
|
90
|
---
|
89
|
91
|
|
90
|
92
|
|
91
|
|
-!INCLUDE "../../eip-diagnostic/pretty-plots/en/diag-pretty-plots-01.html"
|
|
93
|
+!INCLUDE "../../eip-diagnostic/pretty-plots/en/diag-pretty-plots-01.html"
|
92
|
94
|
<br>
|
93
|
95
|
|
94
|
|
-!INCLUDE "../../eip-diagnostic/pretty-plots/en/diag-pretty-plots-02.html"
|
95
|
|
-<br>
|
96
|
|
-!INCLUDE "../../eip-diagnostic/pretty-plots/en/diag-pretty-plots-03.html"
|
97
|
|
-<br>
|
98
|
|
-!INCLUDE "../../eip-diagnostic/pretty-plots/en/diag-pretty-plots-04.html"
|
99
|
|
-<br>
|
100
|
|
-!INCLUDE "../../eip-diagnostic/pretty-plots/en/diag-pretty-plots-05.html"
|
|
96
|
+!INCLUDE "../../eip-diagnostic/pretty-plots/en/diag-pretty-plots-02.html"
|
101
|
97
|
<br>
|
102
|
|
-!INCLUDE "../../eip-diagnostic/pretty-plots/en/diag-pretty-plots-06.html"
|
|
98
|
+!INCLUDE "../../eip-diagnostic/pretty-plots/en/diag-pretty-plots-03.html"
|
103
|
99
|
<br>
|
104
|
|
-!INCLUDE "../../eip-diagnostic/pretty-plots/en/diag-pretty-plots-07.html"
|
|
100
|
+!INCLUDE "../../eip-diagnostic/pretty-plots/en/diag-pretty-plots-04.html"
|
105
|
101
|
<br>
|
106
|
|
-
|
|
102
|
+
|
|
103
|
+
|
107
|
104
|
|
108
|
105
|
---
|
109
|
106
|
|
|
@@ -212,6 +209,16 @@ Suppose that all courses in Cheo's University are $$3$$ credits each and have th
|
212
|
209
|
|
213
|
210
|
b. Remember that, in C++, when both operands in the division are integers, the result will also be an integer; the remainder will be discarded. Use "type casting": `static_cast<type>(expression)` to solve this problem.
|
214
|
211
|
|
|
212
|
+ !INCLUDE "../../eip-diagnostic/pretty-plots/en/diag-pretty-plots-05.html"
|
|
213
|
+
|
|
214
|
+ ---
|
|
215
|
+
|
|
216
|
+ <br>
|
|
217
|
+ !INCLUDE "../../eip-diagnostic/pretty-plots/en/diag-pretty-plots-06.html"
|
|
218
|
+ <br>
|
|
219
|
+ !INCLUDE "../../eip-diagnostic/pretty-plots/en/diag-pretty-plots-07.html"
|
|
220
|
+
|
|
221
|
+ <br>
|
215
|
222
|
3. Verify your program by computing the GPA of a student that has two A's and 2 B's; what is the average of this student? When your program is correct, save the `main.cpp` file and submit it using "Deliverable 2" in Moodle. Remember to follow the instructions regarding the names and types of the variables, to include the names of the programmers, to document your program and to use good programming practices.
|
216
|
223
|
|
217
|
224
|
|