Merge conflicts solutioned
[RRRRHHHH_Code] / ruralHouses / src / domain / Booking.java
index 64a3152..0f72a6c 100644 (file)
@@ -1,27 +1,29 @@
 package domain;
 
-import java.io.*;
+import java.io.Serializable;
 import java.util.Date;
 
-import businessLogic.BookingManager;
+public class Booking implements Serializable  {
 
-@SuppressWarnings("serial")
-public class Booking implements Serializable {
+       /**
+        * 
+        */
+       private static final long serialVersionUID = 1L;
        private int bookingNumber;
        private boolean isPaid;
        private Date bookingDate;
-       private String telephone;
+       private Client client;
        private Offer offer;
        
+       
        public Booking() {
        }
 
-       public Booking(String telephone, Offer offer) {
+       public Booking(int bN , Offer offer,Client client) {
                
-               this.bookingNumber = BookingManager.getNumber();
-               this.telephone=telephone;
+               this.bookingNumber = bN;
                this.offer = offer;
-               //this.price = price;
+               this.client=client;
                //Booking date is assigned to actual date
                this.bookingDate= new java.util.Date(System.currentTimeMillis());
                this.isPaid=false;
@@ -31,8 +33,8 @@ public class Booking implements Serializable {
                System.out.println(bookingNumber);
                System.out.println(isPaid);
                System.out.println(bookingDate);
-               System.out.println(telephone);
-               System.out.println(offer);              
+               System.out.println(client.toString());
+               System.out.println(offer);      
        }
 
        public int getBookNumber() {
@@ -59,14 +61,6 @@ public class Booking implements Serializable {
                return this.bookingDate;
        }
        
-       public void setTelephone(String telephone) {
-               this.telephone = telephone;
-       }
-
-       public String getTelephone() {
-               return this.telephone;
-       }
-       
        public void paid() {
                this.isPaid = true;
        }
@@ -79,4 +73,14 @@ public class Booking implements Serializable {
                return isPaid;
        }
        
+
+
+       public Client getClient() {
+               return client;
+       }
+
+       public void setClient(Client client) {
+               this.client = client;
+       }
+       
 }
\ No newline at end of file