forked from epeguero8311/Team-Green
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdriver.java
More file actions
34 lines (25 loc) · 1.86 KB
/
driver.java
File metadata and controls
34 lines (25 loc) · 1.86 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
import java.util.Scanner;
public class driver {
public static void main(String[] args) {
// First 6 tasks to be completed:
// SWE will be completing (2, 4, 6) and the tester will be completing (1, 3, 5)
// 1. Write code that stores the first N records of the dataset in some custom object.
// # Create a file that has one class that represents the record
// # In the driver, read the data from insurance.cvs file and store it in a list of objects
// 2. Write code that calculates the count, mean, std, min, percentiles (25%, 50%, 75%)
// and max of the age, bmi, children, and charges attributes.
// # Create another file that has all the functions that handle these calculations
// 3. Write code that displays a horizontal text-based histogram of the ages. Remember, you can't use any plotting libraries.
// 4. Write code that displays a vertical text-based histogram of the bmi. Remember, you can't use any plotting libraries.
// # I think #3 and #4 should all be in one graphing file
// 5. Write code that determines the total number of records for each number of children.
// # This should be in the calculations file
// # maybe a total function that returns a dictionary with the number of children as the key
// # and the total number of records as the value
// 6. Write code that displays a vertical text-based histogram showing the number of smokers and the number of non-smokers.
// # I think this will just be a function call in the driver that calls a function in the graphing file
// # with the number of smokers and non-smokers as arguments.
System.out.println("Calculations:");
Calculations.readCSV("insurance.csv");
}
}