-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathManagerReport.java
More file actions
49 lines (41 loc) · 1.88 KB
/
ManagerReport.java
File metadata and controls
49 lines (41 loc) · 1.88 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package src;
import java.util.Iterator;
import java.util.Map;
/**
* The Manager Report class creates a summary report for the manager
* to look at when requested
*
* @author Jacob Carney
* @version 1.0
*/
public class ManagerReport {
/**
* Prints the summary report for the manager to look at. This prints data about the provider and what
* the provider has completed with members
*/
public static void printSummaryReport() {
//int consultations;
//int totalFee;
System.out.println("\n---------Summary Report---------");
Iterator<Map.Entry<Integer,Provider>> mapIterator = ProviderFiles.providerMap.entrySet().iterator();
int totalConsults = 0;
double totalFee = 0.0;
while (mapIterator.hasNext()) {
Map.Entry<Integer, Provider> mapElement = (Map.Entry<Integer, Provider>)mapIterator.next();
Provider curProvider = mapElement.getValue();
System.out.println("Provider name: " + curProvider.name);
//System.out.println("Provider number: " + curProvider.accNumber);
//System.out.println("Provider street address: " + curProvider.address);
//System.out.println("Provider city: " + curProvider.city);
//System.out.println("Provider state: " + curProvider.state);
//System.out.println("Provider zip code: " + curProvider.zipCode);
//fix: print provider service list here
System.out.println("Number of consultations: " + curProvider.numberOfConsultations);
System.out.println("Weekly fee: " + curProvider.fee + "\n");
totalConsults += curProvider.numberOfConsultations;
totalFee += curProvider.fee;
}
System.out.println("Total number of consultations: " + totalConsults);
System.out.println("Total fee for week: " + totalFee + "\n");
}
}