College Management System In C++ With Source Code
The College Management System In C++ is developed in C Programming Language, The College Attendance Management System Project In C++ is based on the concept of managing the student’s record. It is a simple system, therefore, it does not contain a login system. The user can manage students record by adding, updating, removing, viewing and searching for details.
A College Management System Project In C Language makes easy for storing records with in a short period of time rather than maintaining records in copies. User has to input Student ID no. ,name, address, contact number and course name.
This College Management System Project also includes a downloadable College Management System Project In C++ Free Download, just find the downloadable source code below and click to start downloading.
To start creating a College Management System In C++, make sure that you have code blocks or any platform of C/C++ language installed in your computer.
Steps on how to create a College Management System In C++ With Source Code
College Management System In C++ With Source Code
- Step 1: Create a new project.
First open the code blocks IDE and click “create a new project“.
- Step 2: Choose console application.
Second click the “console application” and after that click “next“.
- Step 3: Choose C language.
Third choose “C++ language” and click “next“.
- Step 4: Name Your Project.
Fourth name the project you’ve created and click “next” after that click “finish“.
- Step 5: The actual code.
You are free to copy the given source code below or download the downloadable source code given.
The Code Given Below Is For Display Module
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 |
void display() { system("CLS"); cout<<"\t\tDisplay Records"; cout<<"\n"; cout<<"\n Name - "<<name; cout<<"\n Reg no. - "<<reg; cout<<"\n Branch - "<<branch; cout<<"\n"; system("PAUSE"); system("CLS"); } bool operator == (student a) { if(reg==a.reg) return true; else return false; } }; vector <student>v; int search_reg(long int reg,int &i); void get_file() { student x; int i=0; fstream f; f.open("College.txt",ios::in); if(f) { f.read((char *) &x,sizeof(class student)); while(!f.eof()) { v.push_back(x); f.read((char *) &x,sizeof(class student)); } } else ; f.close(); } void bubblesort() { int i,j; student x; for(i=0;i<v.size();i++) for(j=0;j<v.size()-i-1;j++) if(v[j].reg>v[j+1].reg) { x=v[j]; v[j]=v[j+1]; v[j+1]=x; } } |
In this module which is the display module of the system.
The Code Given Below Is For The Insert Module
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
void insert_new() { char ch='y'; int ta; while(ch=='y') { fflush(stdin); student x; x.input(); if(search_reg(x.reg,ta)==0) v.push_back(x); else cout<<"\nTHE REGISTRATION NO. ALREADY EXIST!!!\nCANNOT ADD"; cout<<"\n Press [Y] to enter more: "; cin>>ch; fflush(stdin); } } |
In this module which is the module for inserting the records.
The Code Given Below Is For The Write File Module
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 |
void write_file() { bubblesort(); fstream f; f.open("College.txt",ios::out); for(int i=0;i<v.size();i++) { student x=v[i]; f.write((char *) &x,sizeof(class student)); } f.close(); } int search_reg(long int reg,int &i) { int ta=0; for(i=0;i<v.size();i++) if(v[i].reg==reg) { ta=1; break; } return ta; } int search_name(char name[],vector<int> &vi) { int i,ta=0; for(i=0;i<v.size();i++) if(strcmp(v[i].name,name)==0) { ta=1; vi.push_back(i); } return ta; } int search_branch(char branch[],vector<int> &vj) { int i,ta=0; for(i=0;i<v.size();i++) if(strcmp(v[i].branch,branch)==0) { ta=1; vj.push_back(i); } return ta; } |
In this module which is the module for write file the records.
The Code Given Below Is For The Search Module
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 |
void search_and_show() { int ch,i,ta=0; char name[80],branch[50]; vector <int>vi; vector <int>vj; long int reg; poi: cout<<"\n1.Press to search reg no." <<"\n2.Press to search name" <<"\n3.Press to search branch"; cin>>ch; switch(ch) { case 1: cout<<"\nEnter reg no.: "; cin>>reg; if(search_reg(reg,i)==1) v[i].display(); else cout<<"\nRecord NOT FOUND!!!"; break; case 2: cout<<"\nEnter name: "; fflush(stdin); gets(name); if(search_name(name,vi)==1) { for(int j=0;j<vi.size();j++) v[vi[j]].display(); } else cout<<"\nRecord NOT FOUND!!!"; break; case 3: cout<<"\nEnter branch: "; fflush(stdin); gets(branch); if(search_branch(branch,vj)==1) { for(int j=0;j<vj.size();j++) v[vj[j]].display(); } else cout<<"\nRecord NOT FOUND!!!"; break; default: cout<<"\nWrong CHOICE!!!"; goto poi; } } |
In this module which is the module for searching and display records.(College Management System Using C++)
Complete Source Code
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 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
#include<iostream> #include<vector> #include<stdio.h> #include<cstring> #include<fstream> #include<algorithm> using namespace std; class student { public: long int reg; char name[80],branch[50]; void input() { cout<<"\n Enter name: "; gets(name); cout<<"\n Enter roll no: "; cin>>reg; fflush(stdin); cout<<"\n Enter Branch: "; gets(branch); } void display() { system("CLS"); cout<<"\t\tDisplay Records"; cout<<"\n"; cout<<"\n Name - "<<name; cout<<"\n Reg no. - "<<reg; cout<<"\n Branch - "<<branch; cout<<"\n"; system("PAUSE"); system("CLS"); } bool operator == (student a) { if(reg==a.reg) return true; else return false; } }; vector <student>v; int search_reg(long int reg,int &i); void get_file() { student x; int i=0; fstream f; f.open("College.txt",ios::in); if(f) { f.read((char *) &x,sizeof(class student)); while(!f.eof()) { v.push_back(x); f.read((char *) &x,sizeof(class student)); } } else ; f.close(); } void bubblesort() { int i,j; student x; for(i=0;i<v.size();i++) for(j=0;j<v.size()-i-1;j++) if(v[j].reg>v[j+1].reg) { x=v[j]; v[j]=v[j+1]; v[j+1]=x; } } void insert_new() { char ch='y'; int ta; while(ch=='y') { fflush(stdin); student x; x.input(); if(search_reg(x.reg,ta)==0) v.push_back(x); else cout<<"\nTHE REGISTRATION NO. ALREADY EXIST!!!\nCANNOT ADD"; cout<<"\n Press [Y] to enter more: "; cin>>ch; fflush(stdin); } } void write_file() { bubblesort(); fstream f; f.open("College.txt",ios::out); for(int i=0;i<v.size();i++) { student x=v[i]; f.write((char *) &x,sizeof(class student)); } f.close(); } int search_reg(long int reg,int &i) { int ta=0; for(i=0;i<v.size();i++) if(v[i].reg==reg) { ta=1; break; } return ta; } int search_name(char name[],vector<int> &vi) { int i,ta=0; for(i=0;i<v.size();i++) if(strcmp(v[i].name,name)==0) { ta=1; vi.push_back(i); } return ta; } int search_branch(char branch[],vector<int> &vj) { int i,ta=0; for(i=0;i<v.size();i++) if(strcmp(v[i].branch,branch)==0) { ta=1; vj.push_back(i); } return ta; } void search_and_show() { int ch,i,ta=0; char name[80],branch[50]; vector <int>vi; vector <int>vj; long int reg; poi: cout<<"\n1.Press to search reg no." <<"\n2.Press to search name" <<"\n3.Press to search branch"; cin>>ch; switch(ch) { case 1: cout<<"\nEnter reg no.: "; cin>>reg; if(search_reg(reg,i)==1) v[i].display(); else cout<<"\nRecord NOT FOUND!!!"; break; case 2: cout<<"\nEnter name: "; fflush(stdin); gets(name); if(search_name(name,vi)==1) { for(int j=0;j<vi.size();j++) v[vi[j]].display(); } else cout<<"\nRecord NOT FOUND!!!"; break; case 3: cout<<"\nEnter branch: "; fflush(stdin); gets(branch); if(search_branch(branch,vj)==1) { for(int j=0;j<vj.size();j++) v[vj[j]].display(); } else cout<<"\nRecord NOT FOUND!!!"; break; default: cout<<"\nWrong CHOICE!!!"; goto poi; } } void show() { int i; for(i=0;i<v.size();i++) v[i].display(); } void delete_data() { int i,j; long int reg; vector <student>::iterator p=v.begin(); cout<<"\nEnter Reg. no.: "; cin>>reg; if(search_reg(reg,i)==1) { student x=v[i]; cout<<"\nThe following data is being deleted"; x.display(); p+=i; v.erase(p,p+1); } } void edit_data() { int i,j; long int reg; vector <student>vi; cout<<"\nEnter Reg. no.: "; cin>>reg; if(search_reg(reg,i)==1) { cout<<"\nEnter new data:"; fflush(stdin); v[i].input(); } } int main() { int i=1; get_file(); while(i) { system("CLS"); cout<<"\t\t\t-----------------------------------------\n"; cout<<"\t\t\t Simple College Management System\n"; cout<<"\t\t\t-----------------------------------------\n"; cout<<"\n\t\t\tEnter <1> to Add new student" <<"\n\t\t\tEnter <2> to Display all student" <<"\n\t\t\tEnter <3> to Remove student" <<"\n\t\t\tEnter <4> to Edit student" <<"\n\t\t\tEnter <5> to Search student" <<"\n\t\t\tEnter <0> to Exit\n"; cout<<"\n\n\t\t\tEnter Your Choice:"; cin>>i; switch(i) { case 1 : insert_new(); break; case 2 : show(); break; case 3 : delete_data(); break; case 4 : edit_data(); break; case 5 : search_and_show(); break; case 0 : write_file(); break; default : cout<<"\nWRONG CHOICE!!!\nTRY AGAIN"; } } return 0; } |
ABOUT PROJECT | PROJECT DETAILS |
---|---|
Project Name : | College Management System |
Project Platform : | C/C++ |
Programming Language Used: | C++ Programming Language |
Developer Name : | itsourcecode.com |
IDE Tool (Recommended): | Dev-C++/Codeblocks |
Project Type : | Desktop Application |
Database: | Stores data in .DAT file |
Upload Date and Time: | October 19, 2020 – 8:18 am |
Downloadable Source Code
Summary
The whole project is designed in ‘C++’ language and different variables and strings have been used for the development of this project. This mini project is easy to operate and understand by the users.
This simple project can enhance the knowledge of the beginners or the students to develop their skills in programming, also this project is easy to understand the module and their variables.
Related Articles
- Number System Conversion Project in C with Source Code
- Prison Management System Project in C with Source Code
- Department Store Management System Project in C with Source Code
- Best C Projects with Source Code for Beginners Free Download 2020
- Bank Management System in C with Source Code
- School Billing System in C with Source Code
- Hotel Management System Project In C With Source Code
- Employee Management System In C With Source Code
- Mini Project for Phonebook in C with Source Code
- Calendar In C Programming With Source Code
- Student Record System in C with Source Code
- Library Management System In C With Source Code
- Simple Hospital Management System In C With Source Code
Inquiries
If you have any questions or suggestions about College Management System In C++ , please feel free to leave a comment below.