Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

Java project: Student Grade Program

DBprogrammer
DBprogrammer 


Create a program to enter grades and calculate averages and letter grades. 1. Need a class which will contain: a. Student Name b. Student Id c. Student Grades (an array of 3 grades) d. A constructor that clears the student data (use -1 for unset grades) e. Get functions for items a, b, and c, average, and letter grade f. Set functions for items a, n, and c g. Note that the get and set functions for Student grades need an argument for the grade index. 2. Need another class which will contain: a. An Array of Students (1 above) b. A count of number of students in use 3. You need to create a menu interface that allows you to: a. Add new students b. Enter test grades c. Display all the students with their names, ids, test grades, average, and letter grade d. Exit the program 4. Add comments and use proper indentation. Nice Features: • I would like that system to accept a student with no grades, then later add one or more grades, and when all grades are entered, calculate the final average or grade. • I would like the system to display the students in alphabetical order (no matter what order they are entered in) This project is a challenge. Do the best you can and I will grade it accordingly. Basically, I will award points for 1. Creating a Student class that can perform the tasks requested (30 points) 2. Creating an array of Student and loading it (20 points) 3. Modifying the data in that array (20 points) 4. Displaying results for all students (10 points) 5. Proper indentation, comments, and “Nice Features” items (20 points) 6. Note that submitting a program that does not compile is an automatic deduction of 20 points. If you have any questions, please contact me as soon as possible. An example menu might be: Enter A to Add Students Enter B to Enter Test Grades Enter C to Display Results Enter D to Exit Program Please select A, B, C, or D: For item B, you will need to prompt the user to enter the test number and then enter the value for each student for that test (if there is a previous value, you should display it and if the user enters the empty string, not change the value). Attachments
Tags Clarifications

Answers

Java - Student Grade - Solution

dickersonka
dickersonka 



Attached is the solution to the Java - Student Grade assignment including source and comments. This includes both of the nice features as well with sorting and adding grades after the students are entered. Attachments
StudentData.zip (109 K) Download
Preview
/** * StudentData class */ public class StudentData { /** * Entry point for StudentData * @param args */ public static void main(String[] args){ //runs the StudentData menu new StudentData().gatherData(); } /** * Gather data

Preview

Preview

Preview
/** * Get grade for index * @param index - test index * @return score for test index */ public int getGrades(int index) { return grades[index]; } /** * Set grade for index * @param index - test

Screenshots
Screenshot
Screenshot
Purchase Answer

Student Grade Program - Java

SW_wizard
SW_wizard 



Source code is attached Attachments
StudentGradeProgram.zip (2 K) Download
Preview
= new double[3]; //c. student grades private double average; private String letterGrade; //d. constructor to clear data public Student(){ for(int i=0; i<3; i++){ grades[i] = -1; } } //e. get functions public String getName(){ return

Preview
ch = scan.next().charAt(0); switch(ch){ case 'A': case 'a': //add students System.out.print("Enter name of student: "); String name = scan.next(); System.out.print("Enter id of student: "); int id = scan.nextInt(); test.studentArray[test.studentCount] = new Student(); test.studentArray[test.studentCount].setName(name); test.studentArray[test.studentCount].setID(id); test.studentCount++; break; case

Screenshots
Purchase Answer