软件工程第三次作业基于类的建模

软件工程第三次作业

1. You have been asked to build one of the following systems:

a. A network-based course registration system for your university.
b. A Web-based order-processing system for a computer store.
c. A simple invoicing system for a small business.
d. An Internet-based cookbook that is built into an electric range or microwave.
Select the system that is of interest to you and develop a processing narrative. Then use the grammatical parsing technique to identity candidate objects and classes.

语法解析:

b. 基于Web的订单处理系统允许通过用户的账号和密码登录到系统当中,获取到当前状态下,总共订单数量名称基本信息。选择对应订单进行显示详细信息,并对此订单进行处理.

在订单处理的过程中,需要对所有商品进行编号类型,连接到对应的扫描单号机器上,对所选商品进行扫描,并将此商品编号和订单上的编号进行匹配。若匹配则订单号状态变为已处理,若匹配失败,则订单号状态变为处理失败。

抽取这些名词,获得一些潜在类:

潜在类一般分类
密码事物
用户角色或外部实体
扫描单号机器外部实体
订单处理事件
系统事物
编号,类型不是对象,是商品的属性
商品外部实体
扫描事件
订单号状态不是对象,是订单的属性
订单外部实体

根据6个选择特征进行筛选:

潜在类适用的特征编号
密码拒绝:3不符合
用户拒绝:6适用,但是1、2不符合
扫描单号机器接受
订单处理拒绝:3不符合
系统接受
编号,类型拒绝:3不符合
商品接受
扫描接受
订单号状态拒绝:3不符合
订单拒绝:3不符合

2. Develop a set of operations that are used with the classes identified in Problem 1.

数据项组合:

识别信息 = 系统编号 + 用户账号+ 系统状态

获取订单 = 订单编号+ 订单数量

处理订单 = 商品编号+订单编号+ 扫描器编号

登录 = 用户账号+ 用户密码

System
systemID
Account
systemStatus
Password
orderID
orderNum
productID
machineID

3 Develop a class model for the PHTRS System present in the following Problem.

The department of public works for a large city has decided to develop a Web-based pothole tracking and repair system(PHTRS). A description follows:
Citizens can log onto a website and report the location and severity of potholes. As potholes are reported they are logged with a “public works department repair system” and are assigned an identifying number, stored by street address, size(on a scale of 1 to 10), location(middle, curb, etc.),district(determined from street address), and repair priority(determined from the size of the pothole). Work order data are associated with each pothole and include pothole location and size, repair crew identifying number, number of people on crew, equipment assigned, hours applied to repair, hole status(work in progress, repaired, temporary repair, not repaired), amount of filler material used, and cost of repair (computed from hours applied, number of people, material and equipment used). Finally, a damage file is created to hold information about reported damage due to the pothole and includes citizen’s name, address, phone number, type of damage, and dollar amount of damage, PHTRS is an online system; all queries a to be made interactively.

市民类是由坑洼报告和破损文件共同组成,坑洼报告的顺序呈现是由工作顺序决定的,坑洼编号是由破损文件构建的。工作顺序的坑洼报告是由破损文件构建的。

4 Develop a complete set of CRC model index cards on the product or system you chose as part of Problem 1.

  • 5
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值