c++ student automation

hi

add students
add classroom
changing a student's class
delete student
delete class

i am doing a student automation with these features but i'm stuck. can you help me i cant go farther.

it's very simple and short but i'm newbie in programming

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
  #include <iostream> 
 #include <fstream> 
 #include <string> 
 using namespace std; 
  
  
  
 class Student
 { 
 private: 
 	string name, surname, number; 
 public: 
 	 
 }; 
  
 class Classroom
 { 
 public: 
 	string className; //when a new class is created, this variable should randomly add value like 2D 5A.
 	Student students[100]; //max 100 student 
  
 	void addStudent() 
 	{ 
  
 	} 
  
 	void delStudent() 
 	{ 
  
 	} 
 }; 
  
 class School
 { 
 public: 
 	School() // this func will read the class and student information in the regs.txt file and store them in a class array
 	{ 
  
 	} 
  
 	void print() //it will print all classes and students in the school to the regs.txt file. 
 		/* 
 		regs.txt format: 
 		1C					------> Classroom name
 		3					-------> number of students in class
 		Catlin HENDERSON 100  
 		Tessy BARNETT 101 
 		Toma RICE 102 
 		*/ 
 	{ 
  
 	} 
 	 
 }; 
  
 class Program 
 { 
 	School school; 
 	 
 	void run() // It will display the class and the students with the method that the school object wrote. The user will release the menu. ask the user to choose. 
 	{ 
  
 	} 
 }; 
 int main() 
 { 
 	Program prog; 
 	prog.run(); 
 } 
 }
Last edited on
I made some adjustments which is a step to completing the assignment:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
 #include <iostream> 
 #include <fstream> 
 #include <string> 
 using namespace std; 
  
  
  
 class Student
 { 
 private: 
 	string name, surname, number; 
 public: 
 	 
 }; 
  
 class Classroom
 { 
 private: 
 	static int count;
 public: 
 	string className; //when a new class is created, this variable should randomly add value like 2D 5A.
 	Student students[100]; //max 100 student 
  
 	void addStudent(Student stu) 
 	{ 
 		students[count] = stu;
 		count++;
 	} 
  
 	void delStudent() 
 	{ 
  	
 	} 
 }; 
  
 class School
 { 
 public: 
 	School() // this func will read the class and student information in the regs.txt file and store them in a class array
 	{ 
  
 	} 
  
 	void print() //it will print all classes and students in the school to the regs.txt file. 
 		/* 
 		regs.txt format: 
 		1C					------> Classroom name
 		3					-------> number of students in class
 		Catlin HENDERSON 100  
 		Tessy BARNETT 101 
 		Toma RICE 102 
 		*/ 
 	{ 
  
 	} 
 	 
 }; 
  
 class Program 
 { 
 	public:
 	School school; 
 	 
 	void run()
 	{ 
  
 	} 
 };

	int Classroom::count = 0;
  
 int main() 
 { 
 	Program prog; 
 	prog.run(); 
 } 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#include <iostream> 
 #include <fstream> 
 #include <string> 
 using namespace std; 
  
  
  
 class Student
 { 
 private: 
 	string name, surname, number; 
 public: 
 	 
 }; 
  
 class Classroom
 { 
 private: 
 	static int count;
 public: 
 	string className; //when a new class is created, this variable should randomly add value like 2D 5A.
 	Student students[100]; //max 100 student 
  
 	void addStudent(Student stu) 
 	{ 
 		students[count] = stu;
 		count++;
 	} 
  
 	void delStudent() 
 	{ 
  	
 	} 
 }; 
  
 class School
 { 
 public: 
 	School() // this func will read the class and student information in the regs.txt file and store them in a class array
 	{ 
  
 	} 
  
 	void print() //it will print all classes and students in the school to the regs.txt file. 
 		/* 
 		regs.txt format: 
 		1C					------> Classroom name
 		3					-------> number of students in class
 		Catlin HENDERSON 100  
 		Tessy BARNETT 101 
 		Toma RICE 102 
 		*/ 
 	{ 
  
 	} 
 	 
 }; 
  
 class Program 
 { 
 	public:
 	School school; 
 	 
 	void run()
 	{ 
  
 	} 
 };

	int Classroom::count = 0;
  
 int main() 
 { 
 	Program prog; 
 	prog.run();

        return 0; 
 } 
Topic archived. No new replies allowed.