Advertisement
sergAccount

Untitled

Jan 23rd, 2021
972
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.81 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 javaapplication21;
  7.  
  8. /**
  9.  *
  10.  * @author Admin
  11.  */
  12. public class Square {
  13.     // св-ва
  14.     int x; // точка в который будет находиться наша фигура
  15.     int y;
  16.     //
  17.     int a;  // длина стороны квадрата  
  18.     // конструктор класса
  19.     public Square(int x1, int y1, int a1){
  20.         x = x1;
  21.         y = y1;
  22.         a = a1;
  23.     }    
  24.     // методы
  25.     // Alt + Insert
  26.     public int getX() {
  27.         return x;
  28.     }
  29.     public int getY() {
  30.         return y;
  31.     }
  32.     public int getA() {
  33.         return a;
  34.     }
  35. }
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement