Advertisement
Ivan_Bochev

House

Dec 18th, 2019 (edited)
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.02 KB | None | 0 0
  1. package h;
  2.  
  3. import java.util.ArrayList;
  4.  
  5. public class House implements GetPrice{
  6.     private String owner;
  7.     private String adress;
  8.     private double squareM;
  9.     private double price;
  10.    
  11.     public House(String owner, String adress, double squareM, double price) {
  12.         this.owner = owner;
  13.         this.adress = adress;
  14.         this.squareM = squareM;
  15.         this.price = price;
  16.     }
  17.     public String getOwner() {
  18.         return owner;
  19.     }
  20.     public void setOwner(String owner) {
  21.         this.owner = owner;
  22.     }
  23.     public String getAdress() {
  24.         return adress;
  25.     }
  26.     public void setAdress(String adress) {
  27.         this.adress = adress;
  28.     }
  29.     public double getSquareM() {
  30.         return squareM;
  31.     }
  32.     public void setSquareM(double squareM) {
  33.         this.squareM = squareM;
  34.     }
  35.     public double getPrice() {
  36.         return price;
  37.     }
  38.     public void setPrice(double price) {
  39.         this.price = price;
  40.     }
  41.    
  42.     @Override
  43.     public GetPrice getMaxPrice(ArrayList<GetPrice> list) {
  44.         return null;
  45.     }
  46.     @Override
  47.     public void print() {
  48.         System.out.println(owner+"\n"+adress+"\n"+squareM+"\n"+price);
  49.     }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement