Xungerrrr's Blog

领域建模 - 对象状态

系统分析与设计 Homework 9

Word count: 338Reading time: 1 min
2019/05/04 Share

使用UMLet建模

使用类图,分别对Asg_RH文档中Make Reservation用例以及Payment用例开展领域建模。然后,根据上述模型,给出建议的数据表以及主要字段,特别是主键和外键

注意事项:

  • 对象必须是名词、特别是技术名词、报表、描述类的处理;
  • 关联必须有多重性、部分有名称与导航方向;
  • 属性要注意计算字段;
  • 数据建模,为了简化描述仅需要给出表清单,例如:
    • Hotel(ID/Key,Name,LoctionID/Fkey,Address…)

Make Reservation

1
2
3
4
5
6
Traveler(TravelerID/Key, Name, EmailAdress)
Hotel(HotelID/Key, Name, Address)
Room(RoomID/Key, HotelID/Fkey, Type, Availability)
ReservationItem(ReservationID/Key, RoomID/Fkey, BasketID/Fkey, CheckInDate, CheckOutDate, NumberOfAdults, NumberOfChildren, Price, IsSmoking, SpecialRequirements)
ReservationBasket(BasketID/Key, TravelerID/FKey)
RoomDescription(DescriptionID/FKey, Total, Price, Description)

Payment

1
2
3
4
Payment(PaymentID/Key, ReservationID/Fkey, CardID/Fkey, price)
ReservationItem(ReservationID/Key, PaymentID/Fkey, RoomID/Fkey, BasketID/Fkey, CheckInDate, CheckOutDate, NumberOfAdults, NumberOfChildren, Price, IsSmoking, SpecialRequirements)
CreditCard(CardID/Key, CardHolderID/Fkey, Type, CardNumber, CardSecurityCode, ExpiryDate)
CardHolder(CardHolderID/key, Title, FirstName, LastName, Address1, Address2, City, CountyOrState, Country, Postcode, DaytimeTelephone, EveningTelephone)

使用UML State Model,对每个订单对象生命周期建模

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

CATALOG
  1. 1. 使用UMLet建模
    1. 1.1. 使用类图,分别对Asg_RH文档中Make Reservation用例以及Payment用例开展领域建模。然后,根据上述模型,给出建议的数据表以及主要字段,特别是主键和外键
      1. 1.1.1. Make Reservation
      2. 1.1.2. Payment
    2. 1.2. 使用UML State Model,对每个订单对象生命周期建模