-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathCleaningRequest.java
More file actions
58 lines (47 loc) · 1.5 KB
/
CleaningRequest.java
File metadata and controls
58 lines (47 loc) · 1.5 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
50
51
52
53
54
55
56
57
58
package org.codedifferently;
// CleaningRequest represents cleaning services for an apartment
public class CleaningRequest extends ServiceRequest {
// Area that needs cleaning
private String cleaningArea;
// Severity level of cleaning request
private int issueSeverity;
// Default constructor
public CleaningRequest() {
super();
}
// Constructor with parameters
public CleaningRequest(String tenantName, String apartmentNumber, String cleaningArea, int issueSeverity) {
super(tenantName, apartmentNumber);
this.cleaningArea = cleaningArea;
this.issueSeverity = issueSeverity;
}
// Overrides abstract method
@Override
public String getRequestType() {
return "Cleaning";
}
// Getter methods
public String getCleaningArea() {
return cleaningArea;
}
public int getIssueSeverity() {
return issueSeverity;
}
// Setter methods
public void setCleaningArea(String cleaningArea) {
this.cleaningArea = cleaningArea;
}
public void setIssueSeverity(int issueSeverity) {
this.issueSeverity = issueSeverity;
}
// Convert object into readable string
@Override
public String toString() {
return "Tenant: " + tenantName +
" | Apt: " + apartmentNumber +
" | Type: " + getRequestType() +
" | Area: " + cleaningArea +
" | Severity: " + issueSeverity +
" | Status: " + status;
}
}