hamaXD

LAB1 Main Sphere

Jan 31st, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main{
  4.     public static void main(String[] args){
  5.         float redius;
  6.  
  7.         Scanner in = new Scanner(System.in);
  8.         Sphere here = new Sphere();
  9.  
  10.         System.out.print("Enter_redius: ");
  11.         redius =in.nextFloat();
  12.        
  13.         here.setRedius(redius);
  14.         here.calculateSurfaceArea();
  15.         here.calculateVolume();
  16.         System.out.println("area : "+here.getArea());
  17.         System.out.print("Volume : "+here.getVolume());
  18.        
  19.    
  20.  
  21.     }
  22. }
Add Comment
Please, Sign In to add comment