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;
}
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;
}