Answered step by step
Verified Expert Solution
Question
1 Approved Answer
*Create a class in Java to be used for storing all the items for an Address. Assign a name of your choosing. Create the following
*Create a class in Java to be used for storing all the items for an Address. Assign a name of your choosing.
- Create the following a private instance variables:
- street1 as a String
- street2 as a String - default to null.
- city as a String
- stateCodeas a String
- zipCode5 as an int.
- Generate the Getters and Setters for these items as public methods
- Create a toString method for this class.
- Create a UnitTest class for the class created in step 1.
- Create an instance of the class created in step 1.
- Call each of the setters and pass it a value.
- Display the result of the toString method.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started