Question: java public class Address private String streetAddress, city, state; private long zipCode; public Address (String street, String town, String st, long zip) streetAddressstreet; city-town; state
java


public class Address private String streetAddress, city, state; private long zipCode; public Address (String street, String town, String st, long zip) streetAddressstreet; city-town; state st; zipCode - zip; public String toString() String result; result-streetAddress+ " "; result +city + ", " +state + " " + zipCode; return result; public class Student private String firstName, lastName; private Address homeAddress, schoolAddress; public Student (String first, String last, Address home, Address school) firstName- first; lastName = last homeAddress-home; school Address - school; public String toString() String result; result-firstName"" + lastName " "; result +"Home Address: " + homeAddress + " "; result +School Address: " schoolAddress; return result; public class StudentBody public static void main(Stringl] args) // Creates some Address and Student objects and prints them using classes given in the previous question. Address school- Address jHome- Student john- Address mHome- Student marsha
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
