Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Teglalp {
- private int x;
- private int y;
- public int getX() {
- return x;
- }
- public void setX(int x) {
- this.x = x;
- }
- public int getY() {
- return y;
- }
- public void setY(int y) {
- this.y = y;
- }
- public Teglalp(){
- x=10;
- y=15;
- }
- public Teglalap(int x, int y){
- this.x = x;
- this.y = y;
- }
- // Spec teglalap: negyzet
- public Teglalap(int negyzetoldal)
- {
- x = negyzetoldal;
- y = negyzetoldal;
- }
- public int kerulet(int a, int b){
- return 2*(a+b);
- }
- public int terulet(int a, int b){
- return a*b;
- }
- }
Add Comment
Please, Sign In to add comment