Giter VIP home page Giter VIP logo

cmd-student-database-system's Introduction

cmd-student-database-system

Object Oriented Programming - SCS1209

Problem

A program is required that will do some processing of student records such as awarding grades and displaying various statistical summaries. The subject data is stored in a file on a subject by subject basis, each subject containing details of students enrolled and mark received. The problem is to be solved using an object oriented approach.

Description of Class and its functionality

The subject data is stored on a file (subjdata.txt) in the format given below. The subject data will need to be maintained by your program in an array that is to be loaded into main memory when the program first starts. Data needs to be kept sorted by student ID within each subject. The subject class must have operations to provide the functionality as described on the following. The decisions with regard to which members should be private or public, used of friend functions, and how functions are to be implemented is left to you. When the program starts it should automatically read the data stored in subjdata.txt into an array of objects of the type described above into main memory. The program should automatically calculate and store a grade for each student (on a subject by subject basis) according to the following:

x = numeric score Grade
x < 30 F
30 <= x < 40 D
40 <= x < 55 C
55 <= x < 70 B
70 <= x A

The array used to store the student details for each subject should be sorted to allow more efficient searching to be effected. After loading the file into memory and allocating grades your program should display a menu that has the following options:

  1. Display Subject
  2. Display Student
  3. Display Subject Summary
  4. Save Summaries
  5. Exit Program

Option One (1) is selected when the user wants to display a specific subject’s details. The user is prompted to enter a 7 character subject code that is searched for in the array. If found, all details of that subject are displayed (i.e. Student IDs, Marks, Grades), or alternatively an error message displayed. These details should be held on the screen until the user presses a key to continue, at which point the menu is to be redisplayed.

Option two (2) is selected when the user wants to display a single student’s details. The user is prompted to enter a student number that is searched for in each of the subjects. The first two digits of the student number represents last two digits of the year. Details of results in each subject should be displayed if the student is found or an error message displayed. These details should be held on the screen until the user presses a key to continue, at which point the menu is to be redisplayed.

Option three (3) is selected when the user wants to display the summary of details from a specific subject. The user is prompted to enter a subject code that is searched for in the array. If found, a listing indicating the average mark, Standard deviation and number of each grade allocated is displayed. These details should be held on the screen until the user presses a key to continue, at which point the menu is to be redisplayed.

Option four (4) is selected when the user wishes to save on disk the summaries of all subjects. The details are to be saved in the file (summdata.txt). Refer the following example which indicates the format of the file.

SCS1201 50 A 15.4% B 17.2% C 32.0% D 19.8% E 15.6% …….
…….

There should be a single space between each of the values on each line. The data shown here corresponds to the example shown indicating the format of the input file.

Option five (5) is selected when the user wishes to exit the program.
Constant values and file format

The following declarations need to be included in your program:

cons int MAXSUBJECTS = 10
cons int MAXSTUDENTS = 100

So that you know how to read the data from the file subjdata.txt the following format has been adopted:

SCS1201 50
17000001 23
17000002 43
…….
…….
SCS1202 45
17000002 56
17000003 65
…….
…….

The following should be noted in reference to the file structure depicted.
The first data item is the subject code (7 characters), the next data item on the same line indicates the number of students in that subject (3 digits) and the following n lines indicates the student number (8 digits) and the raw mark (out of 100) received.

cmd-student-database-system's People

Contributors

codekcg23 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.