Advertisement
sergAccount

Untitled

Jul 10th, 2021
1,104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.95 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package com.mycompany.ex17;
  7.  
  8. public class Box {
  9.    
  10.     private double height;
  11.     private double width;
  12.     private double depth;
  13.    
  14.     // alt + insert
  15.     public Box(double height, double width, double depth) {
  16.         this.height = height;
  17.         this.width = width;
  18.         this.depth = depth;
  19.     }
  20.  
  21.     public double getHeight() {
  22.         return height;
  23.     }
  24.  
  25.     public void setHeight(double height) {
  26.         this.height = height;
  27.     }
  28.  
  29.     public double getWidth() {
  30.         return width;
  31.     }
  32.  
  33.     public void setWidth(double width) {
  34.         this.width = width;
  35.     }
  36.  
  37.     public double getDepth() {
  38.         return depth;
  39.     }
  40.  
  41.     public void setDepth(double depth) {
  42.         this.depth = depth;
  43.     }
  44.    
  45.    
  46.    
  47. }
  48.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement