|
@@ -4,9 +4,9 @@
|
4
|
4
|
![main2.png](images/main2.png)
|
5
|
5
|
![main3.png](images/main3.png)
|
6
|
6
|
|
7
|
|
-[Verano 2016 - Ive - Rafa - Ive]
|
|
7
|
+[Verano 2016 - Ive - Rafa - Ive- Tatiana]
|
8
|
8
|
|
9
|
|
-Arrays help us to store and work with groups of data of the same type. The data is stored in consecutive memory spaces which can be accessed by using the name of the array and indexes or subscripts that indicate the position where the data is stored. Repetition structures provide us a simple way of accessing the data within an array. In today's laboratory experience you will practice the use of counters and one dimensional arrays to implement a program in which you will use Benford’s Law to detect files with bogus data.
|
|
9
|
+Arrays help us to store and work with groups of data of the same type. The data is stored in consecutive memory spaces which can be accessed by using the name of the array and indexes or subscripts that indicate the position where the data is stored. Repetition structures provide us a simple way of accessing the data within an array. In today's laboratory experience, you will practice the use of counters and one dimensional arrays to implement a program in which you will use Benford’s Law to detect files with bogus data.
|
10
|
10
|
|
11
|
11
|
|
12
|
12
|
|
|
@@ -42,7 +42,7 @@ Before coming to the laboratory, you should have:
|
42
|
42
|
|
43
|
43
|
|
44
|
44
|
|
45
|
|
-As part of your new job as IT auditor you suspect that someone in the Chicago Transit Authority (CTA) has been tampering with the information systems and changing the data files that contain the bus route daily totals. You are given five text files that contain daily totals for each of the CTA’s bus routes and must determine if one or more of the files contain bogus data. In this laboratory experience you will implement a program that will help you determine which of the file(s) contain bogus data using Benford's Law, a property that is observed in many real-life sources of data.
|
|
45
|
+As part of your new job as IT auditor you suspect that someone in the Chicago Transit Authority (CTA) has been tampering with the information systems and changing the data files that contain the bus route daily totals. You are given five text files that contain daily totals for each of the CTA’s bus routes and you must determine if one or more of the files contain bogus data. In this laboratory experience, you will implement a program that will help you determine which of the file(s) contain bogus data using Benford's Law, a property that is observed in many real-life sources of data.
|
46
|
46
|
|
47
|
47
|
---
|
48
|
48
|
|
|
@@ -80,7 +80,7 @@ As you read each number $$n$$, you determine its leading digit (how to extract t
|
80
|
80
|
---
|
81
|
81
|
|
82
|
82
|
|
83
|
|
-Every time a leading digit `d` is found, the element with index `d` is incremented. For example, after reading the numbers `890`, `3412`, `234`, `143`, and `112`, the array content would be:
|
|
83
|
+Every time a leading digit `d` is found, the element with index `d` is incremented. For example, after reading the numbers `890`, `3412`, `234`, `143`, and `112`, the array content would be:
|
84
|
84
|
|
85
|
85
|
----
|
86
|
86
|
|
|
@@ -138,7 +138,7 @@ The **frequency of occurrence** is defined as the ratio of times that a digit ap
|
138
|
138
|
This laboratory experience requires you to read data from a text file. You can skip the next section if you feel that your file reading skills are competent. Otherwise, read on...
|
139
|
139
|
|
140
|
140
|
|
141
|
|
-C++ provides functions to read and write data to/from files. In this laboratory experience you will be using one of the most rudimentary file input/output schemes provided in C++ to read/write from **text** files. Text files consist exclusively of ASCII characters which represent data in any of the primitive types provided by C++. Typically, the values are separated by spaces. For instance lets asumme that the file `nameAge.txt` contains some data about names and ages.
|
|
141
|
+C++ provides functions to read and write data to/from files. In this laboratory experience, you will be using one of the most rudimentary file input/output schemes provided in C++ to read/write from **text** files. Text files consist exclusively of ASCII characters which represent data in any of the primitive types provided by C++. Typically, the values are separated by spaces. For instance, let's assume that the file `nameAge.txt` contains some data about names and ages.
|
142
|
142
|
|
143
|
143
|
```
|
144
|
144
|
Tomas 34
|
|
@@ -220,7 +220,7 @@ Here are some code snippets for common reading tasks. Observe that all of them:
|
220
|
220
|
inFile.open("nums.txt");
|
221
|
221
|
|
222
|
222
|
if (!inFile.is_open()) {
|
223
|
|
- cout << "Error openning file nums.txt\n";
|
|
223
|
+ cout << "Error opening file nums.txt\n";
|
224
|
224
|
exit(1);
|
225
|
225
|
}
|
226
|
226
|
|
|
@@ -243,7 +243,7 @@ Here are some code snippets for common reading tasks. Observe that all of them:
|
243
|
243
|
inFile.open("names.txt");
|
244
|
244
|
|
245
|
245
|
if (!inFile.is_open()) {
|
246
|
|
- cout << "Error openning file names.txt\n";
|
|
246
|
+ cout << "Error opening file names.txt\n";
|
247
|
247
|
exit(1);
|
248
|
248
|
}
|
249
|
249
|
|
|
@@ -321,4 +321,6 @@ In the provided code, notice that the data in the arrays `histoNames` and `histo
|
321
|
321
|
|
322
|
322
|
##References
|
323
|
323
|
|
324
|
|
-[1] http://www.isaca.org/Journal/archives/2011/Volume-3/Pages/Understanding-and-Applying-Benfords-Law.aspx
|
|
324
|
+[1] http://www.isaca.org/Journal/archives/2011/Volume-3/Pages/Understanding-and-Applying-Benfords-Law.aspx
|
|
325
|
+
|
|
326
|
+
|