欢迎来到天天文库
浏览记录
ID:11706554
大小:701.50 KB
页数:37页
时间:2018-07-13
《身份证号码验证课程设计》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、验证身份证号码的正确性目录1绪论····························································11.1课题内容与要求··············································11.2需求分析····················································11.3操作环境·····················································12功能实现设计························
2、····························22.1总体设计·····················································22.1.1程序设计组成框图········································22.1.2数据流图················································22.2详细设计第36页共34页验证身份证号码的正确性·····················································32.2.
3、1存放信息设计···········································42.2.2构造函数设计···········································42.2.3判断信息是否正确·······································92.2.4新旧身份证号转换······································132.2.5窗口类的创建及实现····································133运行结果·················
4、·······································144总结····························································16参考文献···························································17附录·······························································18第36页共34页验证身份证号码的正确性1绪论1.1课题内容与要求课题内容身份证第18位(校验码)
5、的计算方法:(1)将前面的身份证号码17位分别乘以不同的系数:从第一位到第十七位的系数分别为:7-9-10-5-8-4-2-1-6-3-7-9-10-5-8-4-2;(2)将这17位数字和系数相乘的结果相加;(3)用加出来和除以11,得余数;(4)余数0-1-2-3-4-5-6-7-8-9-10对应的最后一位身份证号码为1-0-X-9-8-7-6-5-4-3-2;身份证号码的第七位到十四位为出生年月日,应符合现实;课题要求(1)使用java语言完成本课题的程序设计,并具有一定的深度和难度;(2)结构化程序设计,源程序要有适当的注释,使程序容易阅读;(3)能先对问题进
6、行分析然后进行设计最后进行编码的原则。每一步都要有文档产生;(4)程序一定要做必要的测试和分析,必须得到合理结果;(5)可适当添加功能,让程序更具有实用性。第36页共34页验证身份证号码的正确性(6)提交的所有材料必须符合《长沙理工大学课程设计管理规定》(长理工大[2005]8号)的要求。1.2需求分析本课题主要目的是为了设计一套程序来验证给出的身份证号是否正确,如若正确将身份证号所体现的关键信息性别,年龄,出生日期展现给用户,同时考虑到实实际情况给出了十五位身份证号转十八位,以及十八位转十五位的算法,从而给相关部门机构带来方便。1.3操作环境MyEclipse8.
7、52功能实现设计2.1总体设计根据上面的分析,将系统分为几大部分:判断身份证号的位数以及每一位是否正确,判断出生年月是否符合实际,根据算法运算对比校验码是否正确,新旧身份证号转换,提取输出关键信息。2.1.1程序设计组成框图身份证号验证系统5.提取输出关键信息。4.新旧身份证号转换。3.运算校验码,并比较第十八位时候为校验码。2.判断出生年月日时候符合实际,特别是二月。1.接收用户输入的身份证号,判断位数及每一位是否正确。2.1.2数据流图第36页共34页验证身份证号码的正确性开始退出系统提取输出关键信息十八位转十五位(十五位转十八位)判断校验码是否匹配计算校验
此文档下载收益归作者所有