-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProject.java
71 lines (50 loc) · 1.56 KB
/
Project.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
package task7;
public class Project {
//Attributes
private int projectNumber;
private String projectName;
private String projectType;
private String address;
private int erfNumber;
private String amountDue;
private String amountPaid;
private String dueDate;
// Getters and setters methods
public String getAmountPaid() {
return amountPaid;
}
public void setAmountPaid(String amountPaid) {
this.amountPaid = amountPaid;
}
public String getDueDate() {
return dueDate;
}
public void setDueDate(String dueDate) {
this.dueDate = dueDate;
}
public Project(int projectNumber, String projectName, String projectType, String address, int erfNumber,
String amountDue, String amountPaid, String dueDate) {
super();
this.projectNumber = projectNumber;
this.projectName = projectName;
this.projectType = projectType;
this.address = address;
this.erfNumber = erfNumber;
this.amountDue = amountDue;
setAmountPaid(amountPaid);
setDueDate(dueDate);
}
// Converts all variables to strings and outputs in a formal manner
public String toString ()
{
String output = "Project number: " + projectNumber;
output += "\nProject name: " + projectName;
output += "\nProject type: " + projectType;
output += "\nAddress: " + address;
output += "\nERF number: " + erfNumber;
output += "\nTotal amount due: " + amountDue;
output += "\nTotal amount paid to date: " + getAmountPaid();
output += "\n Due date of the project: " + getDueDate();
return output;
}
}