Advertisement
sergAccount

Untitled

Dec 19th, 2020
639
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 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 ja10;
  7.  
  8. public class Truck extends Car {
  9.     // capacity - грузоподъемность авто
  10.     double capacity;
  11.     // get, set методы для св-ва capacity  
  12.     // Alt+Insert
  13.     public double getCapacity() {
  14.         return capacity;
  15.     }
  16.     public void setCapacity(double capacity) {
  17.         this.capacity = capacity;
  18.     }  
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement