RRRRHHHH_Code
Diff Revisions
0f75b2 ...
vs
7bf57b ...
for ruralHouses/src/domain/Booking.java
|
@@ -8,7 +8,7 @@ |
8 |
8 |
|
private int bookingNumber; |
9 |
9 |
|
private boolean isPaid; |
10 |
10 |
|
private Date bookingDate; |
11 |
|
- |
private String telephone; |
|
11 |
+ |
private Client client; |
12 |
12 |
|
private Offer offer; |
13 |
13 |
|
private boolean isAccepted; |
14 |
14 |
|
|
|
@@ -16,12 +16,11 @@ |
16 |
16 |
|
public Booking() { |
17 |
17 |
|
} |
18 |
18 |
|
|
19 |
|
- |
public Booking(int bN ,String telephone, Offer offer) { |
|
19 |
+ |
public Booking(int bN , Offer offer,Client client) { |
20 |
20 |
|
|
21 |
21 |
|
this.bookingNumber = bN; |
22 |
|
- |
this.telephone=telephone; |
23 |
22 |
|
this.offer = offer; |
24 |
|
- |
//this.price = price; |
|
23 |
+ |
this.client=client; |
25 |
24 |
|
//Booking date is assigned to actual date |
26 |
25 |
|
this.bookingDate= new java.util.Date(System.currentTimeMillis()); |
27 |
26 |
|
this.isPaid=false; |
|
@@ -32,7 +31,7 @@ |
32 |
31 |
|
System.out.println(bookingNumber); |
33 |
32 |
|
System.out.println(isPaid); |
34 |
33 |
|
System.out.println(bookingDate); |
35 |
|
- |
System.out.println(telephone); |
|
34 |
+ |
System.out.println(client.toString()); |
36 |
35 |
|
System.out.println(offer); |
37 |
36 |
|
System.out.println(this.isAccepted); |
38 |
37 |
|
} |
|
@@ -61,14 +60,6 @@ |
61 |
60 |
|
return this.bookingDate; |
62 |
61 |
|
} |
63 |
62 |
|
|
64 |
|
- |
public void setTelephone(String telephone) { |
65 |
|
- |
this.telephone = telephone; |
66 |
|
- |
} |
67 |
|
- |
|
68 |
|
- |
public String getTelephone() { |
69 |
|
- |
return this.telephone; |
70 |
|
- |
} |
71 |
|
- |
|
72 |
63 |
|
public void paid() { |
73 |
64 |
|
this.isPaid = true; |
74 |
65 |
|
} |
|
@@ -84,5 +75,13 @@ |
84 |
75 |
|
public boolean isAccepted(){ |
85 |
76 |
|
return this.isAccepted; |
86 |
77 |
|
} |
|
78 |
+ |
|
|
79 |
+ |
public Client getClient() { |
|
80 |
+ |
return client; |
|
81 |
+ |
} |
|
82 |
+ |
|
|
83 |
+ |
public void setClient(Client client) { |
|
84 |
+ |
this.client = client; |
|
85 |
+ |
} |
87 |
86 |
|
|
88 |
87 |
|
} |