已阅读5页,还剩8页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
电子系XX级软件课程设计指导书 (1)?C+Builder?,?File?New?Application?,?乬?Form1?TForm?File?Save,?(?)?Myapp?MyProj?Run?(?F9?)?乏?,?,?催?,?. (2)?Standard?,?TMainMenu?,?哴?,偀?.?.?.?,?. (3)?Standard?TPanel?,?哴?,偀?Panel?Width?Height?300h320?Left=0?Top=0?BevelInner=bvLowered?BevelInner=bvRaised?买?ColorclInfoBk?3?Panel?Width?Height?115h135?BevelInner=bvLowered?BevelInner=bvRaised?买?ColorclBtnHighlight?Caption?Font=Times NewRoman?size72?买?买?Caption?A?2?10?J?Q?K?1?13?h?r?()?Button1Click(TObject*Sender)? (4)?Standard?TMemo?TMemo1?TMemo2?TButton?(),?14?1?13?A,2?K?13?Caption?乬?1?13?()?24?TMemo1?TMemo1?3.4?24?24?4?1?13?乎?乬?a?b?c?d?1?(a?b)=a+b,a-b,a*b,a/b?b/a?(a?b)?c?(a?b)?c)?d?(a?b)?c)?G?4h4h4?a,b?C42=6?c?d?C21?6h2h4h4h4768?(a?b)?(c?d)?a,b?C42=6?(c?d)?6h1h4h4h4384?4?乘?if(?)?else if(?)?else if(?)?else if(?)?else?1?2?3.5Demo?3.5.1?int ConvertCharToNumber(AnsiString as)/?if(as=A)return1;else if(as=K)return13;else if(as=Q)return12;else if(as=J)return11;else returnStrToInt(as);AnsiString ConvertNumberToChar(int as)/?if(as=1)returnA;else if(as=13)returnK;else if(as=12)returnQ;else if(as=11)returnJ;else returnIntToStr(as);53.5.2?a,b?int*result?佪?bool GetTwoValue(int a,int b,int*result)result0=a+b;/+result1=a*b;/*result2=abs(a-b);/-if(ab?b%a:a%b)=0)/result3=ab?b/a:a/b;/?else result3=-1;return true;3.5.3?int GetThreeValue(int a,int b,int c,int*p)a,b,c?int*p?佪?GetTwoValue(int a,int b,int*result)?3.5.4?24?24?24int Get2Result(int a,int b)if(a+b=24)return1;if(abs(a-b)=24)return2;if(a*b=24)return3;if(a=0|bb?a%b:b%a)=0)/?if(ab?a/b:b/a)=24)return4;else return0;else return0;63.5.5?1?void GetOneGroupValue(int a,int b,int c,int d)?D?b?c?d?int GetTwoGroupValue(int a,int b,int c,int d)?(a?b)?(c?d)?3.5.6?void create_four_number()int a,b,c,d;a=random (1000);/?1000?a=a%14;if(a=0)a=1;Panel1-C aption=ConvertNumberToChar(a);b=random (1000);b=b%14;if(b=0)b=1;Panel2-C aption=ConvertNumberToChar(b);c=random (1000);c=c%14;if(c=0)c=1;Panel3-C aption=ConvertNumberToChar(c);d=random (1000);d=d%14;if(d=0)d=1;Panel4-Caption=ConvertNumberToChar(d);?Panel1?Panel4?Panel-Caption?7?乘?乎?嗣?24?3.6? (1)?Demo?乬? (2)? (3)?24?(?)?Demo? (4)?乬?4.1?8CMD_START_GAMECMD_ACCEPT_GAME/CMD_REFUSET_GAMECMD_ONE_GAMECMD_OAKY_GAMECMD_SEND_NUMBERCMD_SEND_NUMBERSeverCMD_START_CALCULATCMD_FINISH_CALCULATCMD_ABORT_CALCULATECMD_EXIT_GAMECMD_SEND_MSGServer/Client?Client?Server?Client?CMD_START_GAME?CMD_ACCEPT_GAME?CMD_REFUSET_GAME?Client?Sever?CMD_ACCEPT_GAME?CMD_ONE_GAME?Sever?Sever?CMD_OAKY_GAME?Client?Client?CMD_SEND_NUMBER?Server?(a,b)?CMD_SEND_NUMBER?CMD_SEND_NUMBER?Client?(c,d)?Client?Server?CMD_SEND_NUMBER?CMD_START_CALCULATE?Sever?CMD_FINSIH_CALCULATE?CMD_ABORT_CALCULATE?CMD_EXIT_GAME?CMD_SEND_MSG?94.2?Sever?/?Server?IP?TCP/IP?C+Builder?TcpServer/TcpClient?4.3?typedef structshort C MD_Type;/?short length;/?char*pData;/?10C MD_Packet;? (1)CMD_START_GAME-?C MD_Type=CMD_START_GAME?length=0;pData=NULL; (2)CMD_ACCEPT_GAME-?CMD_Type=CMD_ACCEPT_GAME?length=0;pData=NULL; (3)CMD_ONE_GAME-?CMD_Type=CMD_ONE_GAME?length=0;pData=NULL; (4)CMD_OAKY_GAME-?CMD_Type=CMD_OAKY_GAME?length=0;pData=NULL; (5)CMD_SEND_NUMBER-?C MD_Type=CMD_SEND_NUMBER?length=2;pData=char2?; (6)CMD_START_CALCULATE-?C MD_Type=CMD_START_CALCULATE?length=0;pData=NULL; (7)CMD_FINSIH_CALCULATE-?CMD_Type=CMD_FINSIH_CALCULATE?length=n;pData=charn;? (8)CMD_ABORT_CALCULATE-?C MD_Type=CMD_ABORT_C ALCULATE?length=0;pData=NULL; (9)CMD_SEND_MSG-?CMD_Type=CMD_SEND_MSG?length=n;pData=charn;? (10)CMD_EXIT_GAME-?CMD_Type=CMD_EXIT_GAME?length=0;pData=NULL;?int ParseCMD(CMD_Packet cmdPack)11switch(cmdPack.CMD_Type)case CMD_START_GAME:/doing codebreak;case CMD_ACCEPT_GAME:/doing codebreak;default:break;return0;2.6? (1)?IP/Port? (2)? (3)? (1)?咬? (2)?0?-l? (3)?savedTag? (4)? (1)? (2)? (3)? (4)? (5)? (1)? (2)? (3)? (1)? (2)? (3)? (1)?咬? (2)?0?-l? (3)? (1)?咬? (2)?0?-1? (3)?咬? (4)? (5)? (1)?”?”?”?”?”?”? (2)?-1- (3)? (5)? (6)? (7)? (8)? (1)?”?”?”?”?”?”? (2)? (3)? (4)? (5)? (6)? (7)? (1)?”?”?”?”?”?”? (2)? (3)? (1)? (2)? (3)? (4)? (5)? (1)? (2)? (3)? (1)? (2)? (1)? (2)? (3)?c?1? (4)?5?c?(17?)?c?-1?乎?-1?Student.c?main Menu_select Handle_menu NewRecordsQuitDisplay.c showTablegetIndex addRecordDisplay Add_disp.c removeRecordfindRecod queryInfocopyRecordmodifyRecordSave_load.c SaveLoadStudent.h?Sort.c sortInfo?StuInfo?StuInfo?records?INITIAL_SIZE?INCR_SIZE?numStus?arraySize?savedTag?“?”?“?”?int SaveRecords(void)?咬?stu info?void?0?-1?records?int loadRecords(void)?咬?stu info?void?0?-1?records?void display(VOid)?void?void?void addRecord(void)?void?void?void showTable(void)?void?void?int getIndex(float sum)?sum?0?numStus-1?float?int?sum?0?numStus-1?void removeRecord(void)?void?void?int findRecord(char*?int?int)?char*target?乍?target?int targetType?乍?0?1?2?int from?from?int?-1?-1?void queryInfo(void)?void?void?void copyRecord(stuinfo*?stuinfo*)?src?dest?stuinfo*src?stuInfo*dest?void?void modifyRecord(void)?void?void?void sortInfo(void)?void?void?void handle_menu(void)?void?void?int menu_select(void)?void?int?void newRecords(void)?void?void?saveRecords?void quit(ADDR*)?void?void?void main(void)?void?void?student.h?1Student.h?#ifndef H_STUDENT_HH#define H_STUDENT_HH?STUDENT_H?”?studenth?#include”student”?#ifndef H_STUDENT_HH#define H_STUDENT_HH#include#include#include#define INITIAL_SIZE100#define INCR_SIZE50#define NUM_SUBJECT5/?/?/?struct student_infochar number15;/?char name20;/?char gender4;/?float scoreNUM_SUBJEC T;/?5?float sum?/?float average;/?int index;/?;typedef structstudent_info StuInfo;extern intnumStus;/?extern StuInfo*records;/?extern charsavedTag?/?0?l?extern intarraySize;/?extern char*subject;void
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 安全生产应急管理课件
- 感染管理部门五年发展规划
- 安全生产课件动漫
- 南宫市北湖小学安全课件
- 恐惧症自测题症状与应对方法解析
- 环境科学相关知识点检测题与答案详解
- 环境治理与污染物控制测试题集及解析
- 家庭安全应急指南及考试题库
- 建筑给排水工程综合测试题解析
- 科学实验室操作考试指南与模拟题集
- 2026年建设工程造价案例分析(交通运输工程)综合考试题
- 主题班会活动方案设计与实施步骤
- 2025年南昌市消防救援支队水上大队招聘勤务及宣传勤务文员3人笔试考试参考试题及答案解析
- 2025年中国新能源公交车发展现状与市场前景分析
- 2025云南大理州建设投资(集团)有限公司招聘专业技术人员19人笔试历年典型考点题库附带答案详解试卷2套
- 2025年“一带一路”人工智能应用场景案例集-上海人工智能研究院
- AxureRP9互联网产品原型设计课件全套第1-12章了解互联网产品原型设计-设计制App原型
- 2026莱商银行校园招聘笔试考试参考题库附答案解析
- 2025辽宁大连庄河市招录社区工作人员62人考试笔试备考试题及答案解析
- 2026黄河勘测规划设计研究院有限公司招聘高校毕业生87人考试笔试备考题库及答案解析
- 煤矿重大灾害治理顶层设计方案
评论
0/150
提交评论