CS FundamentalsVery hardInfosys · Capgemini
In an ATM use-case diagram, 'Withdraw Cash' always performs 'Authenticate User', while 'Print Receipt' happens only when the customer asks for it. Which modelling is correct, including the arrow directions?
- A. Withdraw Cash <<extend>> Authenticate User (arrow to Authenticate); Withdraw Cash <<include>> Print Receipt
- B. Withdraw Cash <<include>> Authenticate User (arrow from Withdraw to Authenticate); Print Receipt <<extend>> Withdraw Cash (arrow from Print Receipt to Withdraw)
- C. Authenticate User <<include>> Withdraw Cash; Withdraw Cash <<extend>> Print Receipt
- D. Both are <<include>> relationships from Withdraw Cash
Correct answer: B. Withdraw Cash <<include>> Authenticate User (arrow from Withdraw to Authenticate); Print Receipt <<extend>> Withdraw Cash (arrow from Print Receipt to Withdraw)
<<include>> is mandatory behaviour, with the arrow from the base use case to the included one. <<extend>> is optional, conditional behaviour, with the arrow from the extending use case to the base it extends - the opposite direction.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- In a UML sequence diagram, how are a synchronous call, an asynchronous message and a return message usually drawn?
- In a UML activity diagram, after an order is paid, 'Pack items' and 'Send invoice' happen in parallel, and 'Ship' may start only when both…
- A class diagram shows a dashed line with a hollow triangle from PaymentService to the interface IPayment, and a solid line with a hollow…
- Student and Course have a many-to-many association with an association class Enrollment holding the grade. If 30 students each enrol in 4…
- A change to how GST is calculated forces small edits in nine different classes across the code base. Which code smell is this, and how…
- Match each code smell with the refactoring that usually fixes it. P: a method takes 9 parameters, several of which always travel together…