Jordimario

javaapplication5

Oct 26th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 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 javaapplication5;
  7. import java.util.Scanner;
  8. import java.io.*;
  9. /**
  10. *
  11. * @author quartaaif
  12. */
  13.  
  14.  
  15. public class JavaApplication5 {
  16.  
  17. /**
  18. * @param args the command line arguments
  19. */
  20. public static void main(String[] args) {
  21. Scanner scan = new Scanner(System.in);
  22. // TODO code application logic here
  23. Cerchio tavolo = new Cerchio();
  24. Cerchio tavolo2 = new Cerchio();
  25. System.out.println("Metti raggio 1");
  26. System.out.println(tavolo.setRaggio(scan.nextDouble()));
  27. System.out.println("Metti raggio 2");
  28. System.out.println(tavolo2.setRaggio(scan.nextDouble()));
  29.  
  30. System.out.println("l'area 1 è:"+tavolo.area() +"perimetro 1 è:"+ tavolo.circonferenza());
  31. System.out.println("l'area 2 è:"+tavolo2.area() +"perimetro 2 è:"+ tavolo2.circonferenza());
  32. }
  33.  
  34. }
Add Comment
Please, Sign In to add comment