forked from OpenClassrooms-Student-Center/Project_DA_Java_EN_Come_to_the_Rescue_of_a_Java_Application
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
20 lines (16 loc) · 847 Bytes
/
Copy pathMain.java
File metadata and controls
20 lines (16 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import com.hemebiotech.analytics.*;
import java.util.List;
import java.util.Map;
public class Main {
public static void main(String[] args) {
String inputPath = "Project02Eclipse/symptoms.txt";
String outputPath = "Project02Eclipse/result.out";
ISymptomReader reader = new ReadSymptomDataFromFile(inputPath);
ISymptomWriter writer = new WriteSymptomDataToFile(outputPath);
AnalyticsCounter analyticsCounter = new AnalyticsCounter(reader, writer);
List<String> symptoms = analyticsCounter.getSymptoms();
Map<String, Integer> symptomsAndOccurrences = analyticsCounter.countSymptoms(symptoms);
Map<String, Integer> sortedSymptomsAndOccurrences = analyticsCounter.sortSymptoms(symptomsAndOccurrences);
analyticsCounter.writeSymptoms(sortedSymptomsAndOccurrences);
}
}