Guest User

Untitled

a guest
Feb 24th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 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 JAVA_OBJECT_ORIENTED;
  7.  
  8. /**
  9. *
  10. * @author ABIR
  11. */
  12. public class Square {
  13. double height;
  14. double width;
  15. public void setHeight(double h){
  16. height=h;
  17. }
  18. public double getHeight(){
  19. return height;
  20. }
  21. public void setWidth (double w){
  22. width=w;
  23. }
  24. public double getWidth (){
  25. return width;
  26. }
  27. public double getArea (){
  28. return height*width;
  29. }
  30. }
Add Comment
Please, Sign In to add comment