Advertisement
KechevD

Lesson 23 Inheritage_Main_Task1

Apr 18th, 2020
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. import java.util.ArrayList;
  2.  
  3. public class MainBH {
  4.  
  5. public static void main(String[] args) {
  6.  
  7. House h1 = new House(100, 100.0, "Address here", 2, "Me");
  8. House h2 = new House(50, 75.0, "Address here", 3, "Me");
  9. House h3 = new House(10, 250.0, "Address here", 10, "Me");
  10.  
  11. ArrayList<House> houses = new ArrayList<House>();
  12. houses.add(h1);
  13. houses.add(h2);
  14. houses.add(h3);
  15.  
  16. Building.printBuilding(h1);
  17. House.Size(houses);
  18. }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement