Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

-----------I need help with the UML diagram----------------- Draw a UML representation for the hierarchy of the above-mentioned classes. Your representation must also be accurate in

-----------I need help with the UML diagram-----------------

Draw a UML representation for the hierarchy of the above-mentioned classes. Your representation must also be accurate in terms of UML representation of the different entities and the relation between them. You must use a software to draw your UML diagrams

You must have 3 different Java packages for the classes.

The first package will include the Address class.

The second package will include the WebPageAddress, EmailAddress and the TelecomAddress classes.

The third package will include the GeographicAddress, PostOfficeBoxAddress, and GeneralDeliveryAddress classes.

The Classes! An Address represents information that can be used to contact a Party. A Party represents a person or an organization. In general, an Address may specify business, home, out-of-hours contact, emergency contact, and so on. Each address specifies the usable time of the Address (i.e., limit the context in which the Address is applicable/valid. In other words, an Address has the following attributes: validFrom (String type representing a date in the format "YYYY-MM-DD") and validTo (String type representing a date in the format "YYYY-MM-DD") to specify and limit the use of an Address. Any address that falls out of the date limits is still and address, but considered to be obsolete. Notice that the dates can be future dates (yet to become valid). These Addresses are also obsolete for instance compared to the current date.

There are six (6) kinds of address objects: WebPageAddress, EmailAddress, TelecomAddress, GeographicAddress, PostOfficeBoxAddress, and GeneralDeliveryAddress. They can be described as follows: A WebPageAddress represents the URL for a Web page related to the Party. This consists of a Uniform Resource Locator (URL) that locates a page on the World Wide Web. A URLs has the following form "www.domainName/resourceName" as String type where the resourceName is optional. An EmailAddress specifies a way of contacting a Party via email. Each EmailAddress has 5 String parts: userName, @, domainName, ., and TLD in the following form "username@domainName.TLD" (where Top Level Domain (TLD) can be com, org, gov, etc.). A TelecomAddress represents a number that can contact a telephone, mobile phone, fax, pager, or other telephonic device. The International Telecommunication Union (www.itu.int) provides standards for TelecomAddresses. Each TelecomAddress is made up of the parts shown below as an example: +1 (0)208 1234567 ext. 789 mobile The "+1" is the International Direct Dialing (IDD) for a country. Almost each country in the world has its own country calling code, it is a single- or up to three-digit number which you have to dial to make a call to that country. Note this country code is not the same as the ISO 3166 country code (see below). For example, "+1" represents all countries in North America, "+2" represents all countries in Africa, etc. The "(0)" is the National Direct Dialing prefix (NDD). The "208" is the area code. The "1234567" is the number. The "789" is the extension. The "mobile" is the physicalType. In summary, a TelecomAddress has a countryCode (the number you must use to direct dial a particular country), a nationalDirectDialingPrefix (the prefix to make a call within a country between different cities or areas), an areaCode (the code for an area or city), a number (the telephone number), an extension accessible via the number, and a physicalType (the type of device, such as phone, fax, mobile, pager, and so on). The area code and the extension are of integer type; the number is a long integer type. The rest of the parts are String types. A GeographicAddress represents a geographic location at which a Party may be contacted. It is a postal address for the Party. Each GeographicAddress has an addressLine (String type), a city (String type), a regionOrState (String type), a zipOrPostCode (String type), and a Locale (Class type). A Locale is inspired by the ISO 3166 standard (see the note on ISO 3166 below) and has an alphabetic two-letter country code (String type), a numeric country code (int type), and official English language country name (String type). For example: Canada Locale is: "CA" 124 "Canada" USA Locale is: "US" 840 "The United States of America" Iran Locale is: "IR" 364 "The Islamic Republic of Iran" India Locale is: "IN" 356 "The Republic of India" Etc. Note on ISO 3166: The International Organization for Standardization (ISO) has created and maintains the ISO 3166 standard. This standard uses codes for the representation of names of countries and their subdivisions. The ISO 3166 standard contains three elements (simplified for this assignment): Element 1 is the two-letter country code (String type). Element 2 is the three-digit country code (int type). Element 3 is the English language country name (String type).

A PostOfficeBoxAddress (also known as P.O. box), is special type of a geographic address, that is uniquely addressable to a lockable box that is located on the premises (box lobby) of a post office station. In some regions, there is no door to door delivery of mail. The lockable box is accessible after hours by customers with a code to the box lobby's door keypad. Each PostOfficeBoxAddress has an addressLine (String type), a city (String type), a regionOrState (String type), a zipOrPostCode (String type), a Locale (as described above), and a boxLobbyDoorCode (int type). A GeneralDeliveryAddress is a service where the post office holds the mail until the recipient calls for it. It is a common destination for mail for people who are visiting a particular location and have no need, or no way, of having mail delivered directly to their place of residence at that time. Each GeneralDeliveryAddress has an addressLine (String type), a city (String type), a regionOrState (String type), a zipOrPostCode (String type), and a TelecomAddress to call the service.

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago