登录
首页 » Java » 设计模式

设计模式

于 2020-12-15 发布 文件大小:191KB
0 433
下载积分: 1 下载次数: 4

代码说明:

  3-5 观察者模式实例之股票变化:某在线股票软件需要提供如下功能:当股票购买者所购买的某支股票价格变化幅度达到5%时,系统将自动发送通知(包括新价格)给购买股票的股民。现使用观察者模式设计该系统,绘制类图并编程模拟实现。 3-6状态模式实例之银行转账:在某银行系统中,我们定义了账户的三种状态:(1)如果账户(Account)中余额(balance)大于等于0,此时账户的状态为绿色(GreenState),即正常状态,表示既可以向该账户存款(deposit)也可以向从该账户取款(whithdraw)。(2)如果该账户中余额小于0,并且大于等于-1000,则该账户的状态为黄色(YellowState),即欠费状态,此时既可以向该账户存款也可以从该账户取款。(3)如果该账户余额小于-1000,那么该账户的状态为红色(RedState),即透支状态,此时用户只能向该账户存款,不能在从中取款。现在用状态模拟来实现状态的转化问题,用户只要执行简单的存款和取款操作,系统根据数量自动转换到相应的状态。(Need to transport toBaiDu)

文件列表:

设计模式
设计模式\3-4实验结果.JPG, 61695, 2017-12-03
设计模式\3-4观察者模式.JPG, 89547, 2017-12-03
设计模式\3-5实验结果.JPG, 62982, 2017-12-03
设计模式\3-5状态模式.JPG, 135718, 2017-12-03
设计模式\设计模式.docx, 17436, 2017-12-11

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 遗传算法优化BP网络案例
    说明:  遗传算法优化BP网络案例,得到的BP神经网络比普通更好(Genetic algorithm optimizes the BP network case, the obtained BP neural network is better than ordinary)
    2020-07-03 16:20:13下载
    积分:1
  • USB1_1和USB2_0相关标准
    USB1_1和USB2_0相关标准-技术指南-北京捷瑞电讯设备有限责任公司-USB1_1 and USB2_0 relevant standards- Technical Guide- Beijing Jierui telecommunications equipment limited liability company
    2022-02-27 08:01:18下载
    积分:1
  • 腾讯带滚动条相册特效
    腾讯带滚动条相册特效,jquery,滚动条,相册特效,图片切换,相册代码,(Tencent with scrollbar album effects, jquery, scrollbar, album effects, picture switching, album code,)
    2019-02-16 22:43:54下载
    积分:1
  • 个人网站系统,本人基于第三方源码进行更改!
    个人网站系统,本人基于第三方源码进行更改!-Personal website, I make changes based on third-party source!
    2022-03-11 08:13:05下载
    积分:1
  • 井字游戏:为双人对弈游戏,双方轮流放子,单任一行,列,斜线为三个相同的 子时即为胜利!...
    井字游戏:为双人对弈游戏,双方轮流放子,单任一行,列,斜线为三个相同的 子时即为胜利!-gridwork game : Chess game for a double, the two sides take turns in taking sons, single-line series of three slash the same firm shall victory!
    2023-06-06 08:10:03下载
    积分:1
  • manyTypeConstuct
    构造函数使用方法的总结,使用多种类型的构造函数创建对象。(Constructors use of the summary, the use of various types of Constructors object creation.)
    2006-10-27 18:20:04下载
    积分:1
  • 数据检测器
    说明:  设计一个串行数据检测器,当连续输入三个或更多1时输出1,否则输出0(Design a detector for serial data It outputs 1 when three or more 1 input continuously and outputs 0 otherwise)
    2020-01-02 15:24:34下载
    积分:1
  • Step
    CFD计算:用于计算超声速前台阶流动C语言程序,生成每一个网格点的密度、马赫数等数据(CFD calculation: used to calculate the supersonic front step flow in C language, generate each grid point density, Mach number and other data)
    2021-04-14 10:58:55下载
    积分:1
  • Cpp1
    说明:  关于石油工艺的一个原程序代码,解决油气集输中的计算问题(Process on an original oil code, solve the oil and gas gathering and transportation problems in the calculation of)
    2011-03-09 09:36:34下载
    积分:1
  • jlts
    说明:  交流调速的simulink模型,定子电流磁链分量和转矩分量 闭环控制的矢量控制系统仿真(Simlink Model of AC Speed Regulation,Stator Current Flux Component and Torque Component,Vector Control System Simulation of Closed Loop Control)
    2019-05-08 20:46:24下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载