详细设计和框架映射

BCE 实现用例详细设计

使用 ECB 实现 make reservation 用例的详细设计(包含用例简介,顺序图,类图)。

  1. make reservation 用例简介

    make reservation 系统的用例图如下所示:

    这里写图片描述

    主用例: { Find hotel, Make reservation, Manage basket, Pay }

    子用例:
    { Select city location, Select in&out date, Choose hotel, Choose room type, Confirm reservation, Select credit cards, Browse location selections, Specify number of nights, Search again, Sort, Modify date, Specify number of people and rooms, Enter name and email }

    根据以上用例,可以识别得到以下的 BCE 类:

    • Boundary/UI 类:
      • FindHotelPage: Displays the reservation page and asks the the online traveler/customer to type in the destination city, select the check in date and either specify the number of nights or select the check out date. It also allows the customer to choose city by browsing the city selection table.
      • SearchResultPage: Displays the result of search from FindHotelPage.
      • RoomSituationPage: Displays the room availability and price (if some rooms are available) or shows the unavailability information (if not). It also allows the customer to modify the check in date and the number of nights. It also invites the customer to specify required rooms and the number of adults and children in each room.
      • BasketPage: Displays the contents of the basket of the current customer and allows him to add or remove his reservation items as well as pay for them.
    • Controller 类:
      • Controller: Handle the trigerred events and communications between Boundary and Entity.
    • Entity 类:
      • Reservation: Records the orders of all reservations.
      • Location: Records the locations of all hotels.
      • Hotel: Records the information of all hotels.
      • Room: Records the rooms of the hotel.
  2. make reservation 顺序图

    这里写图片描述

  3. make reservation 类图

    这里写图片描述

框架映射

将逻辑设计类图映射到实际项目框架的包图。用树形结构表述实现的包和类。

这里写图片描述