Advertisement
vencinachev

Imoti

Nov 19th, 2020
664
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.76 KB | None | 0 0
  1.  
  2. public class Imot {
  3.     private String name;
  4.     private String address;
  5.     private int number;
  6.     private double price;
  7.    
  8.    
  9.     public Imot (String name, String address, int number, double price) {
  10.         this.setAddress(address);
  11.         this.setName(name);
  12.         this.setPrice(price);
  13.         this.setNumber(number);
  14.     }
  15.    
  16.    
  17.     public String getName() {
  18.         return name;
  19.     }
  20.     public void setName(String name) {
  21.         this.name = name;
  22.     }
  23.     public String getAddress() {
  24.         return address;
  25.     }
  26.     public void setAddress(String address) {
  27.         this.address = address;
  28.     }
  29.     public int getNumber() {
  30.         return number;
  31.     }
  32.     public void setNumber(int number) {
  33.         this.number = number;
  34.     }
  35.     public double getPrice() {
  36.         return price;
  37.     }
  38.     public void setPrice(double price) {
  39.         this.price = price;
  40.     }
  41. }
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement