current position:Home>Do me a favor. I don't understand this question

Do me a favor. I don't understand this question

2022-06-24 09:20:05CSDN Q & A

Define a Address Address class , by Address Derive from InternationalAddress International address classes and DomesticAddress Domestic address class , stay Address Definition in class display() Method display Address Properties of class .
protected String postalcode; // Postal Code
protected String state; // Country
protected String province; // province
protected String city; // City
protected String street; // The street

The two subclasses define display() Method , Displays the full address name in two different formats
The format of the domestic address is : Postal Code 、 Country 、 province 、 City 、 Street name ,
The format of the foreign address is : Street name 、 City 、 province 、 Country 、 Postal Code .

International address format :
1515 Broadway,New York,Washington,USA,10036
Domestic address format :
410024, Furong Road, Changsha City, Hunan Province, China 888 Number

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/175/202206171657172718.html

Random recommended