Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main{
- public static void main(String[] args){
- int field_width,field_area;
- Scanner in = new Scanner(System.in);
- Square one = new Square();
- System.out.print("Enter_width: ");
- field_width =in.nextInt();
- one.setWidth(field_width);
- one.calcArea();
- field_area= one.showArea();
- System.out.print("Area : "+field_area);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement