deleted aplicationFacade and imported it's functions to specific business logics.
[RRRRHHHH_Code] / ruralHouses / src / gui / BookRuralHouseGUI.java
index 705b351..8e6d7b5 100644 (file)
@@ -1,6 +1,7 @@
 package gui;
 
-import businessLogic.ApplicationFacadeInterface;
+import businessLogic.BookingManager;
+import businessLogic.HouseManager;
 
 import com.toedter.calendar.*;
 
@@ -94,8 +95,8 @@ public BookRuralHouseGUI()
     this.setSize(new Dimension(410, 413));
     this.setTitle("Book Rural House");
     jLabel1.setText("Rural house:");
-    ApplicationFacadeInterface facade=StartWindow.getBusinessLogic();
-       ruralHouses=facade.getAllRuralHouses();
+    HouseManager houseM = new HouseManager();
+       ruralHouses=houseM.getAllRuralHouses();
 
        jComboBox1 = new JComboBox(ruralHouses);
 
@@ -159,9 +160,9 @@ public BookRuralHouseGUI()
                try {
                                
                        //Obtain the business logic from a StartWindow class (local or remote)
-                       ApplicationFacadeInterface facade=StartWindow.getBusinessLogic();
+                       BookingManager bookingM = new BookingManager();
                                                
-                       Booking book=facade.createBooking(house, firstDay, lastDay, telephone);
+                       Booking book=bookingM.createBooking(house, firstDay, lastDay, telephone);
                                if (book!=null) {
                                BookRuralHouseConfirmationWindow confirmWindow=new BookRuralHouseConfirmationWindow(book);
                                confirmWindow.setVisible(true);