- 2073 Bhadra · 8 marks
XYZ Marina class diagram
Short answer
Classes include abstract Boat with subclasses SailBoat and PowerBoat, Customer, Slip, Lease, Bill, and Report. Customer signs Leases that assign a Slip and a Boat; each Lease generates Bills; Customer owns Boats. Key methods: createLease(), computeAmount(), isAvailable(), generateBill().
For the case study given below identify all classes, their relationships, attributes and methods for each class. Also draw class diagram using standard UML Notation. XYZ Marina is privately owned corporation that rents boats and provides boat services on a lake. The Corporation needs automated system to track customers, leased slips (Each space for boat in lake) and boats in the slips. The corporation has two types of boats sail boat and power boat. Both types of boats are uniquely identified by their attributes like registration number, manufacture year and boat length. The boat can be leased on daily basis or yearly basis. The system should perform following tasks creating lease, computing lease amount, assigning boats. The system should also have features of search for vacant slips leased to specific customers and generating customized reports. The system should have to implement billing system as well.
Classes (nouns): Customer, Slip, Boat (abstract), SailBoat, PowerBoat, Lease, Bill, Report (generated report), Marina (system facade).
Attributes and methods
| Class | Attributes | Methods |
|---|---|---|
| Customer | customerId, name, address, phone | createLease(), getLeases() |
| Slip | slipNo, location, size, isVacant | isAvailable(), assign(boat) |
| Boat (abstract) | registrationNo, manufactureYear, length | getDetails() |
| SailBoat | sailArea | - |
| PowerBoat | engineType | - |
| Lease | leaseId, startDate, endDate, type (daily/yearly), amount | computeAmount(), assignBoat(), cancel() |
| Bill | billId, date, amount, paid | generateBill(), pay() |
| Report | reportType, date | generate(customized) |
| Marina | name | searchVacantSlips(), searchSlipsByCustomer(c), createLease() |
Relationships
Boatis generalised intoSailBoatandPowerBoat.Customer1 - 0..*Lease;Lease* - 1Slip;Lease* - 1Boat(a boat occupies a leased slip);Customer1 - 0..*Boat(owns).Lease1 - 1..*Bill.MarinaaggregatesCustomer,Slip,Boatand producesReports.
+----------+ 1 * +--------+ * 1 +--------+
| Customer |-------| Lease |-------| Slip |
|----------| signs |--------| |--------|
| id,name | | type | | slipNo |
| address | | dates | | size |
+----------+ | amount | +--------+
| 1 +--------+
| owns | * | 1
| * | 1 | 1..*
+-----------+ | +--------+
| Boat |--------+ | Bill |
| <<abstract>> leased +--------+
|-----------|
| regNo |
| mfgYear |
| length |
+-----------+
^ ^
SailBoat PowerBoat
The diagram uses standard UML: boxes with name, attributes and operations; solid lines with multiplicities for associations; a hollow triangle for generalization.
✓ Answer checked by Claude Sonnet 5.5
Related questions
- Marina class diagram implementation code · Object Oriented Analysis and Design, chapter 4
- Coffee vending machine use case diagram · Object Oriented Analysis and Design, chapter 2
- Four class relationships from figure · Object Oriented Analysis and Design, chapter 2
- Video rental shop class diagram · Object Oriented Analysis and Design, chapter 2
- Identify conceptual classes; create domain model · Object Oriented Analysis and Design, chapter 2
- Create classes from design class diagrams · Object Oriented Analysis and Design, chapter 4 · asked 2×
- Standard hydrogen electrode and cu notation · Engineering Chemistry, chapter 1
- Case study: new system vs existing (cost, manpower) · Instrumentation II, chapter 10 · asked 4×
- Case study: current control and recommendation · Instrumentation II, chapter 10 · asked 3×
- Case study: processing plants and improvement · Instrumentation II, chapter 10 · asked 2×
All Object Oriented Analysis and Design chapter 2 questions →