|
@@ -7,18 +7,18 @@ |
7 |
7 |
|
public class Owner implements Serializable { |
8 |
8 |
|
|
9 |
9 |
|
private String bankAccount = ""; |
10 |
|
- |
private String name=""; |
|
10 |
+ |
private String name = ""; |
11 |
11 |
|
private Vector<RuralHouse> ruralHouses; |
12 |
12 |
|
|
13 |
13 |
|
public Owner(String name) { |
14 |
|
- |
this.name=name; |
15 |
|
- |
ruralHouses=new Vector<RuralHouse>(); |
|
14 |
+ |
this.name = name; |
|
15 |
+ |
ruralHouses = new Vector<RuralHouse>(); |
16 |
16 |
|
} |
17 |
17 |
|
|
18 |
18 |
|
public Owner(String name, String bankAccount) { |
19 |
|
- |
this.bankAccount=bankAccount; |
20 |
|
- |
this.name=name; |
21 |
|
- |
ruralHouses=new Vector<RuralHouse>(); |
|
19 |
+ |
this.bankAccount = bankAccount; |
|
20 |
+ |
this.name = name; |
|
21 |
+ |
ruralHouses = new Vector<RuralHouse>(); |
22 |
22 |
|
} |
23 |
23 |
|
|
24 |
24 |
|
public String getName() { |
|
@@ -41,13 +41,24 @@ |
41 |
41 |
|
return ruralHouses; |
42 |
42 |
|
} |
43 |
43 |
|
|
44 |
|
- |
public RuralHouse addRuralHouse(int houseNumber, String description, String city) { |
45 |
|
- |
RuralHouse rh=new RuralHouse(houseNumber, this, description, city); |
|
44 |
+ |
public RuralHouse addRuralHouse(int houseNumber, String town, int nRooms, |
|
45 |
+ |
int nKitchens, int nBaths, int nLivings, int nParkings) { |
|
46 |
+ |
RuralHouse rh = new RuralHouse(houseNumber, this, town, nRooms, |
|
47 |
+ |
nKitchens, nBaths, nLivings, nParkings); |
|
48 |
+ |
ruralHouses.add(rh); |
|
49 |
+ |
return rh; |
|
50 |
+ |
} |
|
51 |
+ |
|
|
52 |
+ |
public RuralHouse addRuralHouse(int houseNumber, String description, |
|
53 |
+ |
String town, int nRooms, int nKitchens, int nBaths, int nLivings, |
|
54 |
+ |
int nParkings) { |
|
55 |
+ |
RuralHouse rh = new RuralHouse(houseNumber, this, description, town, |
|
56 |
+ |
nRooms, nKitchens, nBaths, nLivings, nParkings); |
46 |
57 |
|
ruralHouses.add(rh); |
47 |
58 |
|
return rh; |
48 |
59 |
|
} |
49 |
|
- |
|
50 |
|
- |
public String toString(){ |
|
60 |
+ |
|
|
61 |
+ |
public String toString() { |
51 |
62 |
|
return name; |
52 |
63 |
|
} |
53 |
64 |
|
|