Trying to make my first OOP program in java (thats why there is instructions in the code). Does my Address class follow the instructions right or is it something that does not follow the instructions? I also need some help with the last constructor in the Guest class.
"Write a constructor with parameters for all instance variables
given above and all instance variables for the address.
Create the Address-object with the values given in the parameters.
Let the Address class take care of assigning default values if any
parameters for this object is an empty string or null."
How do I create a address object in the constructor?
#Beginner OOP program java
5 messages · Page 1 of 1 (latest)
a little confused what you need help with? could yoy clarify and point me to the section
if you look at the constructor on the last picture so is there a text above that says "Write a constructor with parameters for all instance variables
given above and all instance variables for the address.
Create the Address-object with the values given in the parameters.
Let the Address class take care of assigning default values if any
parameters for this object is an empty string or null."
I have created the constructor with the parameters for all the instance variables
but im not sure on how they want me to create a object in there and give values with the object