Git Repository Public Repository

RRRRHHHH_Code

URLs

Copy to Clipboard

Diff Revisions 25898b ... vs 85d983 ... 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,25 +13,29 @@
13 13 private Date bookingDate;
14 14 private Client client;
15 15 private Offer offer;
16 -
17 -
18 - public Booking() {
16 +
17 + public Booking(int bN, Offer offer, Client client, Date date) {
18 + this.bookingNumber = bN;
19 + this.offer = offer;
20 + this.client = client;
21 + // Booking date is assigned to actual date
22 + this.bookingDate = date;
19 23 }
20 24
21 - public Booking(int bN , Offer offer,Client client) {
22 -
25 + public Booking(int bN, Offer offer, Client client) {
26 +
23 27 this.bookingNumber = bN;
24 28 this.offer = offer;
25 - this.client=client;
26 - //Booking date is assigned to actual date
27 - this.bookingDate= new java.util.Date(System.currentTimeMillis());
29 + this.client = client;
30 + // Booking date is assigned to actual date
31 + this.bookingDate = new java.util.Date(System.currentTimeMillis());
28 32 }
29 -
30 - public void imprimete(){
33 +
34 + public void imprimete() {
31 35 System.out.println(bookingNumber);
32 36 System.out.println(bookingDate);
33 37 System.out.println(client.toString());
34 - System.out.println(offer);
38 + System.out.println(offer);
35 39 }
36 40
37 41 public int getBookNumber() {
  @@ -49,7 +53,7 @@
49 53 public float getPrice() {
50 54 return this.offer.getPrice();
51 55 }
52 -
56 +
53 57 public void setBookDate(Date bookDate) {
54 58 this.bookingDate = bookDate;
55 59 }
  @@ -57,7 +61,7 @@
57 61 public Date getBookDate() {
58 62 return this.bookingDate;
59 63 }
60 -
64 +
61 65 public Client getClient() {
62 66 return client;
63 67 }
  @@ -65,5 +69,5 @@
65 69 public void setClient(Client client) {
66 70 this.client = client;
67 71 }
68 -
72 +
69 73 }