C#课程设计报告_第1页
C#课程设计报告_第2页
C#课程设计报告_第3页
C#课程设计报告_第4页
C#课程设计报告_第5页
已阅读5页,还剩15页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

0 一 设计内容与设计要求 1 课程设计目的 课程设计目的 全面熟悉 掌握 C 编程 面向对象的基础知识 较熟练地编写基于 C 的 windows 应用程序 了解 C 的常用类库 编程技巧 异常处理 联系已 学的内容 巩固所学的理论 增强独立工作能力 通过设计主要使学生有 一个独立编写程序的过程 对理论学习及动手能力都有一个很大的提高 为后继课程 ASP net 的实验以及课程设计打下较扎实的基础 2 课题题目课题题目 1 银行业务管理系统设计与实现 3 设计要求 设计要求 1 课程设计环境要求 操作系统 Windows XP SP3 或是 Windows 7 内存要求 至少 512MB 开发环境要求 安装了 VS2008 SP1 的 VS 2008 Professional 简体中文版 2 设计内容要求 在银行业务管理中 不同银行规定有不同的账户类型 如整存整取 零存整取 存本取息 通知存款 定额定期 订货两便和活期储蓄等 本课程设计不处理这么复杂的内容 而是假定只提供三种账户 活期存 款账户 定期存款账户和零存整取账户 1 活期存款账户规定 创建活期账户时 必须提供帐户名和开户金额 而账号则根据存款 分类自动生成 活期存款账号的范围为 10001 19999 包括 10001 和 19999 默认为 0 03 每次取款时 不论存款时间多长 都要根据当 前余额结算一次利息 并将利息附加到现有余额中 然后再从中取出指 定的款数 向现有账户追加存款时 不进行结算 2 定期存款账户规定 创建定期账户时 必须提供帐户名和开户金额 而账号则根据存款 分类自动生成 定期存款账号的范围为 20001 29999 包括 20001 和 1 2999 定期存款要求一次性存款 一次性取款 100 元起存 期限规定 为只提供 1 年 3 年和 5 年三种定期 三种到期利率默认分别为 0 1 0 3 和 0 5 如果到期后客户没有取款 超出存款期限部分的 利率按 0 03 计算 如果客户提前取款 取款时利率全部按 0 02 计算 每次取款时 不论存款时间多长 都要根据当前余额结算一次利息 并 将利息附加到现有余额中 然后再从中取出指定的款数 向现有账户追 加存款时 不进行结算 利息结算方式为 到期利息 定期利率 存款金额 超期利息 存款金额 到期利息 超期利率 3 零存整取规定 创建零存整取账户时 必须提供帐户名和开户金额 而账号则根据 存款分类自动生成 零存整取账号的范围为 30001 39999 包括 30001 和 3999 零存整取要求每月都必须存固定的金额 5 元起存 一次取 款 存款期限规定为只提供 1 年 3 年和 5 年三种 到期利率默认为 0 05 0 1 和 0 3 如果到期后客户没有取款 超出存款期限部分的 利率按 0 025 如果客户没有按规定存款 取款时利率全部按 0 015 计算 每次取款时 不论存款时间多长 都要根据当前余额结算一次利 息 并将利息附加到现有余额中 然后再从中取出指定的款数 向现有 账户追加存款时 不进行结算 利息结算方式为 到期利息 到期利率 每月固定金额 月数 超期利息 总存款金额 到期利息 超期利率 4 要允许用户随时查询自己的存取款信息 查询时要求提供用户 名 存款类型和账户 5 程序要易于扩充 即需要增加存款业务类型时 要能够利用已 经实现的功能 通过尽量少的代码快速实现 3 课程设计文档要求 1 每位同学提交一份打印的课程设计报告 2 报告内容要求 2 系统功能介绍 并用 viso 画出系统整体框架图 主要模块划分 并用 viso 画出系统功能模块图 程序运行界面截图及说明 系统主要亮点介绍 设计中遇到的问题 难点及解决方法 3 按规定格式完成课程设计报告 将其打印稿 A4 纸 上交给老师 存档 4 不得抄袭他人课程设计报告 每个人应体现自己的个性设计 二二 进进度度安安排排 第 1 周 星期三 8 时 00 分 12 时 00 分 第 1 周 星期四 8 时 00 分 12 时 00 分 第 1 周 星期五 8 时 00 分 12 时 00 分 附 课程设计报告装订顺序 封面 任务书 目录 正文 评分 附件 A4 大小的图纸及程序清单 正文的格式 一级标题用 3 号黑体 二级标题用 4 号宋体加粗 正文用小四号宋体 行距为 22 目录 1 系统开发背景 1 2 系统功能模块 1 3 主要模块划分 2 3 1 活期存款账户规定 2 3 2 定期存款账户规定 2 3 3 零存整取账户规定 3 4 程序运行界面截图及说明 3 4 1 开户 3 4 2 存款和取款 4 4 3 显示界面 4 5 源代码 4 6 调试过程中的问题 难点及解决方法 15 7 评分表 16 注意 注意 1 此目录供参考 此目录供参考 目录中的页码要写好 目录中的页码要写好 2 课设报告的装订顺序 此文档的前五页课设报告的装订顺序 此文档的前五页 目录目录 正文正文 评分表 起始页码从评分表 起始页码从 正文开始 正文开始 注意 前四页的内容中的课题题目需列出具体题目 注意 前四页的内容中的课题题目需列出具体题目 0 1 系统开发背景 系统开发背景 全面熟悉 掌握 C 编程 面向对象的基础知识 较熟练地编写基于 C 的 windows 应用程序 了解 C 的常用类库 编程技巧 异常处理 联系已学的内 容 巩固所学的理论 增强独立工作能力 通过设计主要使学生有一个独立编 写程序的过程 对理论学习及动手能力都有一个很大的提高 为后继课程 ASP net 的实验以及课程设计打下较扎实的基础 2 系统功能模块 系统功能模块 用户可以根据需求选择不同的银行 然后在银行里面选择不同的存款类型 一般的存储类型有 整存整取 零存整取 存本取息 通知存款 定额定期 订货两便和活期储蓄等 本课程设计不处理这么复杂的内容 而是假定只提供 三种账户 活期存款账户 定期存款账户和零存整取账户 这样用户选择存储 类型后 就可以开户 存款和取款等业务了 开户 存储类型选择 活期存款 定期存款零存整取 存款或取款 1 3 主要模块划分 主要模块划分 3 1 活期存款账户规定 活期存款账户规定 创建活期账户时 必须提供帐户名和开户金额 而账号则根据存款分类自动 生成 活期存款账号的范围为 10001 19999 包括 10001 和 19999 默认为 0 03 每次取款时 不论存款时间多长 都要根据当前余额结算一次利息 并 将利息附加到现有余额中 然后再从中取出指定的款数 向现有账户追加存款 时 不进行结算 3 2 定期存款账户规定 定期存款账户规定 创建定期账户时 必须提供帐户名和开户金额 而账号则根据存款分类自动 生成 定期存款账号的范围为 20001 29999 包括 20001 和 2999 定期存款要 求一次性存款 一次性取款 100 元起存 期限规定为只提供 1 年 3 年和 5 年 三种定期 三种到期利率默认分别为 0 1 0 3 和 0 5 如果到期后客户没 有取款 超出存款期限部分的利率按 0 03 计算 如果客户提前取款 取款时 利率全部按 0 02 计算 每次取款时 不论存款时间多长 都要根据当前余额 结算一次利息 并将利息附加到现有余额中 然后再从中取出指定的款数 向 现有账户追加存款时 不进行结算 利息结算方式为 到期利息 定期利率 存款金额 超期利息 存款金额 到期利息 超期利率 2 3 3 零存整取账户规定 零存整取账户规定 创建零存整取账户时 必须提供帐户名和开户金额 而账号则根据存款分类 自动生成 零存整取账号的范围为 30001 39999 包括 30001 和 3999 零存整 取要求每月都必须存固定的金额 5 元起存 一次取款 存款期限规定为只提 供 1 年 3 年和 5 年三种 到期利率默认为 0 05 0 1 和 0 3 如果到期后 客户没有取款 超出存款期限部分的利率按 0 025 如果客户没有按规定存款 取款时利率全部按 0 015 计算 每次取款时 不论存款时间多长 都要根据当 前余额结算一次利息 并将利息附加到现有余额中 然后再从中取出指定的款 数 向现有账户追加存款时 不进行结算 利息结算方式为 到期利息 到期利率 每月固定金额 月数 超期利息 总存款金额 到期利息 超期利率 4 程序运行界面截图及说明 程序运行界面截图及说明 4 1 开户 开户 3 4 2 存款和取款 存款和取款 4 3 显示界面 显示界面 5 源代码 源代码 Customs cs class Customs private string accountName public CustomType BankCustomType get protected set public string AccountNumber get protected set 4 public float AccountBalence get protected set public string Time public int flag public float benjin public int Year public string AccountName get return accountName set if string IsNullOrEmpty value throw new Exception 账号名不能为null或者空字符串 else for int i 0 i value Length i if char IsLetter value i false throw new Exception zhuanghuzjiyunxuzhimuhuohanzizucheng else accountName value public List PerAccountList get set public void Diposit float money if money 0 throw new Exception 存款金额不能为零或负值 else AccountBalence money AddList 存款 money protected void AddList string typeInfo float money PerAccountList Add string Format 账号 0 姓名 1 存款金额 2 3 yyyy MM dd HH mm ss 4 5 f2 元 余额 6 f2 元 AccountNumber AccountName BankCustomType 5 DateTime Now typeInfo money AccountBalence protected void AddList string typeInfo float money string year PerAccountList Add string Format 账号 0 姓名 1 存款金额 2 3 yyyy MM dd HH mm ss 4 5 f2 元 余额 6 f2 元 期限 7 AccountNumber AccountName BankCustomType DateTime Now typeInfo money AccountBalence Time public bool ValidBeforeWithdraw float money if money AccountBalence MessageBox Show qukuangjinebunengfayuyue return false return true public virtual void Withdraw float money AccountBalence money AddList 取款 money 6 Checkingcustoms cs class CheckingCostoms Customs private static int newAccountNumber 10001 public float InterestRate get return 0 0003f public CheckingCostoms string accountName float accountBalence if newAccountNumber 19999 throw new Exception huoqicunkuangzhuanghu else this AccountName accountName this AccountBalence accountBalence this BankCustomType CustomType 活期存款 this AccountNumber newAccountNumber ToString newAccountNumber PerAccountList new List AddList kaihu accountBalence public override void Withdraw float money if ValidBeforeWithdraw money false return float rate InterestRate AccountBalence AccountBalence rate AddList jiesuanlixi rate base Withdraw money 7 FixedCustoms cs class FixedCustoms Customs private static int newAccountNumber 20001 public float InterestRate get string s1 int s2 s3 s1 DateTime Now ToString yyyy s2 Convert ToInt32 s1 if Time 一年 s3 s2 Year if s3 1 flag 1 return 0 0002f else if s3 1 flag 0 return 0 001f else flag 1 return 0 001f else if Time 三年 s3 s2 Year if s3 3 flag 1 return 0 0002f else if s3 3 flag 0 return 0 003f else flag 1 return 0 003f else s3 s2 Year if s3 29999 throw new Exception dingqicunhaoyijinyongwan else string s1 int s2 s1 DateTime Now ToString yyyy s2 Convert ToInt32 s1 this AccountName accountName this AccountBalence accountBalence this BankCustomType CustomType 定期存款 this Time year this Year s2 this AccountNumber newAccountNumber ToString newAccountNumber PerAccountList new List AddList 开户 accountBalence year public override void Withdraw float money if ValidBeforeWithdraw money false return float rate 0 rate1 0 if flag 0 AccountBalence rate AddList 利息结算 rate base Withdraw money else rate InterestRate AccountBalence AccountBalence rate rate1 0 0003f AccountBalence AccountBalence rate1 AddList 利息结算 rate1 base Withdraw money 9 lingcunzhengqu cs class Lingcunzhengqu Customs private static int newAccountNumber 30001 public float InterestRate get string s1 int s2 s1 DateTime Now ToString yyyy s2 Convert ToInt32 s1 if Time 一年 if AccountBalence benjin 12 flag 1 return 0 00015f else if AccountBalence benjin 12 flag 0 return 0 0005f else flag 1 return 0 0005f else if Time 三年 if AccountBalence benjin 36 flag 1 return 0 00015f else if AccountBalence benjin 36 flag 0 return 0 001f else flag 1 return 0 001f else 10 if AccountBalence 39999 throw new Exception dingqicunhaoyijinyongwan else string s1 int s2 s1 DateTime Now ToString yyyy s2 Convert ToInt32 s1 this AccountName accountName this AccountBalence accountBalence this BankCustomType CustomType 零存整取 this Time year this Year s2 this benjin accountBalence this AccountNumber newAccountNumber ToString newAccountNumber PerAccountList new List AddList 开户 accountBalence year public override void Withdraw float money if ValidBeforeWithdraw money false return float rate 0 rate1 0 int yueshu yueshu int AccountBalence benjin if flag 0 AccountBalence rate AddList 利息结算 rate base Withdraw money else rate InterestRate benjin yueshu rate1 0 00025f AccountBalence rate AccountBalence rate1 AddList 利息结算 rate1 base Withdraw money Mianform cs public partial class MainForm1 Form private static SortedDictionary customers new SortedDictionary public MainForm1 InitializeComponent string accountTypeString Enum GetNames typeof CustomType comboBox1 Items AddRange accountTypeString comboBox1 SelectedIndex 0 this StartPosition FormStartPosition CenterScreen private void MainForm1 Load object sender EventArgs e private void button1 Click object sender EventArgs e 12 float money if float TryParse textBox2 Text out money false MessageBox Show 开户金额不正确 无法开户 MessageBoxButtons OK MessageBoxIcon Question return CreateCustom comboBox1 Text textBox1 Text money comboBox2 Text private void CreateCustom string customTypeString string userName float initMoney string year Customs newCustom null if customTypeString 活期存款 try newCustom new CheckingCostoms userName initMoney catch Exception ex MessageBox Show ex ToString else if customTypeString 定期存款 if Int32 Parse textBox2 Text 100 MessageBox Show 开户金额不足 无法开户 MessageBoxButtons OK MessageBoxIcon Question else try newCustom new FixedCustoms userName initMoney year catch Exception ex MessageBox Show ex ToString return else if Int32 Parse textBox2 Text 5 MessageBox Show 开户金额不足 无法开户 MessageBoxButtons OK MessageBoxIcon Question else try newCustom new Lingcunzhengqu userName initMoney year catch Exception ex MessageBox Show ex ToString return 13 if newCustom null customers Add newCustom AccountNumber newCustom UpdateAccountInfo newCustom AccountNumber private void UpdateAccountInfo string account listBox1 Items Clear Customs custom customers account foreach var info in custom PerAccountList listBox1 Items Add info private void button2 Click object sender EventArgs e float money if ParseMoney textBox4 Text 存款 out money return Customs custom GetCustom textBox3 Text if custom null return t

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论