Address - public Address (String street, String town,...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//******************************************************************** // Address.java Author: Lewis/Loftus // // Solution to Programming Project 4.6 //******************************************************************** / public class Address { private String streetAddress, city, state; private long zipCode; //----------------------------------------------------------------- // Sets up this Address object with the specified data. //-----------------------------------------------------------------
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: public Address (String street, String town, String st, long zip) { streetAddress = street; city = town; state = st; zipCode = zip; } //-----------------------------------------------------------------// Returns this Address object as a string. //-----------------------------------------------------------------public String toString() { String result; result = streetAddress + "\n"; result += city + ", " + state + " " + zipCode; return result; } }...
View Full Document

Ask a homework question - tutors are online