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){
- float redius;
- Scanner in = new Scanner(System.in);
- Sphere here = new Sphere();
- System.out.print("Enter_redius: ");
- redius =in.nextFloat();
- here.setRedius(redius);
- here.calculateSurfaceArea();
- here.calculateVolume();
- System.out.println("area : "+here.getArea());
- System.out.print("Volume : "+here.getVolume());
- }
- }
Add Comment
Please, Sign In to add comment