University Course Details Management System in c++

June 13, 2018 | Author: AJay Kumar Saklani | Category: C (Programming Language), Operating System, Computer Science, System Software, Computer Architecture
Report this link


Description

Lovely Professional UniversityTERM PAPER Of Ucdms University Course Details Management System Submitted To: ms. Rinku Lecturer lpu Submitted By:Name:-ajay kumar Roll No:-rd1206A26 Regd No:-11203127 ACKNOWLEDGEMENT It is not until you undertake the project like this one that you realize how massive the effort it really is, or how much you must rely upon the Selfless efforts and goodwill of others. There are many who helped us with this project, and we want to thank them all from the core of our Hearts. We owe special words of thanks to our Teachers MS. Rinku for their vision, thoughtful counseling and encouragement at every step of the project. We are also thankful to the teachers of the Department for giving us the best of knowledge and guidance throughout the project. And last but not the least, we find no words to acknowledge the financial assistance & moral support rendered by our parents in making the effort a success. All this has become reality because of their blessings and above all by the grace of god. TABLE OF CONTENTS S.N Content o 1 INTRODUCTION 2 3 4 5 6 7 Proposed system (a) (b) Description System Requirements Requirement analysis System Design Source code Testing Future scope project of OVERVIEW TO C++ HISTORY OF C++: C is a popular general purpose programming language. It is one of the most popular computer languages today, because it is a structured, high level, machine independent language. The root of all modern language is ALGOL, introduced in early 1960’s. ALGOL was the 1st computer language to use a block structure. Subsequently, several other languages were announced after 1960’s. In 1967, Martin Richard developed a language called BCPL i.e. basic combined programming language mainly for writing system software. In 1970, Ken Thompson created a language using many features of BCPL and called it simply B. B was used to create early version of UNIX operating system. C was evolved from ALGOL, BCPL, and B by Dennis Ritchie at the Bell Laboratories in 1972, strongly associated with UNIX. During 1970’s, C had evolved into the “TRADITIONAL C”. With the publication of the book ‘The C Programming language’ by Brian Kernighan and Dennis Ritchie in 1978, it becomes more powerful. In 1983, American National Standards Institutes (ANSI) appointed a technical committee to define a standard for C. The committee approved a version of C in December 1989, which is now known as ANSI C. It was then approved by International Standard Organization (ISO) in 1990. INTRODUCTION: We have discussed so far various features of C language and are ready to write and execute program of modest complexity. However, before attempting to develop complex programs, it is worthwhile to consider some programming techniques that would help design efficient and error free. The program development process includes three important stages, namely, program design, program coding and program testing. All the three stages contribute to the production of high quality program. In “University Course Details Management System” we have done system design, source coding, and program testing and added many more features to facilitate the user with the best. We have given the user the facility to enter the Student’s record and see whether the user is provided with the complete information. We can improve the efficiency of the system, thus overcome the drawbacks of the existing system. · Less human error · Strength and strain of registers and papers can be reduced · High security · Data consistency · Easy to handle · Easy data updating · Easy record keeping · Backup data can be easily generated Introduction of program management system We can make this Student record management system in C language by using three or more than three header files or many data types such as: 1. #include<stdio.h> : this header file will contain Scanf() , Printf () And, there are many header files which are used in this program…. 2. #include<conio.h>: this header file will contain Clrscr(); , Getch(); , and many more…. 3. #include<string.h> : this header file will contain string function. 4. #include<ctype.h> SYSTEM REQUIREMENTS Operating System: RAM: HARD DISK Processor Compiler Windows 2000/NT/Xp/Vista 256 MB or more 40 GB or more P3 or High Standard C++ Compiler SYSTEM DESCRIPTION THE OPERATING SYSTEM USED IN THIS PROJECT IS WINDOWSXPIT HAS MICROSOFT OFFICE INSTALLED IN IT. IT HAS RAM OF 2GB. HARD DISK CAPACITY OF OPERATING SYSTEM IS 250GB. IT CONSISTS OF PENTIUM-4 PROCESSOR.THE OPEREATING SYSTEM ALSO HAS C++ COMPILER. THE SYSTEM ALSO HAS TYPE CONVERSIONS WHICH CONVERT LOWER TO UPPER TYPE. THE OPERATING SYSTEM HAVE 1GB RAM FOR MICROSOFT WORLD. START MAIN MENU ENTER YOUR CHOICE PRESS[A] CREATE FILE PRESS[B] ADD RECORD PRESS[C] LIST RECORD PRESS[D] QUIT PROGRAM E WRONG KEY YES NO Stude nt name First name Last name Middle name Cours e code record PRINT STOP SOURCE CODE #include<iostream.h> #include<fstream.h> #include<iomanip.h> #include<stdio.h> #include<conio.h> class student { int regno; char name[50]; int t_course,p_course, f_course, e_course, m_course; //float per; //char grade; void calculate(); //function to calculate grade public: void getdata(); //function to accept data from user void showdata(); //function to show data on screen void show_tabular(); int retrollno(); }; void student::calculate() { } void student::getdata() { cout<<"\nEnter REG number "; cin>>regno; cout<<"\n\n Name of student "; gets(name); cout<<"\n TECHNICAL COURSE DETAILS : "; cin>>t_course; cout<<"\n PHARMA COURSE DETAILS : "; cin>>p_course; cout<<"\n FASHION COURSE DETAIL : "; cin>>f_course; cout<<"\n EDUCATIONAL COURSE DETAILS : "; cin>>e_course; cout<<"\n MANAGEMENT COURSE DETAILS : "; cin>>m_course; calculate(); } void student::showdata() { cout<<"\n reg number of student : "<<regno; cout<<"\nName of student : "<<name; cout<<"\n TECHNICAL COURSE : "<<t_course; cout<<"\n PHARMA COURSE : "<<p_course; cout<<"\n FASHION COURSE : "<<f_course; cout<<"\n EDUCATIONAL COURSE : "<<e_course; cout<<"\n MANAGEMENT COURSE :"<<m_course; } void student::show_tabular() { cout<<regno<<setw(6)<<" "<<name<<setw(10)<<t_course<<setw(4)<<p_course<<setw(4)<<f_course<<setw(4 )<<e_course<<setw(4)<<m_course<<setw(6)<<endl; } int student::retrollno() { return regno; } void write_student(); //write the record in binary file void display_all(); //read all records from binary file void display_sp(int); //accept rollno and read record from binary file void modify_student(int); //accept rollno and update record of binary file void delete_student(int); //accept rollno and delete selected records from binary file void class_result (); //display all records in tabular format from binary file void result(); //display result menu void intro(); //display welcome screen void entry_menu(); //display entry menu on screen void main() { char ch; cout.setf(ios::fixed|ios::showpoint); cout<<setprecision(2); // program outputs decimal number to two decimal places clrscr(); intro(); do { clrscr(); cout<<"\n\n\n\tMAIN MENU"; cout<<"\n\n\t01. Course Name"; cout<<"\n\n\t02. ADD/EDIT COURSE MENU"; cout<<"\n\n\t03. EXIT"; cout<<"\n\n\tPlease Select Your Option (1-3) "; cin>>ch; clrscr(); switch(ch) { case '1': result(); break; case '2':entry_menu(); break; case '3': break; default :cout<<"\a"; } }while(ch!='3'); getch(); } //*************************************************************** // function to write in file //**************************************************************** void write_student() { student st; ofstream outFile; outFile.open("student.dat",ios::binary|ios::app); st.getdata(); outFile.write((char *) &st, sizeof(student)); outFile.close(); cout<<"\n\n COURSE SELECTED "; cin.ignore(); getch(); } //*************************************************************** // function to read all records from file //**************************************************************** void display_all() { student st; ifstream inFile; inFile.open("student.dat",ios::binary); if(!inFile) { cout<<"File could not be open !! Press any Key..."; getch(); return; } cout<<"\n\n\n\t\tDISPLAY ALL RECORD !!!\n\n"; while(inFile.read((char *) &st, sizeof(student))) { st.showdata(); cout<<"\n\n====================================\n"; } inFile.close(); getch(); } //*************************************************************** // function to read specific record from file //**************************************************************** void display_sp(int n) { student st; ifstream inFile; inFile.open("student.dat",ios::binary); if(!inFile) { cout<<"File could not be open !! Press any Key..."; getch(); return; } int flag=0; while(inFile.read((char *) &st, sizeof(student))) { if(st.retrollno()==n) { st.showdata(); flag=1; } } inFile.close(); if(flag==0) cout<<"\n\nREG NO IS not exist"; getch(); } //*************************************************************** // function to modify record of file //**************************************************************** void modify_student(int n) { int found=0; student st; fstream File; File.open("student.dat",ios::binary|ios::in|ios::out); if(!File) { cout<<"File could not be open !! Press any Key..."; getch(); return; } while(File.read((char *) &st, sizeof(student)) && found==0) { if(st.retrollno()==n) { st.showdata(); cout<<"\n\nPlease Enter The New Details "<<endl; st.getdata(); int pos=(-1)*sizeof(st); File.seekp(pos,ios::cur); File.write((char *) &st, sizeof(student)); cout<<"\n\n\t Record Updated"; found=1; } } File.close(); if(found==0) cout<<"\n\n Record Not Found "; getch(); } //*************************************************************** // function to delete record of file //**************************************************************** void delete_student(int n) { student st; ifstream inFile; inFile.open("student.dat",ios::binary); if(!inFile) { cout<<"File could not be open !! Press any Key..."; getch(); return; } ofstream outFile; outFile.open("Temp.dat",ios::out); inFile.seekg(0,ios::beg); while(inFile.read((char *) &st, sizeof(student))) { if(st.retrollno()!=n) { outFile.write((char *) &st, sizeof(student)); } } outFile.close(); inFile.close(); remove("student.dat"); rename("Temp.dat","student.dat"); cout<<"\n\n\tRecord Deleted .."; getch(); } //*************************************************************** // function to display all students grade report //**************************************************************** void result() { student st; ifstream inFile; inFile.open("student.dat",ios::binary); if(!inFile) { cout<<"File could not be open !! Press any Key..."; getch(); return; } cout<<"\n\n\t\tALL COURSES ARE \n\n"; cout<<"================================================ ==========\n"; cout<<"S.No COURSE Name BCA MCA MBA PHD % FEES TIME PERIOD"<<endl; cout<<"================================================ ==========\n"; while(inFile.read((char *) &st, sizeof(student))) { st.show_tabular(); } getch(); inFile.close(); } //*************************************************************** // function to display result menu //**************************************************************** void entry_menu() { char ch; int rno; cout<<"\n\n\n\tDETAIL MENU"; cout<<"\n\n\n\t1. COURSE AND SUBJECT"; cout<<"\n\n\t2. FEES OF COURSE"; cout<<"\n\n\t3. Back to Main Menu"; cout<<"\n\n\n\tEnter Choice (1/2/3)? "; cin>>ch; clrscr(); switch(ch) { case '1': class_result(); break; case '2': cout<<"\n\n\tEnter Reg Number : "; cin>>rno; display_sp(rno); break; case '3': break; default: cout<<"\a"; } } //*************************************************************** // INTRODUCTION FUNCTION //**************************************************************** void intro() { cout<<"\n\n\n\t\t University Course Details Management System"; cout<<"\n\n\n\tMADE BY : Ajay Saklani"; cout<<"\n\tSCHOOL OF : LOVELY FACULTY OF TECHNOGY AND SCIENCES(LFTS)"; getch(); } //*************************************************************** // ENTRY / EDIT MENU FUNCTION //**************************************************************** void class_result() { char ch; int num; clrscr(); cout<<"\n\n\n\tENTRY MENU"; cout<<"\n\n\t1.CREATE NEW COURSE"; cout<<"\n\n\t2.DISPLAY ALL COURSES DETAILS"; cout<<"\n\n\t3.SEARCH COURSE DETAILS "; cout<<"\n\n\t4.MODIFY THE COURSE"; cout<<"\n\n\t5.DELETE/REMOVE COURSE "; cout<<"\n\n\t6.BACK TO MAIN MENU"; cout<<"\n\n\tPlease Enter Your Choice (1-6) "; cin>>ch; clrscr(); switch(ch) { case '1': write_student(); break; case '2': display_all(); break; case '3': cout<<"\n\n\tPlease Enter The REG number "; cin>>num; display_sp(num); break; case '4': cout<<"\n\n\tPlease Enter The REG number "; cin>>num; modify_student(num); break; case '5': cout<<"\n\n\tPlease Enter The REG number "; cin>>num; delete_student(num); break; case '6': break; default: cout<<"\a"; entry_menu(); } } OUTPUT SNAPSHOTS TESTING THE SOURCECODE DECLARED ABOVE FOR THE PROGRAM OF STUDENT RECOD MANAGEMENT SYSTEM HAS BEEN TESTED AND IT HAS BEEN FOUND THAT THE ABOVE SOURCE CODE IS OKAY AND CORRECT.THE PROGRAM INVOLVES MUCH TYPE OF CONVERSIONS. THESE CONVERSIONS HAS TO DONE CAREFULLY. MAINLY THERE ARE TWO TYPES OF TESTING: 1-SYSTEM TESTING AND 2-INTEGRATION TESTING SYSTEM TESTING INVOLVES WHOLE TESTING OF PROGRAM AT ONCE AND INTEGRATION TESTING INVOLVES THE BREAKING OF PROGRAM INTO MODULES & THEN TEST. FUTURE SCOPE In future one change can be done by adding the fingerprints of the student of which the record is entered. And one more major change which can be done in this project is that to add the snaps of the student of which the record is entered. We can also add or subtract details of the individual.


Comments

Copyright © 2024 UPDOCS Inc.