Phân tích thiết kế hướng đối tượng (phân 3)
➤ Gửi thông báo lỗi ⚠️ Báo cáo tài liệu vi phạmNội dung chi tiết: Phân tích thiết kế hướng đối tượng (phân 3)
Phân tích thiết kế hướng đối tượng (phân 3)
823 Case study: flight booking systemAirport .xserversCityriQ..*J1..*—Figure .3.12 Completed modelling of sentence 103.3 Step 3 - Modelling sentences Phân tích thiết kế hướng đối tượng (phân 3) 8 and 9Let's now consider the stopovers, i.e. sentences 8 and 9.8A flight may involve stopovers in airports.9A stopover has an arrival lime and a departure lime.Every stopover has two properties according to sentence 9: arrival time and departure lime. According to sentence 8. it is also in connect Phân tích thiết kế hướng đối tượng (phân 3) ion with Hights and airports, which are themselves objects. Il is therefore natural to make a class of it for itself.However, sentence 8 is also imprePhân tích thiết kế hướng đối tượng (phân 3)
cise: can a stopover belong to several flights, and what are the multiplicities between Stopover and Airport? Moreover, the diagram still does not ind823 Case study: flight booking systemAirport .xserversCityriQ..*J1..*—Figure .3.12 Completed modelling of sentence 103.3 Step 3 - Modelling sentences Phân tích thiết kế hướng đối tượng (phân 3) 9833.4Complete the multiplicities of the associations.Answer 3.4According 10 sentence 8, a flight can involve stopovers in airports. This wording is ambiguous, and is worth thinking about a little, maybe by resorting to the advice of a domain expen.We can Stan by adding the multiplicities between St Phân tích thiết kế hướng đối tượng (phân 3) opover and Airport, which appears to be easy. Il is obvious that a stopover takes place in one and only one airport, and that an airport can be used lPhân tích thiết kế hướng đối tượng (phân 3)
or several stopovers. In the same way, an airport can be used as a departure or arrival airport for several flights.We might also think that a stopove823 Case study: flight booking systemAirport .xserversCityriQ..*J1..*—Figure .3.12 Completed modelling of sentence 103.3 Step 3 - Modelling sentences Phân tích thiết kế hướng đối tượng (phân 3) the following object diagram.29Bordeaux : StopoverPalma ; AllportdepartureBlagnac: AirportBordeauxMinorca : FlightMonqnac: Airportarrivalarrival Minorca: AirportFigure 3.14 Object diagram illustrating sentence 829. Toulouse and Bordeaux are (he main cities of the South-West of France, with Blagnac Phân tích thiết kế hướng đối tượng (phân 3) and Merignac being their airports, respectively. Palma and Minorca are touristy Spanish resorts...843 Case study: flight booking systemA stopover canPhân tích thiết kế hướng đối tượng (phân 3)
therefore belong to two different flights, particularly when these flights overlap. Note how effective it is to resort to the object diagram to give a823 Case study: flight booking systemAirport .xserversCityriQ..*J1..*—Figure .3.12 Completed modelling of sentence 103.3 Step 3 - Modelling sentences Phân tích thiết kế hướng đối tượng (phân 3) l we have to do is add two pieces of information:•the association between Flight and Stopover is an aggregation (open diamond), as it corresponds to a containment relationship. But it cannot be a composition (filled diamond), as it can be shared out:•the stopovers are ordered with regard to flight, Phân tích thiết kế hướng đối tượng (phân 3) so we can add the standard LIMI. constraint {ordered} on the side of the Stopover class.Figure 3.15 Complete modelling of sentences 8 and 9823 Case study: flight booking systemAirport .xserversCityriQ..*J1..*—Figure .3.12 Completed modelling of sentence 103.3 Step 3 - Modelling sentences 823 Case study: flight booking systemAirport .xserversCityriQ..*J1..*—Figure .3.12 Completed modelling of sentence 103.3 Step 3 - Modelling sentencesGọi ngay
Chat zalo
Facebook