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

SUBJECT: Selection, Loops, Program Design Given: A file that contains a student

ID: 3622289 • Letter: S

Question

SUBJECT: Selection, Loops, Program Design
Given: A file that contains a student name and a grade on exam1 and grade on exam2 for 25 students. ( ex, make a filed named grades.txt)

Write a program that gives the user the choice of the following calculations:
Class Average (exam1, exam2)
Student Average (all 25 students)
Standard Deviation (exam1, exam2)
Letter grades (all 25 students)
Minimum/Maximum (and the students who got them),
Locate : given a student name find the grades
Locate All students where the difference between exam1 and exam2>15%
Histogram
Update data (enter name, testno, score)
Quit

Requirements:
You must use at least one event controlled loop and one count controlled while loop and one for loop to read in data within your calculations.
You should include appropriate error messages (one of the problems)
You can assume that there is only one maximum and only one minimum grade (no ties)

Step 1: Create a data file with 25 sets of numbers
Step 2: Write a menu which will prompt the user for his choice and using an if/then statement write to the screen an appropriate message in response to his selection. For example "you choose average" in response to an average calculation selection.
Step 3: Do the Class average calculation
Step 4 … Select the next easiest calculation and code. Check this calculation before continuing to next one.
1) handle ties in the Min/Max calculation
2)Graph histogram
A *****
B *********
C******
D****
F **
3) Graph histogram
5 | ***
4 | ***
3 | *** *** ***
2 | *** *** *** ***
1 | *** *** *** ***
-------------------------------------
A B C D F

Explanation / Answer

/* * Grades from Student Numbers Array program * Nov.10,2008 * To change this template, choose Tools | Templates * and open the template in the editor. */ package grades; import java.util.Scanner; /** * * @author David */ public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here Scanner keyboard = new Scanner(System.in); int[][] grades; grades = new int[20][10]; String answer = "y"; int student; for (int count1=0; count1