Advertisement
Guest User

classe java

a guest
Mar 18th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.50 KB | None | 0 0
  1. package principal;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Fichario {
  6.     private Triangulo t;
  7.     private int hip;
  8.     private Scanner sc;
  9.    
  10.     public Fichario(Triangulo t) {
  11.         super();
  12.         this.t = t;
  13.         Scanner sc = new Scanner(System.in);
  14.     }
  15.      
  16.     public void insere(){
  17.         int cateto1, cateto2;
  18.         System.out.println("Digite o 1º Cateto: ");
  19.         cateto1 = sc.nextInt();
  20.        
  21.         System.out.println("Digite o 2º Cateto: ");
  22.         cateto2 = sc.nextInt();
  23.         t = new Triangulo(cateto1, cateto2);
  24.        
  25.     }
  26.  
  27.    
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement