系统设计与分析(六)

使用UMLet建模

问题 1

  1. 使用类图,分别对 Asg_RH 文档中 Make Reservation 用例以及 Payment 用例开展领域建模。然后,根据上述模型,给出建议的数据表以及主要字段,特别是主键和外键
  • 注意事项:
    • 对象必须是名词,特别是技术名词、报表、描述类的处理;
    • 关联必须有多重性、部分有名词与导航方向
    • 属性要注意计算字段
  • 数据建模,为了简化描述仅需要给出表清单,例如:
    • Hotel(ID/Key, Name, LocationID/Fkey, Address…)

1. Make Reservation

领域建模如下所示:

系统设计与分析(六)

数据建模如下所示:

  • Hotel(HotelID/Key, Name, LocationID/Fkey, ReservationID/Fkey, Address, star-rating, info)
  • Reservation(ReservationID/Key, HotelID/FKey, ShoppingBasketID/FKey, PaymentID/FKey, RoomItemsID/Fkey, CustomerID/FKey, checkInDate, checkOutDate, numOfNights, customerFullName, customerSmoking, contactEmail)
  • Location(LocationID/Key)
  • Customer(CustomerID/Key,)
  • ShoppingBasket(ShoppingBasketID/Key)
  • Payment(PaymentID/Key)
  • RoomItems(RoomItemsID/Key, type, adults, children, ageFrom, ageTo)
  • Room(RoomID/Key, RoomDescriptionID/FKey type, date, price, isAvailabel, reservedNum)
  • RoomDescription(RoomDescriptionID/Key, type, listPrice, Info)
  • RoomType(RoomTypeID)

2. Payment

领域建模如下所示:

系统设计与分析(六)

数据建模如下所示:

  • Customer(CustomerID/Key, ShoppingBasketID/FKey, Name)
  • Payment(PaymentID/Key, CarditCardID/Key, TotalPrice)
  • CreditCard(CredotCardID/Key, CHADID/FKey, type, isAvailabel, CardNumber, CardSecurityCode, ExpityDate)
  • CardHolderAddressDetail(CHADID/Key, FirstName, LastName, Address1, Address2, City, County/State, Country, Postcode, DaytimeTelephone, EveningTelephone)
  • ShoppingBasket(ShoppingBasketID/Key, BookingDetailID/FKey)
  • BookingDetail(BookingDetailID/Key, BookingDetailDescription/FKey, TotalPrice, check-in-date, numberOfDate, check-out-date)
  • BookingDescription(BookingDescriptionID/Key, Name, Number, Price)

问题2

  1. 使用 UML State Model,对每个订单对象生命周期建模
  • 建模对象: 参考 Asg_RH 文档, 对 Reservation/Order 对象建模
  • 建模要求: 参考练习不能提供足够信息帮助你对订单对象建模,请参考现在 定旅馆 的旅游网站,尽可能分析围绕订单发生的各种情况,直到订单通过销售事件(柜台销售)结束订单。

系统设计与分析(六)