Advertisement
AlfonsoPEREZ

mainjava

Jan 27th, 2023
728
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.96 KB | None | 0 0
  1. public class Perez_Alfonso_FA22 {
  2.     public static void main(String[] args) {
  3.         Book book1 = new Book();
  4.         book1.setTitle("Kafka on the Shore");
  5.         book1.getAuthor("Haruki Murakami");
  6.        
  7.        
  8.         System.out.println("Book: ");
  9.         System.out.println("Title: " + book1.getTitle());
  10.         System.out.println("Author: " + book1.getAuthor());
  11.         System.out.println("Date: " + book1.getDate());
  12.        
  13.        
  14.         System.out.println();
  15.        
  16.         Email email1 = new Email();
  17.         email1.getAuthor("Alfonso Perez");
  18.         email1.setSubject("question");
  19.         email1.setTo("You");
  20.        
  21.         System.out.println("Email: ");
  22.         System.out.println("Subject: " + email1.getSubject());
  23.         System.out.println("To: " + email1.getTo());
  24.         System.out.println("Author: " + email1.getAuthor());
  25.         System.out.println("Date: " + email1.getDate());
  26.        
  27.        
  28.     }
  29.    
  30. }
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement