Student Management System using C++ With Source Code

Introduction :

This is a student record management system project, which enables you to create, read, modify, and delete student Records. This project is developed using the programming language C++.

Student Management system is a management information system for education to manage students’ data. It includes the idea of topics like structure, loops, arrays, if-else, switch, and so on. It helps the user to store student data and make changes to it such as Show, Update, Delete, and Search. The features of C++ programming language help here to manage data and apply logic to the programs.

Source Code:

				
					//PROJECT: Student Record Management System using C++
//Written by Nikhil 
#include<iostream>
using namespace std;
string roll_no[30],name[30],Class[30],course[30],mobile_no[30],admission_year[30];
//arrays for storing students data.
int total=0; //to store all data
void enter()
{
int ch=0;
cout<<"How many students do u want to enter??"<<endl;
cin>>ch;
if(total==0)
{
total=ch+total;
for(int i=0;i<ch;i++)
{
cout<<"\nEnter the Data of student "<<i+1<<endl<<endl;
cout<<"Enter Roll NO:: "<<endl; 
cin>>roll_no[i];
cout<<"Enter Name: "<<endl;
cin>>name[i];
cout<<"Enter Class: "<<endl;
cin>>Class[i];
cout<<"Enter Course: "<<endl;
cin>>course[i];
cout<<"Enter Mobile NO: "<<endl;
cin>>mobile_no[i];
cout<<"Enter Admission Year: "<<endl;
cin>>admission_year[i];
}
}
else 
{
for(int i=total;i<ch+total;i++) 
//to store onward students data rather than storing double data()
{
cout<<"\nEnter the Data of student "<<i+1<<endl<<endl;
cout<<"Enter Roll NO ";
cin>>roll_no[i];
cout<<"Enter Name: ";
cin>>name[i];
cout<<"Enter Class: ";
cin>>Class[i];
cout<<"Enter Course: ";
cin>>course[i];
cout<<"Enter Mobile NO: ";
cin>>mobile_no[i]; 
cout<<"Enter Admission Year: ";
cin>>admission_year[i];
}
total=ch+total; //making choice
}
}
void show()
{
if(total==0)
{
cout<<"No Data is Entered"<<endl;
}
else
{ 
for(int i=0;i<total;i++)
{
cout<<"\nData of Student "<<i+1<<endl<<endl;
cout<<"Roll NO "<<roll_no[i]<<endl;
cout<<"Name "<<name[i]<<endl;
cout<<"Class "<<Class[i]<<endl;
cout<<"Course "<<course[i]<<endl;
cout<<"Mobile NO "<<mobile_no[i]<<endl;
cout<<"Admission Year "<<admission_year[i]<<endl;
}
}
}
void search()
{
if(total==0)
{
cout<<"No data is entered"<<endl; 
}
else
{
string rollno;
cout<<"Enter the roll no of student"<<endl;
cin>>rollno;
for(int i=0;i<total;i++)
{
if(rollno==roll_no[i])
{
cout<<"Roll NO "<<roll_no[i]<<endl;
cout<<"Name "<<name[i]<<endl;
cout<<"Class "<<Class[i]<<endl;
cout<<"Course "<<course[i]<<endl;
cout<<"Mobile NO "<<mobile_no[i]<<endl;
cout<<"Admission Year "<<admission_year[i]<<endl;
}
} 
}
}
void update()
{
if(total==0)
{
cout<<"No data is entered"<<endl;
}
else{
string rollno;
cout<<"Enter the roll no of student which you want to update"<<endl;
cin>>rollno;
for(int i=0;i<total;i++)
{
if(rollno==roll_no[i]) 
{
cout<<"\nPrevious data"<<endl<<endl;
cout<<"Data of Student "<<i+1<<endl;
cout<<"Roll NO: "<<roll_no[i]<<endl;
cout<<"Name "<<name[i]<<endl;
cout<<"Class "<<Class[i]<<endl;
cout<<"Course "<<course[i]<<endl;
cout<<"Mobile NO "<<mobile_no[i]<<endl;
cout<<"Admission Year "<<admission_year[i]<<endl;
cout<<"\nEnter new data"<<endl<<endl;
cout<<"Enter Roll NO ";
cin>>roll_no[i];
cout<<"Enter Name: ";
cin>>name[i];
cout<<"Enter Class: ";
cin>>Class[i]; 
cout<<"Enter Course: ";
cin>>course[i];
cout<<"Enter Mobile NO: ";
cin>>mobile_no[i];
cout<<"Enter Admission Year: ";
cin>>admission_year[i];
}
}
}
}
void Delete()
{
if(total==0)
{
cout<<"No data is entered yet"<<endl;
}
else 
{
int a;
cout<<"Are you Sure to Delete Data?"<<endl;
cout<<"Press 1 to delete all record"<<endl;
cin>>a;
if(a==1)
{
total=0;
cout<<"All record is deleted..!!"<<endl;
}
else
{
cout<<"Please Press 1 to Delete All Record"<<endl;
}
}
} 
int main() //main function, execution of program starts from here
{
int value;
while(true) //always in Loop
{
cout<<"\nPress 1 to Enter data"<<endl<<endl;
cout<<"Press 2 to Show data"<<endl<<endl;
cout<<"Press 3 to Search data"<<endl<<endl;
cout<<"Press 4 to Update data"<<endl<<endl;
cout<<"Press 5 to Delete data"<<endl<<endl;
cout<<"Press 6 to Quit"<<endl<<endl;
cin>>value;
switch(value)
{
case 1:
enter(); 
break;
case 2:
show();
break;
case 3:
search();
break;
case 4:
update();
break;
case 5:
Delete();
break;
case 6:
exit(0);
break; 
default:
cout<<"Invalid input"<<endl;
break;
}
}
} 
				
			

Output:

Find More Projects

Bank Management System Using Python Django Introduction The Bank Management System V2.0.2 is a feature-rich online banking solution built using the Python …

Pharmacy Management System Using Python Django Introduction The Pharmacy Dispensing Management System is a robust and user-friendly software solution developed using Python …

Build a Quiz Game Using HTML CSS and JavaScript Introduction Hello coders, you might have played various games, but were you aware …

Emoji Catcher Game Using HTML CSS and JavaScript Introduction Hello Coders, Welcome to another new blog. In this article we’ve made a …

Typing Challenge Using HTML CSS and JavaScript Introduction Hello friends, all you developer friends are welcome to our new project. If you …

Breakout Game Using HTML CSS and JavaScript With Source Code Introduction Hello friends, welcome to today’s new blog post. All of you …

Download 1000+ Coding Projects Code