-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJobList.java
118 lines (102 loc) · 2.31 KB
/
JobList.java
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/*
* Salwa Abdalla
* ICS3U Culminating Assignment: 1/21/2019
* Jeff Radulovic
*
* The JobList is a class to hold the jobs available in my country
* and it holds the getters and setter for the characteristics
*
*/
public class JobList {
private String JobTitle;
private String Location;
private String Rank;
private boolean Availability;
private double Wage;
private String[] Requirements;
/**
* @return constructor for creating an instance of Job Occupation
*/
public JobList(String JobTitles, String Location, String Rank, boolean Availability, double Wage, String Requirements) {
this.JobTitle = JobTitles;
this.Location = Location;
this.Rank = Rank;
this.Availability = Availability;
this.Wage = Wage;
this.Requirements = Requirements.split(" ");
}
/**
* @param Rank
* @return true or false depending on access of job due to rank
*/
public boolean filterJobList(String Rank){
if (Rank == this.Rank)
return true;
else
return false;
}
/**
* @return the jobTitle
*/
public String getJobTitle() {
return JobTitle;
}
/**
* @return the location
*/
public String getLocation() {
return Location;
}
/**
* @return the rank
*/
public String getRank() {
return Rank;
}
/**
* @return the availability
*/
public boolean isAvailable() {
return Availability;
}
/**
* @return the wage
*/
public double getWage() {
return Wage;
}
/**
* @return the requirements
*/
public String[] getRequirements() {
return Requirements;
}
/**
* @param rank
* Sets the rank
*/
public void setRank(String rank) {
Rank = rank;
}
/**
* @param availability
* Sets the availability
*/
public void setAvailability(boolean availability) {
Availability = availability;
}
/**
* @return a specific format for the Occupation to be printed
*/
public String toString() {
String result = "Job Title : " + JobTitle;
result += " \n Location: " + Location;
result += " \n Minimum Rank: " + Rank;
result += " \n Availability: " + Availability;
result += " \n Wage: $" + Wage;
result += " \n Requirements: ";
for (int i = 0; i < Requirements.length; i++)
result += Requirements[i] + " ";
return result;
}
}