C++课程设计 课外兴趣小组管理系统

该程序设计了一个用于管理课外兴趣小组信息的系统,包括学生类、兴趣类和兴趣类型类。系统实现了学生信息的添加、修改、删除和查询功能,并能将数据保存到文件。程序使用C++实现,包含学生的基本信息如学号、姓名、性别,以及兴趣爱好等。用户可以通过菜单交互进行操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、程序基本功能

1)该系统主要处理课外兴趣小组的相关信息。

2)学生信息主要包括:学号、姓名、性别、兴趣爱好等内容。

3)兴趣主要包括:兴趣编号、兴趣类型等内容。

4)完成以下的操作:实现学生兴趣信息的添加、修改、删除和查询。

2、程序设计方案和原理 

        1)建立学生类、兴趣类、兴趣类型类

        2)学生、兴趣、兴趣类型信息的初始化

        3)学生、兴趣、兴趣类型信息的添加、修改、删除、查找

        4)学生兴趣信息的输出

        5)将学生兴趣信息保存为文件

 3、思维导图

 

4、程序的代码实现 

 

#include<iostream.h>
#include<string.h>
#include<iomanip.h>
#include<fstream.h>
//学生类
class Student
{
public:
	Student(int stu_no1=-1,char* name1=" ",char* sex1=" ");
	~Student();
	int stu_no;
	char* name;
	char* sex;
};
Student::Student(int stu_no1,char* name1,char* sex1)
{
	stu_no=stu_no1;
	name=new char[strlen(name1)+1];
	strcpy(name,name1);
	sex=new char[strlen(sex1)+1];
	strcpy(sex,sex1);
}
Student::~Student()
{
	delete []name;
	delete []sex;
}
//兴趣类
class Intrest:public Student
{
public:
	Intrest(int stu_no1,char* name1,char* sex1,int num1=-1,char* style1=" ");
	~Intrest();
	int num;
	char* style;
};
Intrest::Intrest(int stu_no1,char* name1,char* sex1,int num1,char* style1):Student(stu_no1,name1,sex1)
{
	num=num1;
	style=new char[strlen(style1)+1];
	strcpy(style,style1);
}
Intrest::~Intrest()
{
	delete []style;
}
//兴趣类型类
class Kind:public Intrest
{
public:
	Kind(int stu_no1=-1,char* name1=" ", char* sex1=
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值