Possibility of registering new owners added
[RRRRHHHH_Code] / ruralHouses / src / domain / Booking.java
index fd72de6..40638c7 100644 (file)
@@ -8,7 +8,7 @@ public class Booking implements Serializable {
        private int bookingNumber;
        private boolean isPaid;
        private Date bookingDate;
-       private String telephone;
+       private Client client;
        private Offer offer;
        private boolean isAccepted;
        
@@ -16,12 +16,11 @@ public class Booking implements Serializable {
        public Booking() {
        }
 
-       public Booking(int bN ,String telephone, Offer offer) {
+       public Booking(int bN , Offer offer,Client client) {
                
                this.bookingNumber = bN;
-               this.telephone=telephone;
                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;
@@ -32,7 +31,7 @@ public class Booking implements Serializable {
                System.out.println(bookingNumber);
                System.out.println(isPaid);
                System.out.println(bookingDate);
-               System.out.println(telephone);
+               System.out.println(client.toString());
                System.out.println(offer);              
                System.out.println(this.isAccepted);    
        }
@@ -61,14 +60,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;
        }
@@ -84,5 +75,13 @@ public class Booking implements Serializable {
        public boolean isAccepted(){
                return this.isAccepted;
        }
+
+       public Client getClient() {
+               return client;
+       }
+
+       public void setClient(Client client) {
+               this.client = client;
+       }
        
 }
\ No newline at end of file