Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Guia 3 - Ejercicio 1 #1 Main

squidward98 Apr 6th, 2020 266 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package ejercicioUno;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Main
  6. {
  7.     public static void main(String[] args)
  8.     {
  9.         Scanner scan = new Scanner(System.in);
  10.        
  11.         //Inciso a.
  12.         Autor au = new Autor("Joshua", "Bloch", 'M', "joshua@email.com");
  13.         //Inciso b.
  14.         System.out.println(au.toString());
  15.         //Inciso c.
  16.         Libro book = new Libro("Effective Java", 450, 150, au);
  17.         //Inciso d.
  18.         System.out.println(book.toString());
  19.         //Inciso e.
  20.         book.setPrecio(500);
  21.         System.out.println("El nuevo precio del libro es: $"+book.getPrecio()+".");
  22.         //Inciso f.
  23.         System.out.println("Datos del autor del libro.\n"+book.getAutor().toString());
  24.         //Inciso g.
  25.         System.out.println(book.imprimirLinea());
  26.        
  27.         scan.close();
  28.     }
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top