资源简介
用简单工厂模式实现了一个商场收银小软件,用C++来做的
代码片段和文件信息
#include “StdAfx.h“
#include “CashFactory.h“
#include “cashnomal.h“
#include “cashreturn.h“
#include “cashrebate.h“
CashFactory::CashFactory(void)
{
}
CashFactory::~CashFactory(void)
{
}
CashSuper* CashFactory::CreateCashAccept( CString type )
{
CashSuper* cs = NULL;
if(0 == type.Compare(_T(“正常收费“)))
{
cs = new (std::nothrow)CashNomal();
}
else if(0 == type.Compare(_T(“满300返100“)))
{
cs = new (std::nothrow)CashReturn(300100);
}
else if(0 == type.Compare(_T(“打8折“)))
{
cs = new (std::nothrow)CashRebate(0.8);
}
return cs;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 160256 2013-02-23 10:55 SalePromotion1\Debug\SalePromotion1.exe
文件 1093188 2013-02-23 10:55 SalePromotion1\Debug\SalePromotion1.ilk
文件 4860928 2013-02-23 10:55 SalePromotion1\Debug\SalePromotion1.pdb
文件 587 2013-02-23 10:29 SalePromotion1\SalePromotion1\CashFactory.cpp
文件 215 2013-02-23 10:26 SalePromotion1\SalePromotion1\CashFactory.h
文件 188 2013-02-22 10:45 SalePromotion1\SalePromotion1\CashNomal.cpp
文件 176 2013-02-22 10:45 SalePromotion1\SalePromotion1\CashNomal.h
文件 255 2013-02-22 10:49 SalePromotion1\SalePromotion1\CashRebate.cpp
文件 229 2013-02-22 10:49 SalePromotion1\SalePromotion1\CashRebate.h
文件 422 2013-02-22 10:58 SalePromotion1\SalePromotion1\CashReturn.cpp
文件 277 2013-02-22 10:57 SalePromotion1\SalePromotion1\CashReturn.h
文件 147 2013-02-22 10:42 SalePromotion1\SalePromotion1\CashSuper.h
文件 7270 2013-02-23 10:55 SalePromotion1\SalePromotion1\Debug\BuildLog.htm
文件 12802 2013-02-23 10:29 SalePromotion1\SalePromotion1\Debug\CashFactory.obj
文件 11254 2013-02-22 10:45 SalePromotion1\SalePromotion1\Debug\CashNomal.obj
文件 11333 2013-02-22 10:49 SalePromotion1\SalePromotion1\Debug\CashRebate.obj
文件 11635 2013-02-22 10:58 SalePromotion1\SalePromotion1\Debug\CashReturn.obj
文件 67 2013-02-23 10:55 SalePromotion1\SalePromotion1\Debug\mt.dep
文件 1196 2013-02-21 19:56 SalePromotion1\SalePromotion1\Debug\SalePromotion1.exe.em
文件 1260 2013-02-21 19:56 SalePromotion1\SalePromotion1\Debug\SalePromotion1.exe.em
文件 1120 2013-02-23 10:55 SalePromotion1\SalePromotion1\Debug\SalePromotion1.exe.intermediate.manifest
文件 27584 2013-02-23 10:54 SalePromotion1\SalePromotion1\Debug\SalePromotion1.obj
文件 40894464 2013-02-21 19:56 SalePromotion1\SalePromotion1\Debug\SalePromotion1.pch
文件 70088 2013-02-23 10:49 SalePromotion1\SalePromotion1\Debug\SalePromotion1.res
文件 47518 2013-02-23 10:55 SalePromotion1\SalePromotion1\Debug\SalePromotion1Dlg.obj
文件 571528 2013-02-21 19:56 SalePromotion1\SalePromotion1\Debug\stdafx.obj
文件 1985536 2013-02-22 11:29 SalePromotion1\SalePromotion1\Debug\vc90(PC-ZHAOJIANKANG_2013-02-22 11-29-47).idb
文件 1985536 2013-02-23 10:55 SalePromotion1\SalePromotion1\Debug\vc90.idb
文件 3346432 2013-02-23 10:55 SalePromotion1\SalePromotion1\Debug\vc90.pdb
文件 2863 2013-02-21 19:44 SalePromotion1\SalePromotion1\ReadMe.txt
............此处省略25个文件信息
相关资源
- ISOIEC 14882 2017 c++ 2017标准
- Visual C++/Turbo C串口通信编程实践第2版
- CTP_API_C++可实盘多合约多策略版本源代
- C语言操作MySQL数据库
- 图书馆管理数据存储到mysql数据库中
- C++中文离线手册修正版第二版
- 基于VC++ Socket 网络调试助手源码
- C++ 解析rtsp流后返回Iplimage,用Opengl显
- 缓冲区分析
- C++开发web服务框架之HTTP Web框架的设计
- 使用c++开发的人脸识别 demo
- Visual C++实现MPEG/JPEG编解码技术代码集
- 计算路口通过车辆的 OPENCV C++
- Centos 6.7 gcc和gcc-c++的离线安装包
- Visual C++ +SQL Server数据库应用完全解析
- 吃豆子游戏 C++
- C++数据结构实现池塘夜降彩色雨附带
- Hands-On GUI Programming with C++ and Qt5
- Directshow实现的虚拟摄像头win10+vs2013
- C++ MFC 吹泡泡 源代码
- C++使用protobuf 作为网络消息协议
- Microsoft Visual C++ 2013 runtime 64/32 运行库
- libstdc++.so.6.0.23
- Introduction to Design Patterns in C++ with Qt
- 游戏编程代码\\游戏编程学习笔记之九
- 《c++程序设计》谭浩强完整版
- C++ Primer第五版 源代码
- C++沉思录 第2版 经典必读
- c++程序设计 谭浩强176905
- 《VC++网络编程开发与实战光盘》案例
评论
共有 条评论