/Users/johnr/Desktop/IA_14_-_Stage_P_Upload_all_2021-04-08/USEmbassyIA 2 Nirvan - Final/src/usembassyia/Courier.java
 1 /*
 2  * To change this license header, choose License Headers in Project Properties.
 3  * To change this template file, choose Tools | Templates
 4  * and open the template in the editor.
 5  */
 6 package usembassyia;
 7 import java.time.LocalTime;
 8 
 9 
10 /**
11  *
12  * @author 21293
13  */
14 public class Courier extends Employee {
15   boolean fitToFly;
16    public Destination[] allDestinations = new Destination[4];
17    public static int nextDestinationIndex = 0;
18    //Courier[] courierArray = new Courier[10];
19    int dateTenured = -999;
20   
21   
22    
23    
24    public Courier(){        
25        for(int i =0; i < allDestinations.length; i++){
26            allDestinations[i] = new Destination();
27            allDestinations[i].setName("Not Set Yet");
28            allDestinations[i].setCounter(0);
29            //allDestinations[i].setHasVisa(false);
30        }
31        allDestinations[0].setName("JAK");
32        allDestinations[1].setName("BKK");
33        allDestinations[2].setName("LEN");
34        allDestinations[3].setName("BAN");
35        allDestinations[0].setFrequencyOfPostService(2);
36        allDestinations[1].setFrequencyOfPostService(3);
37        allDestinations[2].setFrequencyOfPostService(1);
38        allDestinations[3].setFrequencyOfPostService(4);
39    }
40    public Courier(String name, int securityClearance, boolean fitToFly, boolean hasVisa){
41        super(name, securityClearance);
42       
43        this.fitToFly = fitToFly;
44        
45        
46       
47         
48     }
49    public boolean getFitToFly(){
50        return fitToFly;
51    }
52    
53    public int getCounter(int destinationIndex){
54        return allDestinations[destinationIndex].counter;
55    }
56    public int getDateTenured(){
57        return dateTenured;
58    }
59    public void setFitToFly(){
60        this.fitToFly = fitToFly;
61        
62    }
63    
64    public void setDateTenured(int dateTenured){
65        this.dateTenured = dateTenured;
66    }
67    
68   
69   
70    
71    
72     
73     
74 }
75