ADD file via upload

main
pofu6wkq7 12 months ago
parent e1a40a4268
commit ebf496d4e1

@ -0,0 +1,43 @@
#include <iostream>
#include <vector>
#include <string>
// 学生类
class Student {
public:
std::string name;
int id;
// 构造函数等
};
// 宿舍类
class Dormitory {
public:
int roomNumber;
std::vector<Student> students;
// 构造函数等
};
// 宿舍管理系统类
class DormitoryManagementSystem {
private:
std::vector<Student> students;
std::vector<Dormitory> dormitories;
public:
void addStudent(const Student& student) {
students.push_back(student);
}
void addDormitory(const Dormitory& dormitory) {
dormitories.push_back(dormitory);
}
// 其他管理功能...
};
int main() {
DormitoryManagementSystem system;
// 添加学生、宿舍等
return 0;
}
Loading…
Cancel
Save