Answered step by step
Verified Expert Solution
Link Copied!

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.

  1. Create the following a private instance variables:
    1. street1 as a String
    2. street2 as a String - default to null.
    3. city as a String
    4. stateCodeas a String
    5. zipCode5 as an int.
  2. Generate the Getters and Setters for these items as public methods
  3. Create a toString method for this class.
  4. Create a UnitTest class for the class created in step 1.
    1. Create an instance of the class created in step 1.
    2. Call each of the setters and pass it a value.
    3. Display the result of the toString method.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions

Question

LO6 List the components of job descriptions.

Answered: 1 week ago

Question

LO3 Define job design and identify common approaches to job design.

Answered: 1 week ago