-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProject.java
More file actions
46 lines (39 loc) · 996 Bytes
/
Copy pathProject.java
File metadata and controls
46 lines (39 loc) · 996 Bytes
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
public class Project{
private String name;
private String description;
private double initialCost;
// get and set name
public String getName(){
return name;
}
public void setName(String name){
this.name = name;
}
// get and set description
public String getDesc(){
return description;
}
public void setDesc(String desc){
this.description = desc;
}
// get and set initialCost
public double getInitialCost(){
return initialCost;
}
public void setInitialCost(double cost){
this.initialCost = cost;
}
// cunstructors
public Project(){
}
public Project(String name) {
this.name = name;
}
public Project(String name, String description) {
this.name = name;
this.description = description;
}
public void elevatorPitch(){
System.out.println(name + " " + "(" + initialCost + ")" + ": " + description);
}
}