Booking deletion fixed some minor problems remain
[RRRRHHHH_Code] / ruralHouses / src / domain / Booking.java
index cdde621..60cfd2f 100644 (file)
@@ -3,7 +3,7 @@ package domain;
 import java.io.Serializable;
 import java.util.Date;
 
-public class Booking implements Serializable  {
+public class Booking implements Serializable {
 
        /**
         * 
@@ -13,25 +13,29 @@ public class Booking implements Serializable  {
        private Date bookingDate;
        private Client client;
        private Offer offer;
-       
-       
-       public Booking() {
+
+       public Booking(int bN, Offer offer, Client client, Date date) {
+               this.bookingNumber = bN;
+               this.offer = offer;
+               this.client = client;
+               // Booking date is assigned to actual date
+               this.bookingDate = date;
        }
 
-       public Booking(int bN , Offer offer,Client client) {
-               
+       public Booking(int bN, Offer offer, Client client) {
+
                this.bookingNumber = bN;
                this.offer = offer;
-               this.client=client;
-               //Booking date is assigned to actual date
-               this.bookingDate= new java.util.Date(System.currentTimeMillis());
+               this.client = client;
+               // Booking date is assigned to actual date
+               this.bookingDate = new java.util.Date(System.currentTimeMillis());
        }
-       
-       public void imprimete(){
+
+       public void imprimete() {
                System.out.println(bookingNumber);
                System.out.println(bookingDate);
                System.out.println(client.toString());
-               System.out.println(offer);      
+               System.out.println(offer);
        }
 
        public int getBookNumber() {
@@ -49,7 +53,7 @@ public class Booking implements Serializable  {
        public float getPrice() {
                return this.offer.getPrice();
        }
-       
+
        public void setBookDate(Date bookDate) {
                this.bookingDate = bookDate;
        }
@@ -57,7 +61,7 @@ public class Booking implements Serializable  {
        public Date getBookDate() {
                return this.bookingDate;
        }
-       
+
        public Client getClient() {
                return client;
        }
@@ -65,5 +69,5 @@ public class Booking implements Serializable  {
        public void setClient(Client client) {
                this.client = client;
        }
-       
+
 }
\ No newline at end of file