Advertisement
desant74268

HW_OOP_Laptop

Apr 25th, 2020
415
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.69 KB | None | 0 0
  1. package HW.OOP.SHOP;
  2.  
  3. public class Laptop {
  4.     private String model;
  5.     private double price;
  6.     private double ram;
  7.  
  8.     public Laptop(String model, double price, double ram) {
  9.         this.model = model;
  10.         this.price = price;
  11.         this.ram = ram;
  12.     }
  13.  
  14.     public String getModel() {
  15.         return model;
  16.     }
  17.  
  18.     public double getPrice() {
  19.         return price;
  20.     }
  21.  
  22.     public double getRam() {
  23.         return ram;
  24.     }
  25.  
  26.     public void setModel(String model) {
  27.         this.model = model;
  28.     }
  29.  
  30.     public void setPrice(double price) {
  31.         this.price = price;
  32.     }
  33.  
  34.     public void setRam(double ram) {
  35.         this.ram = ram;
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement