Here's what I need to do for Lab 14:
The StreetAddress class has this constructor: StreetAddress( String street, String city, String state, String zip ); and the following methods: void setStreet( String street ); and String getStreet(); void setCity( String city); and String getCity(); void setState( String state ); and String getState(); void setZIP( String zip ); and String getZIP(); String mailingLabel();. The last of these returns the mailing address on two lines in the following form: street city, state zip Use the following code segment to experiment with the behavior of this class — click the Run button and see what happens; change the code and click the Run button again to see the effect of your changes; repeat as often as you like. Run Write a definition for the StreetAddress class in the code area below.
Here is my code:
public class StreetAddress (String street, String city,String state,String zip) { public void setStreetAddress(String Street, String City, String, State, String Zip){ street = Street; city = City; state = State; zip = Zip; } public String getStreet(){ return street; } public String getCity(){ return city; } pubilc String getState(){ return Zip; } }
Thx!
I'm actually making some progress. I'm glad its happening in such a short amount of time.