Chapter 3 Case Studies
Introduction 3.1 What is and isn’t Covered in the Case Studies? 3.2 Case Study Strategy: Iterative Development + Iterative Learning 3.3 Case One: The NextGen POS System 3.4 Case Two: The Monopoly Game System
Introduction These case study problems were chosen because they’re familiar to many people, yet rich with complexity and interesting design problems. That allows us to concentrate on learning fundamental OOA/D, requirements analysis, UML and patterns, rather than explaining the problems.
3.1 What is and isn’t Covered in the Case Studies? Generally, applications include UI elements, core application logic, database access, and collaboration with external software or hardware components.
A typical object-oriented information system is designed in terms of several architectural layers or subsystems. The following is not a complete list, but provides an example. User Interface—graphical interface; windows.
Application Logic and Domain Objects—software objects representing domain concepts (for example, a software class named Sale) that fulfill application requirements. Technical Services—general purpose objects and subsystems that provide supporting technical services, such as interfacing with a database or error logging. These services are usually application-independent and reusable across several system.
OOA/D is generally most relevant for modeling the application logic and technical service layers. The NextGen case study primarily emphasizes the problem domain objects, allocating responsibilities to them to fulfill the requirements of the application. In this design approach, the UI layer has very little responsibility.
minor focus Explore how to connect to other layers Item ID User interface Quantity Primary focus of case study Explore how to design objects Application Logic and Domain object layer Sale Payment Secondary focus Explore how to design objects Technical Services layer Logging Database Access Figure 3.1 Sample layers and objects in an object-oriented system, and the case study focus.
3.2 Case Study Strategy: Iterative Development+ Iterative Learning This book is organized to show an iterative development strategy. OOA/D is applied to the NextGen POS system in multiple iterations; the first iteration is for some core functions. Later iterations expand the functionality of the system.
Figure 3.2 Learning path follows iterations. Introduces just those analysis and design skills related to iteration one. Iteration 3 Additional analysis and design skills introduced. Likewise. Figure 3.2 Learning path follows iterations.
3.3 Case One:The NextGen POS System A POS system is a computerized application used(in part) to record sales and handle payments; it is typically used in a retail store. It includes hardware components such as a computer and bar code scanner, and software to run the system. It interfaces to various service applications, such as a third-party tax calculator and inventory control.
These systems must be relatively fault-tolerant These systems must be relatively fault-tolerant. That is, even if remote services are temporarily unavailable (such as the inventory system), they must still be capable of capturing sales and handling at least cash payments (so that the business is not crippled).
A POS system must support multiple and varied client-side terminals and interfaces. These include a thin-client Web browser terminal, a regular personal computer with something like a Java Swing graphical user interface, touch screen input, wireless PDAs, and so forth.
Furthermore, we are creating a commercial POS system that we will sell to different clients with disparate needs in terms of business rule processing. Therefore, we will need a mechanism to provide this flexibility and customization.
Using an iterative development strategy, we are going to proceed through requirements, object-oriented analysis, design, and implementation.
销售点系统 本学习案例的目的是创建一个用于商品零售的销售点系统。 系统的目标包括: 1、为顾客快速结帐 2、进行快速准确的销售统计分析 3、自动更新库存
系统基本功能 下面列举一些销售点系统具有代表性的功能,但它们不是一个完整的系统功能列表: 记录当前的销售---卖出的商品 计算当前的销售总额,包括税和优惠折算 从条形码中获得被购买商品的信息,从条形码扫描仪中输入或者人工录入产品代码
记录完整的销售信息 显示记录下来的商品说明、商品价格 当一次销售被提交给系统后,削减相应库 存量 提供一个持久化存储机制 出纳员要使用系统,必须输入ID号和密码 才能登录进入系统
处理支付的功能 处理现金支付,记录实付款额,计算应还款额 处理信用卡支付,从读卡机中读入信用卡信息或者人工录入信用卡信息,通过网络连接到信用卡授权服务机构来为顾客的信用卡支付提供授权服务 处理支票支付,人工录入支票信息,通过网络连接到支票授权服务机构来为顾客的支票提供授权服务
系统属性(非功能特性) 易用性 容错性 安全性 响应时间 界面形式 操作系统平台
购买商品功能 简要描述: 顾客带着所要购买的商品来到收款出。出纳员记录下商品信息并收款。付款完成后,顾客带着所购买的商品离开。
详细描述: 1、顾客带着所要购买的商品到达一个销售点 2、出纳员开始一次销售过程 3、出纳员录入商品的条形码 4、系统记录该商品,显示商品信息和价格,并计算出总价格 出纳员重复步骤3-4直到输入完所有商品
系统计算出商品价值总额,其中包括税的计算 出纳员将商品价值总额告诉顾客,并要求付款 顾客付款,系统处理付款操作 系统完成销售过程,并将销售和付款信息发送至内部帐目清算系统,同时更新库存 系统为顾客打印付款收据 顾客带着收据和所购买的商品离开