-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProject.java
More file actions
53 lines (48 loc) · 1.93 KB
/
Project.java
File metadata and controls
53 lines (48 loc) · 1.93 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
/**
* This class is used to create project objects that store information about
* construction projects.
*
* @author Cherol Phoshoko
* @version 16.0.2, 2021-09-09
*/
public class Project {
// project instance variables
String projectName;
String buildingType;
String buildingAddress;
String erfNum;
String deadline;
double totalFee;
double totalPaid;
/**
* Project constructor. <br>
*
* @param projectName String contains name of the project
* @param buildingType String determines what type of project it is i.e.
* Apartment, house etc.
* @param buildingAddress String contains address for the construction
* @param erfNum String contains ERF number for the building /
* construction location
* @param deadline String contains deadline to complete project
* @param totalFee Double contains overall project fee
* @param totalPaid Double contains amount paid by the client
*/
public Project(String projectName, String buildingType, String buildingAddress, String erfNum, String deadline,
double totalFee, double totalPaid) {
this.projectName = projectName;
this.buildingType = buildingType;
this.buildingAddress = buildingAddress;
this.deadline = deadline;
this.erfNum = erfNum;
this.totalFee = totalFee;
this.totalPaid = totalPaid;
}
/**
* @return Properly formatted project details
*/
public String projectDetails() {
return "Project: " + projectName + "\nBuilding Type: " + buildingType + "\nBuilding Address: " + buildingAddress
+ "\nERF number: " + erfNum + "\nProject deadline: " + deadline + "\n\nTotal Project fee: R" + totalFee
+ "\nTotal amount paid to date: R" + totalPaid;
}
}