310414 OO MODELING WITH UML 1 EXAMPLE The classes shown have some attributes that are internal...
-
Upload
helena-scott -
Category
Documents
-
view
217 -
download
0
description
Transcript of 310414 OO MODELING WITH UML 1 EXAMPLE The classes shown have some attributes that are internal...
![Page 1: 310414 OO MODELING WITH UML 1 EXAMPLE The classes shown have some attributes that are internal object identifiers (OIDs) that should not appear at the.](https://reader036.fdocuments.us/reader036/viewer/2022082511/5a4d1b927f8b9ab0599c21d3/html5/thumbnails/1.jpg)
310414310414 OO MODELING WITH UMLOO MODELING WITH UML1
EXAMPLEEXAMPLE
The classes shown have some attributes that are internal object identifiers (OIDs) that should not appear at the conceptual level and should either be deleted or be replaced with relationships. All such attributes conveniently have names ending in ID.
Some further information about the application follows. A person may work for any number of companies. Persons, companies, or banks may own cars. The car owner ID represents either the person, company, or bank who owns the car. A car may have only one owner (person, company, or bank). A car loan given by a bank is for the purchase of a car. A car may have multiple car loans.
Prepare a class diagram in which the OIDs are either deleted or replaced with relationships. Use associations and generalizations as necessary. Show the most likely multiplicities for all associations and the final attributes for each class.
Note: Your final class diagram should contain no OIDs.
![Page 2: 310414 OO MODELING WITH UML 1 EXAMPLE The classes shown have some attributes that are internal object identifiers (OIDs) that should not appear at the.](https://reader036.fdocuments.us/reader036/viewer/2022082511/5a4d1b927f8b9ab0599c21d3/html5/thumbnails/2.jpg)
310414310414 OO MODELING WITH UMLOO MODELING WITH UML2
EXAMPLEEXAMPLE
Person
nameageemployer1IDemployer2IDemployer3IDpersonIDaddress
Car
ownerIDvehicleIDownerTypemodelyear
CarLoan
vehicleIDcustomerTypecustomerIDaccountNumberbankIDinterestRatecurrentBalance
Company
namecompanyID
Bank
namebankID
![Page 3: 310414 OO MODELING WITH UML 1 EXAMPLE The classes shown have some attributes that are internal object identifiers (OIDs) that should not appear at the.](https://reader036.fdocuments.us/reader036/viewer/2022082511/5a4d1b927f8b9ab0599c21d3/html5/thumbnails/3.jpg)
310414310414 OO MODELING WITH UMLOO MODELING WITH UML3
![Page 4: 310414 OO MODELING WITH UML 1 EXAMPLE The classes shown have some attributes that are internal object identifiers (OIDs) that should not appear at the.](https://reader036.fdocuments.us/reader036/viewer/2022082511/5a4d1b927f8b9ab0599c21d3/html5/thumbnails/4.jpg)
310414310414 OO MODELING WITH UMLOO MODELING WITH UML4
![Page 5: 310414 OO MODELING WITH UML 1 EXAMPLE The classes shown have some attributes that are internal object identifiers (OIDs) that should not appear at the.](https://reader036.fdocuments.us/reader036/viewer/2022082511/5a4d1b927f8b9ab0599c21d3/html5/thumbnails/5.jpg)
310414310414 OO MODELING WITH UMLOO MODELING WITH UML5
EXAMPLE SOLUTIONEXAMPLE SOLUTION
It is important to realize that some IDs represent associations while others are simply internal OIDs and so should not appear as attributes at all.
Carmodelyear
CarLoan
accountNumberinterestRatecurrentBalance
Ownername
WorksForIsFor
Lends
Owns
Personageaddress
Company*
1
*
*
*
1
*
Bank1
{disjoint, complete}
{incomplete}