House Features added and logic for adding options to the owner
[RRRRHHHH_Code] / ruralHouses / src / domain / Owner.java
index 9a34067..35b0296 100644 (file)
@@ -43,8 +43,8 @@ public class Owner implements Serializable {
 
        public RuralHouse addRuralHouse(int houseNumber, String town, int nRooms,
                        int nKitchens, int nBaths, int nLivings, int nParkings) {
-               RuralHouse rh = new RuralHouse(houseNumber, this, town, nRooms,
-                               nKitchens, nBaths, nLivings, nParkings);
+               HouseFeatures feature = new HouseFeatures(nRooms, nKitchens, nBaths, nLivings, nParkings);
+               RuralHouse rh = new RuralHouse(houseNumber, this, town,feature);
                ruralHouses.add(rh);
                return rh;
        }
@@ -52,8 +52,8 @@ public class Owner implements Serializable {
        public RuralHouse addRuralHouse(int houseNumber, String description,
                        String town, int nRooms, int nKitchens, int nBaths, int nLivings,
                        int nParkings) {
-               RuralHouse rh = new RuralHouse(houseNumber, this, description, town,
-                               nRooms, nKitchens, nBaths, nLivings, nParkings);
+               HouseFeatures feature = new HouseFeatures(nRooms, nKitchens, nBaths, nLivings, nParkings);
+               RuralHouse rh = new RuralHouse(houseNumber, this, description, town,feature);
                ruralHouses.add(rh);
                return rh;
        }