/home/oracle/labs/07ParallelStreams/examples/EmployeeSearch/src/com/example/lambda/A01OldStyleLoop.java
 1 package com.example.lambda;
 2 
 3 import java.util.List;
 4 
 5 /**
 6  *
 7  * @author oracle
 8  */
 9 public class A01OldStyleLoop {
10 
11     public static void main(String[] args) {
12         
13         List<Employee> eList = Employee.createShortList();
14         
15         double sum = 0;
16         
17         for(Employee e:eList){
18             if(e.getState().equals("CO") && 
19                 e.getRole().equals(Role.EXECUTIVE)){
20                 e.printSummary();
21                 sum += e.getSalary();
22             }
23         }
24         
25         System.out.printf("Total CO Executive Pay: $%,9.2f %n", sum);               
26     }
27     
28 }
29