1
votes
class person 
{


   private int NID;
   private  String name;
   private int numOfAddresses;

   public person(int id, String n, int num)
   {
   
      NID = id;
      name = n;
      numOfAddresses = num;
   
   }

   public person(person p)
   {
   
   }

   public boolean addAddress(address a)
   {
   
   }

   public String toString()
   {
   
   }

}
class address

{


   private int zipCode;
   private String city;
   private String country;
   private String street;


   public address(int code, String cit, String cont, String s)
   {
   
      zipCode = code;
      city = cit;
      country = cont;
      street = s;
   
   }




}

‏Write java code for the following 3 classes :

MyAddressesApp

Class MyAddressesApp Description,

A class with main method to do the following

Create a person object which can hold up to 2 addresses and has the following information
name Mona

National ID 112233

Add 2 addresses to this object by reading their info from the user .

Display info of the person Mona including all her addresses

For clarification: classes are person and address and MyAddressesAppuser17583358
This totally looks like a homework, so please read how to ask homework questionsChaosfire
It was a question I could not answer at class and i want to fully understand it, that is all thank youuser17583358