摘要
针对杂志库存管理问题,基于面向对象思想,运用设计模式设计了一个库存管理系统。通过问题域部件设计,将系统划分为人员管理、物资管理和收益管理三部分,并设计了相关表单;通过任务管理部件设计,运用单例模式实现了并发审核,运用观察者模式保证了数据查询的准确和实时,运用状态模式实现了库存的调取,运用装饰器模式实现了收益统计,运用策略模式评估了来年印数与保留库存数;通过数据管理部件和人机交互部件设计,运用抽象工厂结合简单工厂的模式实现了多数据源访问支持;最后设计了用例进行测试。测试结果表明,该系统可以满足杂志库存管理的使用需求。
Aiming at the problem of inventory control of magazine,the object-oriented design pattern was used to design the inventory management system.In the design process of the problem domain components,the system was divided into 3 parts:personnel management,material management and earnings management,and business related forms were designed.In the design process of task management components,the singleton pattern was used to realize concurrent audit,the observer pattern was used to guarantee the accuracy and real-time of data query,the state pattern was used to realize inventory control,the decorator pattern was used to statistics of revenue and expenditure,the strategy pattern was used to evaluate the number of next year's printing and storage quantity.And in the design process of data management components and human interaction components,the abstract factory was used with the combination of the simple factory pattern to achieve the multiple data source access support.Finally,the use cases were designed and tested,and the results show that the system meets the needs of inventory management of magazine.
作者
周昱晨
罗向阳
张豪
Zhou Yuchen;Luo Xiangyang;Zhang Hao(Journal of Mechanical and Electrical Engineering,Hangzhou,Zhejiang 310009,China)
出处
《计算机时代》
2018年第9期33-36,共4页
Computer Era
关键词
面向对象设计
问题域部件
任务管理部件
数据管理部件
人机交互部件
设计模式
object-oriented design
problem domain components
task management components
data management components
human interaction components
design pattern