Files
  • Main.java
  • Address.class
  • Address.java
  • Main.class
  • Student.class
  • Student.java
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
public class Main{
 public static void main (String[] args){
   Address school = new Address("50 Avenue Ave.", "Brooklyn", "NY", 11223);
   Address jHome = new Address("21 Avenue X", "Brooklyn", "NY", 11223);
   Student john = new Student("John", "Gomez", jHome, school);
   Address mHome = new Address("123 Main Street", "Brooklyn", "NY",11223);
   Student marsha = new Student("Marsha", "Jones", mHome, school);
   Address gHome = new Address("1600 Ave NW", "Washington DC", "PA", 20500);
   Student giovanni = new Student("Giovanni", "Rojas", gHome, school);
   System.out.println(john);
   System.out.println();
   System.out.println(marsha);
   System.out.println();
   System.out.println(giovanni);
  }
}