// Class to perform the display of simple address data // Version 1.00 // Created by J.Weigmann 06th April 2007 public class JWAddressSimple { // protected data only class and subclasses can access protected String FirstName; protected String LastName; protected long TelephoneNumber; protected int TelephoneCountry; public JWAddressSimple(String newFirstName, String newLastName, int newTelephoneCountry, long newTelephoneNumber) { FirstName = newFirstName; LastName = newLastName; TelephoneNumber = newTelephoneNumber; TelephoneCountry = newTelephoneCountry; } public void outputResults() { // display the results on the screen method is called from the application class System.out.println("\n\nYour short address is displayed below:\n"); System.out.printf("\n%s %s.", FirstName, LastName); System.out.print("\nYour telephone number is 00" + TelephoneCountry +" " + TelephoneNumber + ".\n"); } } // end of class for displaying simple address data