Git Repository Public Repository

RRRRHHHH_Code

URLs

Copy to Clipboard

Diff Revisions e3043c ... vs b09f34 ... for ruralHouses/src/domain/Booking.java

Diff revisions: vs.
  @@ -3,7 +3,7 @@
3 3 import java.io.Serializable;
4 4 import java.util.Date;
5 5
6 - public class Booking implements Serializable {
6 + public class Booking implements Serializable {
7 7
8 8 /**
9 9 *
  @@ -13,30 +13,25 @@
13 13 private Date bookingDate;
14 14 private Client client;
15 15 private Offer offer;
16 -
17 - public Booking(int bN, Offer offer, Client client, Date date) {
16 +
17 +
18 +
19 + public Booking(int bN , Offer offer,Client client) {
20 +
18 21 this.bookingNumber = bN;
19 22 this.offer = offer;
20 - this.client = client;
21 - // Booking date is assigned to actual date
22 - this.bookingDate = date;
23 + this.client=client;
24 + //Booking date is assigned to actual date
25 + this.bookingDate= new java.util.Date(System.currentTimeMillis());
23 26 }
27 +
24 28
25 - public Booking(int bN, Offer offer, Client client) {
26 -
29 + public Booking(int bN , Offer offer,Client client, Date bookDate) {
27 30 this.bookingNumber = bN;
28 31 this.offer = offer;
29 - this.client = client;
30 - // Booking date is assigned to actual date
31 - this.bookingDate = new java.util.Date(System.currentTimeMillis());
32 - }
32 + this.client=client;
33 + this.bookingDate= bookDate; }
33 34
34 - public void imprimete() {
35 - System.out.println(bookingNumber);
36 - System.out.println(bookingDate);
37 - System.out.println(client.toString());
38 - System.out.println(offer);
39 - }
40 35
41 36 public int getBookNumber() {
42 37 return this.bookingNumber;
  @@ -50,9 +45,6 @@
50 45 return this.offer;
51 46 }
52 47
53 - public float getPrice() {
54 - return this.offer.getPrice();
55 - }
56 48
57 49 public void setBookDate(Date bookDate) {
58 50 this.bookingDate = bookDate;
  @@ -61,7 +53,7 @@
61 53 public Date getBookDate() {
62 54 return this.bookingDate;
63 55 }
64 -
56 +
65 57 public Client getClient() {
66 58 return client;
67 59 }
  @@ -69,5 +61,5 @@
69 61 public void setClient(Client client) {
70 62 this.client = client;
71 63 }
72 -
64 +
73 65 }