Browse Source

Rafa: moviendo los diags de sitio

Rafael Arce Nazario 8 years ago
parent
commit
a5f4696089
2 changed files with 21 additions and 24 deletions
  1. 11
    12
      README-en.md
  2. 10
    12
      README-es.md

+ 11
- 12
README-en.md View File

5
 ![rsz_mariposa.png](images/rsz_mariposa.png)
5
 ![rsz_mariposa.png](images/rsz_mariposa.png)
6
 
6
 
7
 
7
 
8
-[Verano 2016 - Ive]
8
+[Verano 2016 - Ive - Rafa]
9
 
9
 
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.
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
 
102
 !INCLUDE "../../eip-diagnostic/pretty-plots/en/diag-pretty-plots-04.html"
102
 !INCLUDE "../../eip-diagnostic/pretty-plots/en/diag-pretty-plots-04.html"
103
 <br>
103
 <br>
104
 
104
 
105
+!INCLUDE "../../eip-diagnostic/pretty-plots/en/diag-pretty-plots-05.html"
106
+<br>
107
+
108
+!INCLUDE "../../eip-diagnostic/pretty-plots/en/diag-pretty-plots-06.html"
109
+<br>
110
+
111
+!INCLUDE "../../eip-diagnostic/pretty-plots/en/diag-pretty-plots-07.html"
112
+<br>
105
 
113
 
106
 
114
 
107
 ---
115
 ---
134
 
142
 
135
 3. The file `main.cpp` (in Sources) contains the function `main()` where you will be adding code. Open this file and study the code.
143
 3. The file `main.cpp` (in Sources) contains the function `main()` where you will be adding code. Open this file and study the code.
136
 
144
 
145
+    ```cpp
137
         QApplication a(argc, argv);
146
         QApplication a(argc, argv);
138
         XYPlotWindow wLine;
147
         XYPlotWindow wLine;
139
         XYPlotWindow wCircle;
148
         XYPlotWindow wCircle;
156
         // After all the points have been added, plot and show the graph
165
         // After all the points have been added, plot and show the graph
157
         wLine.Plot();
166
         wLine.Plot();
158
         wLine.show();
167
         wLine.show();
168
+    ```
159
 
169
 
160
     The line  `XYPlotWindow wLine;` creates the object `wLine`, that is the window that will show the plot of a graph, in this case the graph of a segment. Look at the `for` loop. In this cycle several values for $$t$$ are generated and a value for $$x$$ and $$y$$ is computed for each $$t$$. Each ordered pair $$(x,y)$$ is added to the graph of the segment by the method `AddPointToGraph(x,y)`.  After the cycle, there is a call to the  method  `Plot()`, to "draw" the points on the graph, and to the method `show()`, to show the plot. The *methods* are functions that allow us to work with the data of an object. Note that each of the methods is written after `wLine`, and followed by a period. In a future laboratory experience you will learn more about objects and practice how to create them and invoke their methods.
170
     The line  `XYPlotWindow wLine;` creates the object `wLine`, that is the window that will show the plot of a graph, in this case the graph of a segment. Look at the `for` loop. In this cycle several values for $$t$$ are generated and a value for $$x$$ and $$y$$ is computed for each $$t$$. Each ordered pair $$(x,y)$$ is added to the graph of the segment by the method `AddPointToGraph(x,y)`.  After the cycle, there is a call to the  method  `Plot()`, to "draw" the points on the graph, and to the method `show()`, to show the plot. The *methods* are functions that allow us to work with the data of an object. Note that each of the methods is written after `wLine`, and followed by a period. In a future laboratory experience you will learn more about objects and practice how to create them and invoke their methods.
161
 
171
 
207
 	a. 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.
217
 	a. 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.
208
 
218
 
209
 	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.
219
 	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.
210
-
211
-	   ---
212
-	
213
-!INCLUDE "../../eip-diagnostic/pretty-plots/en/diag-pretty-plots-05.html"
214
-<br>
215
-
216
-!INCLUDE "../../eip-diagnostic/pretty-plots/en/diag-pretty-plots-06.html"
217
-<br>
218
-
219
-!INCLUDE "../../eip-diagnostic/pretty-plots/en/diag-pretty-plots-07.html"
220
-<br>
221
 	   
220
 	   
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.  
221
 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.  
223
 
222
 

+ 10
- 12
README-es.md View File

4
 ![rsz_mariposa1.png](images/rsz_mariposa1.png)
4
 ![rsz_mariposa1.png](images/rsz_mariposa1.png)
5
 ![rsz_mariposa.png](images/rsz_mariposa.png)
5
 ![rsz_mariposa.png](images/rsz_mariposa.png)
6
 
6
 
7
-[Verano 2016 - Ive]
7
+[Verano 2016 - Ive - Rafa]
8
 
8
 
9
 
9
 
10
 Las expresiones aritméticas son parte esencial de casi cualquier algoritmo que resuelve un problema útil. Por lo tanto, implementar expresiones aritméticas correctamente es una destreza básica en cualquier lenguaje de programación de computadoras. En esta experiencia de laboratorio practicarás la implementación de expresiones aritméticas en C++ escribiendo ecuaciones paramétricas para graficar curvas interesantes.
10
 Las expresiones aritméticas son parte esencial de casi cualquier algoritmo que resuelve un problema útil. Por lo tanto, implementar expresiones aritméticas correctamente es una destreza básica en cualquier lenguaje de programación de computadoras. En esta experiencia de laboratorio practicarás la implementación de expresiones aritméticas en C++ escribiendo ecuaciones paramétricas para graficar curvas interesantes.
98
 !INCLUDE "../../eip-diagnostic/pretty-plots/es/diag-pretty-plots-04.html"
98
 !INCLUDE "../../eip-diagnostic/pretty-plots/es/diag-pretty-plots-04.html"
99
 <br>
99
 <br>
100
 
100
 
101
+!INCLUDE "../../eip-diagnostic/pretty-plots/es/diag-pretty-plots-05.html"
102
+<br>
103
+!INCLUDE "../../eip-diagnostic/pretty-plots/es/diag-pretty-plots-06.html"
104
+<br>
105
+!INCLUDE "../../eip-diagnostic/pretty-plots/es/diag-pretty-plots-07.html"
106
+<br>
107
+
101
 
108
 
102
 ---
109
 ---
103
 
110
 
129
 
136
 
130
 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.
137
 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.
131
 
138
 
139
+    ```cpp
132
         QApplication a(argc, argv);
140
         QApplication a(argc, argv);
133
         XYPlotWindow wLine;
141
         XYPlotWindow wLine;
134
         XYPlotWindow wCircle;
142
         XYPlotWindow wCircle;
151
         // After all the points have been added, plot and show the graph
159
         // After all the points have been added, plot and show the graph
152
         wLine.Plot();
160
         wLine.Plot();
153
         wLine.show();
161
         wLine.show();
162
+    ```
154
 
163
 
155
     La línea `XYPlotWindow wLine;` crea el objeto `wLine` que será la ventana en donde se dibujará una gráfica, en este caso la gráfica de un segmento. Observa el ciclo `for`. En este ciclo se genera una serie de valores para $$t$$ y se computa un valor de $$x$$ y $$y$$ para cada valor de $$t$$. Cada par ordenado $$(x,y)$$  es añadido a la gráfica del segmento por el método `AddPointToGraph(x,y)`. Luego del ciclo se invoca el método `Plot()`, que "dibuja" los puntos, y el método `show()`, que muestra la gráfica. Los *métodos* son funciones que nos permiten trabajar con los datos de los objetos. Nota que cada uno de los métodos se escribe luego de `wLine`, seguido de un punto. En una experiencia de laboratorio posterior aprenderás más sobre objetos y practicarás cómo crearlos e invocar sus métodos.
164
     La línea `XYPlotWindow wLine;` crea el objeto `wLine` que será la ventana en donde se dibujará una gráfica, en este caso la gráfica de un segmento. Observa el ciclo `for`. En este ciclo se genera una serie de valores para $$t$$ y se computa un valor de $$x$$ y $$y$$ para cada valor de $$t$$. Cada par ordenado $$(x,y)$$  es añadido a la gráfica del segmento por el método `AddPointToGraph(x,y)`. Luego del ciclo se invoca el método `Plot()`, que "dibuja" los puntos, y el método `show()`, que muestra la gráfica. Los *métodos* son funciones que nos permiten trabajar con los datos de los objetos. Nota que cada uno de los métodos se escribe luego de `wLine`, seguido de un punto. En una experiencia de laboratorio posterior aprenderás más sobre objetos y practicarás cómo crearlos e invocar sus métodos.
156
 
165
 
201
 	a. 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.
210
 	a. 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.
202
 
211
 
203
 	b. 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.
212
 	b. 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.
204
-
205
-       ---
206
-    
207
-       !INCLUDE "../../eip-diagnostic/pretty-plots/es/diag-pretty-plots-05.html"
208
-       <br>
209
-       !INCLUDE "../../eip-diagnostic/pretty-plots/es/diag-pretty-plots-06.html"
210
-       <br>
211
-       !INCLUDE "../../eip-diagnostic/pretty-plots/es/diag-pretty-plots-07.html"
212
-       <br>
213
-       
214
-       ---
215
        
213
        
216
 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`. 
214
 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`. 
217
 
215