-
Notifications
You must be signed in to change notification settings - Fork 0
/
Property.java
71 lines (57 loc) · 1.46 KB
/
Property.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
/**
* File: Lab4i.java
* Description: Build Java superclasses
* Build Java subclasses
* Overload methods with multiple signatures
* Build a project with 3 levels in the Inheritance Hierarchy
* Lessons Learned:
* Instructor's Name: Jeff Light
*
* @author Nayelly Zurita
* @since 02/01/2024
*/
package RealEstate;
abstract class Property {
//Attributes
private String StreetAddress;
private int Zip;
private double listPrice;
private double appraisalPrice;
//Constructors
Property() {
StreetAddress = "";
Zip = 0;
}
Property(String StreetAddress, int Zip) {
this.StreetAddress = StreetAddress;
this.Zip = Zip;
this.listPrice = 0.0;
this.appraisalPrice = 0.0;
}
//Methods
public String getStreetAddress() {
return StreetAddress;
}
public void setStreetAddress(String StreetAddress) {
this.StreetAddress = StreetAddress;
}
public int getZip() {
return Zip;
}
public void setZip(int Zip) {
this.Zip = Zip;
}
public double getListPrice() {
return listPrice;
}
public void setListPrice(double listPrice) {
this.listPrice = listPrice;
}
public double getAppraisalPrice() {
return appraisalPrice;
}
protected void setAppraisalPrice(double appraisalPrice) {
this.appraisalPrice = appraisalPrice;
}
public abstract double calculateAppraisalPrice();
}