Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Square{
- private int area;
- private int width;
- public Square(){
- width =0;
- area=0;
- }
- public void setWidth(int temp){
- width = temp;
- }
- public void calcArea(){
- area = width*width;
- }
- public void showArea(){
- return area;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment