Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Program: Grade Stats In this program you will create a utility to calculate and

ID: 3820313 • Letter: P

Question

Program: Grade Stats In this program you will create a utility to calculate and display various statistics about the grades of a class. In particular, you will read a CSV file (comma separated value) that stores the grades for a class, and then print out various statistics, either for the whole class, individual assignments, or individual students Things you will learn Robustly parsing simple text files Defining your own objects and using them in a program Handling multiple input commands Specification When your program starts, it should print the program title and your name, then load the file given as a command line argument similar to the sorting assignment). If no file is given, or if file does not the exist, the program should print a usage message and exit. After loading the input file, the program should go into "command" mode, which allows the user to type in various commands and get results from the system. This is similar to the calculator assignment. You should show some kind of a prompt, such as to the user, and wait for commands. The commands that your system must process are as follows: 1. exit Causes the program to exit. 2. help Causes the program to print a list of commands accepted by the system. This same message should be printed if the user types an unrecognized command. The program must not crash in this case. 3. roll Prints out a list of students from the class (first and last name along with total points, and final grades (A, B, C, D, F) for each student. These should be properly aligned in columns, so that the grades line up above one another, and the student first name and student last name are left aligned. 4. search [partial name]

Explanation / Answer

I can provide you with the logic of the program and the database overview for the given problem of the students grading system. Hope it will help you

1. I will start with the database overview for the given problem. So , here it goes:

First check out the requirements of the database for creating a student database

So,the database will look like this. It will consist of:

2. For storing subjects the table will be as follows

subject
sub_id
name
score_type - (grade/marks)
app_exams - (comma separated exam_type as you requested)
app_classes - (comma separated classes to which it is applicable as you requested)
optional - (It will accept boolean yes or no)

3. Table design to store subject

stud_subjects

4. Table to store the grades of the students

This is how the database overview of the given program must look like. The logic for the java program on the students overview is given as follows:-

import java.lang.*;
import java.util.*;
import java.io.*;


class StudentGrade
{

public static int ReadValues()
{
try
{
InputStreamReader input = new InputStreamReader(System.in);
BufferedReader reader = new BufferedReader(input);
return Integer.parseInt(reader.readLine());
}
catch (Exception e)
{

e.printStackTrace();
return 0;
}
}
  

public static void main(String[] args)
{   
System.out.println("Grading System.");

int stud = 30;
  
int [] studArr = new int[stud];
String grade = "";

for (int i = 0; i < stud; i++)
{
System.out.format("%d: ", i + 1);
studArr[i] = ReadValues();
}
System.out.print("Grades : ");

for (int i = 0; i < stud; i++)
{
if(studArr[i] > 100)
grades = "Error";
else if(studArr[i] > 90)
grades = "A+";
else if(studArr[i] > 70)
grades = "B+";
else if(studArr[i] > 50)
grades = "C+";
else if(studArr[i] > 30)
grades = "C";
else
grades = "F";
System.out.format("%d,%d,%s", i + 1, studArr[i], grades);
}
}
}