Question: Given below is a UML diagram for address class. Address -Street: String -City: String -State: String -Postal code: String -country: String +methods a) Write
Given below is a UML diagram for address class. Address -Street: String -City: String -State: String -Postal code: String -country: String +methods a) Write the code for default constructor and set the values of the data fields to null? b) Write the code for overloaded constructor with formal parameters and set the values of the data fields to the parameter listing. c) Write the code for mutator and accessor methods. d) Write the code for printAddress() method that returns the full address.
Step by Step Solution
3.49 Rating (152 Votes )
There are 3 Steps involved in it
a Default constructor public class Address private String street private String city private String state private String postalCode private String cou... View full answer
Get step-by-step solutions from verified subject matter experts
