Click here to load reader

COMPUTER SCIENCE INVESTIGATORY PROJECT

  • View
    340

  • Download
    15

Embed Size (px)

Text of COMPUTER SCIENCE INVESTIGATORY PROJECT

  • Page | 1

    CERTIFICATE OF AUTHENCITY

    THIS IS TO CERTIFY THAT MASTER NIKHIL DWIVEDI OF CLASS XII-A OF KENDRIYA VIDYALAYA ASC CENTER(S) HAS SUCCESSFULLY CARRIED OUT THE INVESTIGATORY PROJECT ENTITLED STUDENT REPORT CARD UNDER THE SUPERVISION OF COMPUTER SCIENCE TEACHER MRS B. SHARADA FOR THE ACADEMIC YEAR 2016-2017. ALL THE WORKS RELATED TO THE PROJECT IS DONE BY THE CANDIDATE HIMSELF. THE APPROACH TOWARDS THE SUBJECT HAS BEEN SINCERE AND SCIENTIFIC.

    ROLL NO- DATE-

    Signature (Subject teacher) Signature (Examiner)

  • Page | 2

    ACKNOWLEDGEMENT

    I feel proud to present my Investigatory project in Computer Science on the topic STUDENT REPORT CARD. This project wouldnt have been feasible without the proper and rigorous guidance of my Computer Science teacher who guided me throughout this project in every possible way. An investigatory project involves various difficult codings which have to be carried out by the student to obtain the observations and conclude the report on a meaningful note. Rigorous hard work has been put in this project to ensure that it proves to be the best. I hope that this project will prove to be a breeding ground for the next generation of students and will guide them in every possible way.

  • Page | 3

    INDEX

    Introduction Header files used Working C++ coding Output Screenshots Bibliography

  • Page | 4

    INTRODUCTION C++ is a general-purpose programming language. It has imperative, object-oriented andgeneric programming features, while also providing facilities for low-level memory manipulation. It was designed with a bias toward system programming and embedded, resource-constrained and large systems, with performance, efficiency and flexibility of use as its design highlights.[5] C++ has also been found useful in many other contexts, with key strengths being software infrastructure and resource-constrained applications,[5] including desktop applications, servers (e.g. e-commerce,web search or SQL servers), and performance-critical applications (e.g. telephone switches or space probes).[6] C++ is a compiled language, with implementations of it available on many platforms and provided by various organizations, including the Free Software Foundation (FSF's GCC), LLVM, Microsoft, Intel and IBM. C++ is standardized by the International Organization for Standardization (ISO), with the latest standard version ratified and published by ISO in December 2014 as ISO/IEC 14882:2014 (informally known as C++14).[7] The C++ programming language was initially standardized in 1998 as ISO/IEC 14882:1998, which was then amended by the C++03, ISO/IEC 14882:2003, standard. The current C++14 standard supersedes these and C++11, with new features and an enlarged standard library. Before the initial standardization in 1998, C++ was developed by Bjarne Stroustrup at Bell Labs since 1979, as an extension of the C language as he wanted an efficient and flexible language similar

  • Page | 5

    to C, which also provided high-level features for program organization. Many other programming languages have been influenced by C++, including C#, D, Java, and newer versions of C (after 1998).

  • Page | 6

    HEADER FILES USED

    #include #include #include #include #include

  • Page | 7

    WORKING

    This program is designed to create a Student Report Card. It provides the following option to the users: Shows Class Result Shows Student Report Card Create Student Record Display all Student Record Search Student Record Modify Student Record Delete Student record

  • Page | 8

    PROGRAM CODING #include #include #include #include #include class student { int rollno; char name[50],password,kvmeg; int p_marks, c_marks, m_marks, e_marks, cs_marks; float per; char grade; void calculate(); public: void getdata(); void showdata(); void show_tabular();

  • Page | 9

    int retrollno(); int roll() { return(rollno); } }; void student::calculate() { per=(p_marks+c_marks+m_marks+e_marks+cs_marks)/5; if(per>=60) grade='A'; else if(per>=50) grade='B'; else if(per>=33) grade='C'; else grade='F'; }

  • Page | 10

    void student::getdata() { int r; student s; coutr; fstream sid("student.dat",ios::binary|ios::in); while(!sid.eof()) { sid.read((char*)&s,sizeof(student)); if(s.roll()==r) { cout

  • Page | 11

    cin>>p_marks; coutc_marks; coute_marks; coutm_marks; coutcs_marks; calculate(); cout

  • Page | 12

    cout

  • Page | 13

    return rollno; } void write_student(); void display_all(); void display_sp(int); void modify_student(int); void delete_student(int); void class_result(); void result(); void intro(); void entry_menu(); int main() { s: char ch; cout.setf(ios::fixed|ios::showpoint); cout

  • Page | 14

    clrscr(); cout

  • Page | 15

    case '4': break; default:cout

  • Page | 16

    ifstream infile; infile.open("student.dat",ios::binary); if(!infile) { cout

  • Page | 17

    void display_sp(int n) { student st; ifstream infile; infile.open("student.dat",ios::binary); if(!infile) { cout

  • Page | 18

    } } infile.close(); if(flag==0) cout

  • Page | 19

    while(file.read((char*)&st, sizeof(student))&&found==0) { if(st.retrollno()==n) { st.showdata(); cout

  • Page | 20

    } void delete_student(int n) { int flag=0; student st; ifstream infile; infile.open("student.dat",ios::binary); if(!infile) { cout

  • Page | 21

    infile.read((char*)&st, sizeof(student)); if(infile.eof()) break; if(st.retrollno()!=n) { outfile.write((char*)&st,sizeof(student)); } else if(st.retrollno()==n) { flag=1; } } outfile.close(); infile.close(); remove("student.dat"); rename("temp.dat","student.dat"); if(flag==1) cout

  • Page | 22

    getch(); } void class_result() { student st; ifstream infile; infile.open("student.dat",ios::binary); if(!infile) { cout

  • Page | 23

    cout

  • Page | 24

    cout

  • Page | 25

    cout

  • Page | 26

    cout

  • Page | 27

    cin>>num; delete_student(num); break; case '6': break; dafault: cout

  • Page | 28

    SCREENSHOTS

  • Page | 29

  • Page | 30

  • Page | 31

  • Page | 32

  • Page | 33

  • Page | 34

    BIBLIOGRAPHY

    Getting started with C++ by Sumita Arora www.slideshare.com en.wikipedia.org www.google.com www.icbse.in