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

软件工程第三次作业

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.

软件工程第三次作业基于类的建模_第1张图片

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

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

软件工程第三次作业基于类的建模_第2张图片

你可能感兴趣的:(软件工程第三次作业基于类的建模)