课程设计
**\n。 cout\n\n\n。 cout\t\t 功能菜单 \n\n。 cout\t(1) 信息录用 \n。 cout\t(2) 添加物品信息 \n。 cout\t(3) 显示物品信息 \n。 cout\t(4) 查找物品信息 \n。 cout\t(5) 删除物品信息 \n。 cout\t(6) 保存物品信息 \n。 cout\t(7) 退出 \n。 cout\n 请输入 1 或 2 或 3
类层次中各个类的描述(包括属性和方法); ( 4) 完成类层次中各个成员函数的定义; ( 5) 完成系统的应用模块; ( 6) 功能 调试; ( 7) 完成系统总结报告以及系统使用说明书。 : ( 8) 只能使用 C/C++语言,源程序要有适当的注释,使程序容易阅读 ( 9) 至少采用文本菜单界面(如果能采用图形菜单界面更好) ( 10) 学生可自动增加新功能模块 2 总体设计 杂志订阅管理系统
*term)。 //取得一项的系数 int getdegreeofterm(char *term)。 //返回 term这项的 x的阶数 int remaindertheorem(char *equ,float root)。 //判断 root是否为方程 的解 ,不是返回 1 int exp(int,int)。 //求解 val的 e次幂 float exp(float val,int e)。
tart字符串开始位置上,操作正确返回 1*/ inline FString operator(const char *sAppend)。 //新增函数,重载减法运算符 inline FString operator(const FString sAppend)。 //新增函数,重载减法运算符 inline FString operator=(char* val)。 //新增函数
//商品信息录入 void Alter()。 //商品信息修改 void list()。 //商品信息显示 void Display()。 float Checkout(int quantity)。 //单个商品小结 void Total()。 //总计 void buy()。 //商品买入 tong类 析构函数 商品 信息录入 (Set) 商品信息修改(Alter) 商品信息显示(list)
开始界面 ( 1)只能使用 C/C++语音,源程序要有适当的注释,使程序容易阅读 ( 2)至少采用文本菜单界面(如果能采用图形菜单界面更好) ( 3)学生可自动增加新功能模块(视情况可加分) 2 总体设计 5 3 详细设计 ) class student 通过定义一个类来定义数据录入的函数 { char name[4]。 char name[4]。 double chinese,math
******/ /* 函数名称: operator == 功能描述:重载运算符 == 修改记录: */ bool operator ==(rational num1,rational num2) { if( == amp。 amp。 == ) return true。 else return false。 }
oid output()。 //输出格式 void paixu()。 //航班排序 void chushihua()。 //系统初始化 13 void build()。 //建立数据文件 void paixu1()。 //按航班号从小到大排序 void paixu2()。 //从大到小 void main() //主函数 { int j。 chushihua()。
{ printf (\t\tWarning : Wrong Task! Please Select Again\n)。 } } } void checkin()//录入模块 { char name[20],sex,ch。 int inti=0,intj=0。 printf (\t\tInput Information(Name sex(F/M)):)。 scanf (%s %c,name,amp
void save(struct student a[])。 //存档函数 19 void main() //主函数开始 { int number。 int x,y。 for(y=0。 y99。 y++) //将所有成绩清空 { for(x=0。 x6。 x++) { stu[y].f[x].s=NULL。 } }