Browse Source

Arreglando README. Cambios menores formato markdown.

Rafael Arce Nazario 8 years ago
parent
commit
21286f5662
1 changed files with 46 additions and 61 deletions
  1. 46
    61
      README.md

+ 46
- 61
README.md View File

1
 [English](#markdown-header-arithmetic-expressions-pretty-plots) | [Español](#markdown-header-expresiones-aritmeticas-grafico-bello)
1
 [English](#markdown-header-arithmetic-expressions-pretty-plots) | [Español](#markdown-header-expresiones-aritmeticas-grafico-bello)
2
 
2
 
3
-#Expresiones aritméticas - Gráficas Bonitas
3
+# Expresiones aritméticas - Gráficas Bonitas
4
 
4
 
5
 
5
 
6
 ![rsz_heart.png](images/rsz_heart.png)
6
 ![rsz_heart.png](images/rsz_heart.png)
11
 
11
 
12
 
12
 
13
 
13
 
14
-##Objetivos:
14
+## Objetivos:
15
 
15
 
16
-1. Implementar expresiones aritméticas en C++ para producir gráficas. 
16
+1. Implementar expresiones aritméticas en C++ para producir gráficas.
17
 2. Utilizar constantes adecuadamente.
17
 2. Utilizar constantes adecuadamente.
18
 3. Definir variables utilizando tipos de datos adecuados.
18
 3. Definir variables utilizando tipos de datos adecuados.
19
 4. Convertir el valor de un dato a otro tipo cuando sea necesario.
19
 4. Convertir el valor de un dato a otro tipo cuando sea necesario.
20
 
20
 
21
 
21
 
22
-##Pre-Lab:
22
+## Pre-Lab:
23
 
23
 
24
 Antes de llegar al laboratorio debes:
24
 Antes de llegar al laboratorio debes:
25
 
25
 
42
 ---
42
 ---
43
 ---
43
 ---
44
 
44
 
45
-##Ecuaciones paramétricas
45
+## Ecuaciones paramétricas
46
 
46
 
47
-Las *ecuaciones paramétricas* nos permiten representar una cantidad como función de una o más variables independientes llamadas *parámetros*. En muchas ocasiones resulta útil representar curvas utilizando un conjunto de ecuaciones paramétricas que expresen las coordenadas de los puntos de la curva como funciones de los parámetros. Por ejemplo, en tu curso de trigonometría debes haber estudiado que la ecuación de un círculo con radio $r$ y centro en el origen tiene una forma así: 
47
+Las *ecuaciones paramétricas* nos permiten representar una cantidad como función de una o más variables independientes llamadas *parámetros*. En muchas ocasiones resulta útil representar curvas utilizando un conjunto de ecuaciones paramétricas que expresen las coordenadas de los puntos de la curva como funciones de los parámetros. Por ejemplo, en tu curso de trigonometría debes haber estudiado que la ecuación de un círculo con radio $r$ y centro en el origen tiene una forma así:
48
 
48
 
49
 $$x^2+y^2=r^2.$$
49
 $$x^2+y^2=r^2.$$
50
 
50
 
53
 
53
 
54
 $$x^2+y^2=4,$$
54
 $$x^2+y^2=4,$$
55
 
55
 
56
-y sus puntos son los pares ordenados $(x,y)$ que satisfacen esa ecuación. Una forma paramétrica de expresar las coordenadas de los puntos de el círculo con radio $r$ y centro en el origen es: 
56
+y sus puntos son los pares ordenados $(x,y)$ que satisfacen esa ecuación. Una forma paramétrica de expresar las coordenadas de los puntos de el círculo con radio $r$ y centro en el origen es:
57
 
57
 
58
 $$x=r \cos(t)$$
58
 $$x=r \cos(t)$$
59
 
59
 
66
 
66
 
67
 ![figura1.jpg](images/circuloAngulo01.png)
67
 ![figura1.jpg](images/circuloAngulo01.png)
68
 
68
 
69
-<b>Figura 1.</b> Círculo con centro en el origen y radio $r$.
69
+**Figura 1.** Círculo con centro en el origen y radio $r$.
70
 
70
 
71
 
71
 
72
 
72
 
84
 ---
84
 ---
85
 ---
85
 ---
86
 
86
 
87
-##Sesión de laboratorio:
87
+## Sesión de laboratorio:
88
 
88
 
89
-###Ejercicio 1
89
+### Ejercicio 1
90
 
90
 
91
-En este ejercicio graficarás algunas ecuaciones paramétricas que generan curvas interesantes. 
91
+En este ejercicio graficarás algunas ecuaciones paramétricas que generan curvas interesantes.
92
 
92
 
93
 **Instrucciones**
93
 **Instrucciones**
94
 
94
 
100
 
100
 
101
 	![figura3.png](images/segment01.png)
101
 	![figura3.png](images/segment01.png)
102
 
102
 
103
-	<b>Figura 3.</b> Segmento de línea desplegado por el programa <i>PrettyPlot</i>.
103
+	**Figura 3.** Segmento de línea desplegado por el programa <i>PrettyPlot</i>.
104
 
104
 
105
 	---
105
 	---
106
 
106
 
107
-3. El archivo `main.cpp` (en Sources) contiene la función `main()` donde estarás añadiendo código. Abre ese archivo y estudia el código. 
107
+3. El archivo `main.cpp` (en Sources) contiene la función `main()` donde estarás añadiendo código. Abre ese archivo y estudia el código.
108
 
108
 
109
     ```cpp
109
     ```cpp
110
     QApplication a(argc, argv);
110
     QApplication a(argc, argv);
112
     XYPlotWindow wCircle;
112
     XYPlotWindow wCircle;
113
     XYPlotWindow wHeart;
113
     XYPlotWindow wHeart;
114
     XYPlotWindow wButterfly;
114
     XYPlotWindow wButterfly;
115
-    
115
+
116
     double y = 0.00;
116
     double y = 0.00;
117
     double x = 0.00;
117
     double x = 0.00;
118
     double increment = 0.01;
118
     double increment = 0.01;
119
-    
120
-    for (double t = 0; t < 2*M_PI; t = t + increment) {      
119
+
120
+    for (double t = 0; t < 2*M_PI; t = t + increment) {
121
         // parametric equations
121
         // parametric equations
122
         x = t;
122
         x = t;
123
         y = t;
123
         y = t;
125
         // add x and y as a point in the graph
125
         // add x and y as a point in the graph
126
         wLine.AddPointToGraph(x,y);
126
         wLine.AddPointToGraph(x,y);
127
     }
127
     }
128
-    
128
+
129
     // After all the points have been added, plot and show the graph
129
     // After all the points have been added, plot and show the graph
130
     wLine.Plot();
130
     wLine.Plot();
131
     wLine.show();
131
     wLine.show();
142
 	$$x=16 \sin^3(t)$$
142
 	$$x=16 \sin^3(t)$$
143
 	$$y=13 \cos(t) - 5 \cos(2t) - 2 \cos(3t) - \cos(4t)-3.$$
143
 	$$y=13 \cos(t) - 5 \cos(2t) - 2 \cos(3t) - \cos(4t)-3.$$
144
 
144
 
145
-
146
 	Si implementas las expresiones correctamente debes ver la imagen de un corazón.  Esta gráfica debe haber sido obtenida dentro de un objeto `XYPlotWindow` llamado `wHeart`.
145
 	Si implementas las expresiones correctamente debes ver la imagen de un corazón.  Esta gráfica debe haber sido obtenida dentro de un objeto `XYPlotWindow` llamado `wHeart`.
147
 
146
 
148
 6. Ahora graficarás una curva cuyas ecuaciones paramétricas son:
147
 6. Ahora graficarás una curva cuyas ecuaciones paramétricas son:
150
 	$$x=5\cos(t) \left[ \sin^2(1.2t) + \cos^3(6t) \right]$$
149
 	$$x=5\cos(t) \left[ \sin^2(1.2t) + \cos^3(6t) \right]$$
151
 	$$y= 10\sin(t) \left[ \sin^2(1.2t) +  \cos^3(6t) \right].$$
150
 	$$y= 10\sin(t) \left[ \sin^2(1.2t) +  \cos^3(6t) \right].$$
152
 
151
 
153
-
154
 	Observa que ambas expresiones son casi iguales, excepto que una comienza con $5\cos(t)$ y la otra con $10\sin(t)$. En lugar de realizar el cómputo de $ \sin^2(1.2t) + \cos^3(6t)$ dos veces, puedes asignar su valor a otra variable $q$ y realizar el cómputo así:
152
 	Observa que ambas expresiones son casi iguales, excepto que una comienza con $5\cos(t)$ y la otra con $10\sin(t)$. En lugar de realizar el cómputo de $ \sin^2(1.2t) + \cos^3(6t)$ dos veces, puedes asignar su valor a otra variable $q$ y realizar el cómputo así:
155
 
153
 
156
 	$$q =  \sin^2(1.2t) + \cos^3(6t)$$
154
 	$$q =  \sin^2(1.2t) + \cos^3(6t)$$
157
 	$$x = 5 \cos(t)(q)$$
155
 	$$x = 5 \cos(t)(q)$$
158
 	$$y = 10  \sin(t)(q).$$
156
 	$$y = 10  \sin(t)(q).$$
159
 
157
 
160
-	
161
 	Implementa las expresiones de arriba, cambia la condición de terminación del `for` a `t < 16*M_PI` y observa la gráfica que resulta. Se supone que parezca una mariposa. Esta gráfica debe haber sido obtenida dentro de un objeto `XYPlotWindow` llamado `wButterfly`.
158
 	Implementa las expresiones de arriba, cambia la condición de terminación del `for` a `t < 16*M_PI` y observa la gráfica que resulta. Se supone que parezca una mariposa. Esta gráfica debe haber sido obtenida dentro de un objeto `XYPlotWindow` llamado `wButterfly`.
162
 
159
 
163
 7. Entrega el archivo `main.cpp` que contiene el código con las ecuaciones paramétricas de las gráficas del círculo, el corazón y la mariposa utilizando   "Entrega 1" en Moodle. Recuerda utilizar buenas prácticas de programación, incluir el nombre de los programadores y documentar tu programa.
160
 7. Entrega el archivo `main.cpp` que contiene el código con las ecuaciones paramétricas de las gráficas del círculo, el corazón y la mariposa utilizando   "Entrega 1" en Moodle. Recuerda utilizar buenas prácticas de programación, incluir el nombre de los programadores y documentar tu programa.
165
 En [2] y [3] puedes encontrar otras ecuaciones paramétricas de otras curvas interesantes.
162
 En [2] y [3] puedes encontrar otras ecuaciones paramétricas de otras curvas interesantes.
166
 
163
 
167
 
164
 
168
-###Ejercicio 2
165
+### Ejercicio 2
169
 
166
 
170
 En este ejercicio escribirás un  programa para obtener el promedio de puntos para la nota de un estudiante.
167
 En este ejercicio escribirás un  programa para obtener el promedio de puntos para la nota de un estudiante.
171
 
168
 
172
-Supón que todos los cursos en la Universidad de Yauco son de $3$ créditos y que las notas tienen las siguientes puntuaciones: $A = 4$ puntos por crédito; $B = 3$ puntos por crédito; $C = 2$ puntos por crédito; $D = 1$ punto por crédito y $F = 0$ puntos por crédito. 
169
+Supón que todos los cursos en la Universidad de Yauco son de $3$ créditos y que las notas tienen las siguientes puntuaciones: $A = 4$ puntos por crédito; $B = 3$ puntos por crédito; $C = 2$ puntos por crédito; $D = 1$ punto por crédito y $F = 0$ puntos por crédito.
173
 
170
 
174
 **Instrucciones**
171
 **Instrucciones**
175
 
172
 
176
 1. Crea un nuevo proyecto "Non-Qt" llamado Promedio. Tu función `main()`  contendrá el código necesario para pedirle al usuario el número de A's, B's, C's, D's y F's obtenidas por el estudiante y computar el promedio de puntos para la nota (GPA por sus siglas en inglés).
173
 1. Crea un nuevo proyecto "Non-Qt" llamado Promedio. Tu función `main()`  contendrá el código necesario para pedirle al usuario el número de A's, B's, C's, D's y F's obtenidas por el estudiante y computar el promedio de puntos para la nota (GPA por sus siglas en inglés).
177
 
174
 
178
-2. Tu código debe definir las **constantes** $A=4, B=3, C=2, D=1, F=0$ para la puntuación de las notas, y pedirle al usuario que entre los valores para las variables $NumA$, $NumB$, $NumC$, $NumD$, $NumF$. La variable $NumA$ representará el número de cursos en los que el estudiante obtuvo $A$,  $NumB$ representará el número de cursos en los que el estudiante obtuvo $B$, etc. El programa debe desplegar el GPA del estudiante en una escala de 0 a 4 puntos. 
179
-
175
+2. Tu código debe definir las **constantes** $A=4, B=3, C=2, D=1, F=0$ para la puntuación de las notas, y pedirle al usuario que entre los valores para las variables $NumA$, $NumB$, $NumC$, $NumD$, $NumF$. La variable $NumA$ representará el número de cursos en los que el estudiante obtuvo $A$,  $NumB$ representará el número de cursos en los que el estudiante obtuvo $B$, etc. El programa debe desplegar el GPA del estudiante en una escala de 0 a 4 puntos.
180
 
176
 
181
-
182
-	**Ayudas:** 
177
+	**Ayudas:**
183
 
178
 
184
 	1. El promedio se obtiene sumando las puntuaciones  correspondientes a las notas obtenidas (por ejemplo, una A en un curso de 3 créditos tiene una puntuación de 12), y dividiendo esa suma por el número total de créditos.
179
 	1. El promedio se obtiene sumando las puntuaciones  correspondientes a las notas obtenidas (por ejemplo, una A en un curso de 3 créditos tiene una puntuación de 12), y dividiendo esa suma por el número total de créditos.
185
 
180
 
186
 	2. Recuerda que, en C++, si divides dos números enteros el resultado se "truncará" y será un número entero. Utiliza "type casting": `static_cast<tipo>(expresión)` para resolver este problema.
181
 	2. Recuerda que, en C++, si divides dos números enteros el resultado se "truncará" y será un número entero. Utiliza "type casting": `static_cast<tipo>(expresión)` para resolver este problema.
187
 
182
 
188
-3. Verifica tu programa calculando el promedio de un estudiante que tenga dos A y dos B; ¿qué promedio tendría este estudiante?. Cuando tu programa esté correcto, guarda el archivo `main.cpp` y entrégalo  utilizando  "Entrega 2" en Moodle. Recuerda seguir las instrucciones en el uso de nombres y tipos para las variables,  incluir el nombre de los programadores, documentar tu programa y utilizar buenas prácticas de programación. 
189
-
190
-
183
+3. Verifica tu programa calculando el promedio de un estudiante que tenga dos A y dos B; ¿qué promedio tendría este estudiante?. Cuando tu programa esté correcto, guarda el archivo `main.cpp` y entrégalo  utilizando  "Entrega 2" en Moodle. Recuerda seguir las instrucciones en el uso de nombres y tipos para las variables,  incluir el nombre de los programadores, documentar tu programa y utilizar buenas prácticas de programación.
191
 
184
 
192
 
185
 
193
 ---
186
 ---
215
 
208
 
216
 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.
209
 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.
217
 
210
 
218
-##Objectives:
211
+## Objectives:
219
 
212
 
220
-1. To implement arithmetic expressions in C++ to produce graphs. 
221
-2. To use constants adequately. 
213
+1. To implement arithmetic expressions in C++ to produce graphs.
214
+2. To use constants adequately.
222
 3. To define variables using adequate data types.
215
 3. To define variables using adequate data types.
223
 4. To cast a data value to another type when necessary.
216
 4. To cast a data value to another type when necessary.
224
 
217
 
225
 
218
 
226
-##Pre-Lab:
219
+## Pre-Lab:
227
 
220
 
228
 Before you get to the laboratory you should have:
221
 Before you get to the laboratory you should have:
229
 
222
 
274
 
267
 
275
 ![figura1.jpg](images/circuloAngulo01.png)
268
 ![figura1.jpg](images/circuloAngulo01.png)
276
 
269
 
277
-<b>Figure 1.</b> Circle of radius $r$ and centered at the origin.
270
+**Figure 1.** Circle of radius $r$ and centered at the origin.
278
 
271
 
279
 
272
 
280
 
273
 
293
 ---
286
 ---
294
 ---
287
 ---
295
 
288
 
296
-##Laboratory session:
289
+## Laboratory session:
297
 
290
 
298
-###Exercise 1
291
+### Exercise 1
299
 
292
 
300
 In this exercise you will plot the graphs of some parametric equations of interesting curves.
293
 In this exercise you will plot the graphs of some parametric equations of interesting curves.
301
 
294
 
302
 **Instructions**
295
 **Instructions**
303
 
296
 
304
-1. Double click the file `prettyPlot.pro` that is inside the `Documents/eip/Expressions-PrettyPlots` folder to load the project `prettyPlot` into Qt Creator. 
297
+1. Double click the file `prettyPlot.pro` that is inside the `Documents/eip/Expressions-PrettyPlots` folder to load the project `prettyPlot` into Qt Creator.
305
 You can also download the folder `Expressions-PrettyPlots` from  `http://bitbucket.org/eip-uprrp/expressions-prettyplots`.
298
 You can also download the folder `Expressions-PrettyPlots` from  `http://bitbucket.org/eip-uprrp/expressions-prettyplots`.
306
 
299
 
307
 2. Configure the project and run the program by clicking the green arrow in the menu on the left side of the Qt Creator window. The program should display a window similar to the one in Figure 3.
300
 2. Configure the project and run the program by clicking the green arrow in the menu on the left side of the Qt Creator window. The program should display a window similar to the one in Figure 3.
310
 
303
 
311
 	![figura3.png](images/segment01.png)
304
 	![figura3.png](images/segment01.png)
312
 
305
 
313
-	<b>Figure 3.</b> Line segment displayed by the program <i>PrettyPlot</i>.
314
-
315
-
306
+	**Figure 3.** Line segment displayed by the program <i>PrettyPlot</i>.
316
 
307
 
317
 	---
308
 	---
318
 
309
 
319
-3. The file `main.cpp` (in Sources) contains the function `main()` where you will be adding code. Open this file and study the code. 
310
+3. The file `main.cpp` (in Sources) contains the function `main()` where you will be adding code. Open this file and study the code.
320
 
311
 
321
     ```cpp
312
     ```cpp
322
     QApplication a(argc, argv);
313
     QApplication a(argc, argv);
324
     XYPlotWindow wCircle;
315
     XYPlotWindow wCircle;
325
     XYPlotWindow wHeart;
316
     XYPlotWindow wHeart;
326
     XYPlotWindow wButterfly;
317
     XYPlotWindow wButterfly;
327
-    
318
+
328
     double y = 0.00;
319
     double y = 0.00;
329
     double x = 0.00;
320
     double x = 0.00;
330
     double increment = 0.01;
321
     double increment = 0.01;
331
-    
332
-    for (double t = 0; t < 2*M_PI; t = t + increment) {      
322
+
323
+    for (double t = 0; t < 2*M_PI; t = t + increment) {
333
         // parametric equations
324
         // parametric equations
334
         x = t;
325
         x = t;
335
         y = t;
326
         y = t;
337
         // add x and y as a point in the graph
328
         // add x and y as a point in the graph
338
         wLine.AddPointToGraph(x,y);
329
         wLine.AddPointToGraph(x,y);
339
     }
330
     }
340
-    
331
+
341
     // After all the points have been added, plot and show the graph
332
     // After all the points have been added, plot and show the graph
342
     wLine.Plot();
333
     wLine.Plot();
343
     wLine.show();
334
     wLine.show();
347
 
338
 
348
 	The expressions for $x$ and $y$ are parametric equations for the line that passes through the origin and has the same value for $x$ and $y$. Explain why this line only goes from 0 to approximately 6.
339
 	The expressions for $x$ and $y$ are parametric equations for the line that passes through the origin and has the same value for $x$ and $y$. Explain why this line only goes from 0 to approximately 6.
349
 
340
 
350
-	
351
-
352
 4.	You will now write the code needed to plot a circle. The line `XYPlotWindow wCircle;` creates the object `wCircle`  for the window that will contain the plot of the circle. Using as inspiration the code that plotted the segment, write the necessary code for your program to graph a circle of radius 3 and centered at the origin. Run your program and, if it is necessary, modify the code until you get the right plot. Remember that the circle should be plotted inside the `wCircle` object. Thus, when you invoke the `AddPointToGraph(x,y)`, `Plot` and `show` methods, they should be preceeded by `wCircle`; e.g. `wCircle.show()`.
341
 4.	You will now write the code needed to plot a circle. The line `XYPlotWindow wCircle;` creates the object `wCircle`  for the window that will contain the plot of the circle. Using as inspiration the code that plotted the segment, write the necessary code for your program to graph a circle of radius 3 and centered at the origin. Run your program and, if it is necessary, modify the code until you get the right plot. Remember that the circle should be plotted inside the `wCircle` object. Thus, when you invoke the `AddPointToGraph(x,y)`, `Plot` and `show` methods, they should be preceeded by `wCircle`; e.g. `wCircle.show()`.
353
 
342
 
354
-
355
 5. Your next task is to plot a curve with the following parametric equations:
343
 5. Your next task is to plot a curve with the following parametric equations:
356
 
344
 
357
-
358
 	$$x=16 \sin^3(t)$$
345
 	$$x=16 \sin^3(t)$$
359
-	$$y=13 \cos(t) - 5 \cos(2t) - 2 \cos(3t) - \cos(4t)-3.$$
360
 
346
 
347
+	$$y=13 \cos(t) - 5 \cos(2t) - 2 \cos(3t) - \cos(4t)-3.$$
361
 
348
 
362
 	If you implement the equations correctly, you will see the image of a heart. This plot should be obtained inside an `XYPlotWindow` object called `wHeart`.
349
 	If you implement the equations correctly, you will see the image of a heart. This plot should be obtained inside an `XYPlotWindow` object called `wHeart`.
363
 
350
 
364
-	
365
-6.  You will now plot the curve of the following parametric equations:
366
 
351
 
352
+6.  You will now plot the curve of the following parametric equations:
367
 
353
 
368
 	$$x=5\cos(t) \left[ \sin^2(1.2t) + \cos^3(6t) \right]$$
354
 	$$x=5\cos(t) \left[ \sin^2(1.2t) + \cos^3(6t) \right]$$
369
-	$$y= 10\sin(t) \left[ \sin^2(1.2t) +  \cos^3(6t) \right].$$
370
 
355
 
356
+	$$y= 10\sin(t) \left[ \sin^2(1.2t) +  \cos^3(6t) \right].$$
371
 
357
 
372
 	Note that both expressions are almost the same, the only difference is that one starts  with $5\cos(t)$ and the other with $10\sin(t)$. Instead of computing $ \sin^2(1.2t) + \cos^3(6t)$ twice, you can assign its value to another variable $q$ and compute $x$ and $y$ as follows:
358
 	Note that both expressions are almost the same, the only difference is that one starts  with $5\cos(t)$ and the other with $10\sin(t)$. Instead of computing $ \sin^2(1.2t) + \cos^3(6t)$ twice, you can assign its value to another variable $q$ and compute $x$ and $y$ as follows:
373
 
359
 
374
-
375
 	$$q =  \sin^2(1.2t) + \cos^3(6t)$$
360
 	$$q =  \sin^2(1.2t) + \cos^3(6t)$$
361
+
376
 	$$x = 5 \cos(t)(q)$$
362
 	$$x = 5 \cos(t)(q)$$
377
-	$$y = 10  \sin(t)(q).$$
378
 
363
 
364
+	$$y = 10  \sin(t)(q).$$
379
 
365
 
380
 	Implement the above expressions,  change the condition for termination of the  `for` to   `t < 16*M_PI`, and look at the plot that it is displayed. It should look like a butterfly. This plot should be obtained inside an `XYPlotWindow` object called `wButterfly`.
366
 	Implement the above expressions,  change the condition for termination of the  `for` to   `t < 16*M_PI`, and look at the plot that it is displayed. It should look like a butterfly. This plot should be obtained inside an `XYPlotWindow` object called `wButterfly`.
381
 
367
 
382
 7. Use "Deliverable 1" in Moodle to submit the file  `main.cpp` containing the code with the parametric equations for the graphs of the circle, the heart, and the butterfly. Remember to use good programming practices, to include the names of the programmers and to document your program.
368
 7. Use "Deliverable 1" in Moodle to submit the file  `main.cpp` containing the code with the parametric equations for the graphs of the circle, the heart, and the butterfly. Remember to use good programming practices, to include the names of the programmers and to document your program.
383
 
369
 
384
-	
370
+
385
 
371
 
386
 In [2] and [3] you can find other parametric equations of interesting curves.
372
 In [2] and [3] you can find other parametric equations of interesting curves.
387
 
373
 
388
 
374
 
389
 
375
 
390
-###Exercise 2
376
+### Exercise 2
391
 
377
 
392
 In this exercise you will write a program to obtain a student's grade point average (GPA).
378
 In this exercise you will write a program to obtain a student's grade point average (GPA).
393
 
379
 
394
-Suppose that all courses in Cheo's University are 3 credits each and have the following point values: $A = 4$ points per credit; $B = 3$ points per credit; $C = 2$ points per credit; $D = 1$ point per credit y $F = 0$ points per credit. 
380
+Suppose that all courses in Cheo's University are 3 credits each and have the following point values: $A = 4$ points per credit; $B = 3$ points per credit; $C = 2$ points per credit; $D = 1$ point per credit y $F = 0$ points per credit.
395
 
381
 
396
 **Instructions**
382
 **Instructions**
397
 
383
 
399
 
385
 
400
 2. Your code should define the **constants**  $A=4, B=3, C=2, D=1, F=0$ for the points per credit, and ask the user to input the values for the variables  $NumA$, $NumB$, $NumC$, $NumD$, $NumF$. The variable $NumA$ represents the number of courses in which the student obtained A, $NumB$ represents the number of courses in which the student obtained B, etc. The program should display the GPA using the 0-4 point scale.
386
 2. Your code should define the **constants**  $A=4, B=3, C=2, D=1, F=0$ for the points per credit, and ask the user to input the values for the variables  $NumA$, $NumB$, $NumC$, $NumD$, $NumF$. The variable $NumA$ represents the number of courses in which the student obtained A, $NumB$ represents the number of courses in which the student obtained B, etc. The program should display the GPA using the 0-4 point scale.
401
 
387
 
402
-	**Hints:** 
388
+	**Hints:**
403
 
389
 
404
 	1. You can obtain the GPA by adding the credit points corresponding to the grades (for example, an A in a 3 credit course has a value of 12 points), and dividing this sum by the total number of credits.
390
 	1. You can obtain the GPA by adding the credit points corresponding to the grades (for example, an A in a 3 credit course has a value of 12 points), and dividing this sum by the total number of credits.
405
 
391
 
406
-
407
 	2. 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.
392
 	2. 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.
408
 
393
 
409
 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.
394
 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.
415
 ---
400
 ---
416
 ---
401
 ---
417
 
402
 
418
-##References:
403
+## References:
419
 
404
 
420
 [1] http://mathworld.wolfram.com/ParametricEquations.html
405
 [1] http://mathworld.wolfram.com/ParametricEquations.html
421
 
406