6.4k views
3 votes
Consider a business Use Case "Make a Hire Contract", which encapsulates all the functionality that allows a Customer of a Car Hire Company to rent a Motor Vehicle. The Class Diagram, below, shows the possible static structure of the classes that make up this Use Case.

A Sequence Diagram models the scenario of a Use Case. Based on this business Use Case "Make a Hire Contract", construct a Sequence Diagram. You must use the sequence diagram notation that was taught to you on the module.

Ensure that in your answer you clearly identify:

All the Object Instances

The Lifelines and Focus of Control Regions [Activation Time]

A minimum of 20 messages [stimuli]

User Eddiewould
by
8.4k points

1 Answer

6 votes

Final answer:

A Sequence Diagram for the Use Case "Make a Hire Contract" must include clearly identified Object Instances and Lifelines with Focus of Control Regions, and a detailed interaction sequence consisting of at least 20 messages.

Step-by-step explanation:

To construct a Sequence Diagram for the business Use Case "Make a Hire Contract", you need to follow certain steps that incorporate sequence diagram notation. The diagram provides a visual representation of how objects interact in a given scenario, specifically the process of a customer renting a motor vehicle from a car hire company.

Firstly, identify all the Object Instances involved in this Use Case. Common object instances could be Customer, RentalContract, Vehicle, PaymentSystem, etc. Each object instance is represented as a box at the top of the diagram, with a dotted line (lifeline) descending from it. The lifeline represents the existence of the object during the interaction.

The Focus of Control Regions, also known as Activation Time, indicate when an object is active in the process. These regions are shown as thin rectangles on the lifeline of the object involved. The height indicates the duration of the interaction.

Then, define a sequence of interactions - a minimum of 20 messages (stimuli) - that occur between these objects. Messages are arrows that go from one lifeline to another and can represent method calls, returns, or asynchronous signals. An example sequence might be:

  1. Customer requests vehicle availability.
  2. System checks Vehicle inventory.
  3. Availability confirmed to Customer.
  4. // 17 additional steps detailing the whole process of making a hire contract.

Ensure that each message in the sequence is numbered and has a clear description to guide the user through the scenario. The interactions should model the whole contractual process, from vehicle selection to payment processing and contract finalization.

User Krzysiek Goj
by
8.8k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.