sergAccount

Untitled

Dec 6th, 2020
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.83 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 app8;
  7.  
  8. public class Square {
  9.     // (x,y) - левый верхний угол
  10.     int x;
  11.     int y;
  12.     // сторона квадрата
  13.     int a;
  14.     //
  15.     public Square(int x, int y, int a){
  16.         this.x = x;
  17.         this.y = y;
  18.         this.a = a;
  19.     }    
  20.     // alt + insert
  21.     public int getX() {
  22.         return x;
  23.     }
  24.  
  25.     public void setX(int x) {
  26.         this.x = x;
  27.     }
  28.  
  29.     public int getY() {
  30.         return y;
  31.     }
  32.  
  33.     public void setY(int y) {
  34.         this.y = y;
  35.     }
  36.  
  37.     public int getA() {
  38.         return a;
  39.     }
  40.  
  41.     public void setA(int a) {
  42.         this.a = a;
  43.     }    
  44. }
  45.  
Add Comment
Please, Sign In to add comment