forked from Vidhee1411/Internship-Application
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEmployer.java
87 lines (78 loc) · 3.07 KB
/
Employer.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
import java.util.UUID;
/**
* The Employer class creates a employer account in the internship system.
* @author Vidhee Patel and Joshua DuPuis
*/
public class Employer extends User {
private CompanyProfile associatedCompany;
private static final int PERMISSION = 1;
/**
* The Employer constructor for loading data creates an employer object
* and sets each of the parameters equal to the User class' same name
* instance variables.
* @param firstName The first name of the employer
* @param lastName The last name of the employer
* @param email The employer's email address
* @param password The employer's password
*/
public Employer(String firstName, String lastName, String email, String password) {
super(firstName, lastName, email, password);
}
/**
* This Employer constructor functions the same way as the one above,
* and also allows for specification of a company the employer associates
* with and a UUID identifier.
* @param firstName The first name of the employer
* @param lastName The last name of the employer
* @param email The email of the employer
* @param password The employer's password
* @param associatedCompany The company the employer associates with
* @param id The UUID of the employer
*/
public Employer(String firstName, String lastName, String email, String password, CompanyProfile associatedCompany,UUID id) {
super(firstName, lastName, email, password, id);
this.associatedCompany = associatedCompany;
}
/**
* The associateCompany method allows an employer to associate with a
* company and their profile
* @param company The company the employer associates with
*/
public void associateCompany(CompanyProfile company) {
this.associatedCompany = company;
}
/**
* The reviewStudent method allows an employer to create a review about a
* student and post it on the student's page.
* @param rating The rating out of 10 they give the student
* @param comment The description of the review
* @param student The student the employer is reviewing
*/
public void reviewStudent(int rating, String comment, Student student) {
Review review = new Review (this.firstName, this.lastName, rating, comment);
student.addReview(review);
}
/**
* The getUUID method returns the UUID of the employer.
* @return The UUID of the employer
*/
public UUID getUUID() {
return super.getUserUUID();
}
/**
* The getCompany method returns the CompanyProfile that the employer
* associates with.
* @return The CompanyProfile associated with the employer
*/
public CompanyProfile getCompany() {
return this.associatedCompany;
}
/**
* The getPermission method returns the permission value for an employer
* @return An int containing the value 1 - an employer user's permission
* value
*/
public int getPermission() {
return PERMISSION;
}
}