I am working on a project for my intro class and have hit a wall. This is my first time doing this sort of thing so please be gentle
It goes as follows:
For this project, you will create a Java application that accepts a student’s class grades from the keyboard; calculates the average grade as a percentage for each grading category; and then calculates the overall grade as both a percentage and a letter grade. The program then creates a grade report on the console showing both detail and aggregate information.
The program prompts the user for the student’s name and stores that information in memory.
The application inputs scores from the user in four grading categories--quizzes, in-class assignments, homework assignments and attendance--and stores that information in memory. You may choose to use objects of a class you create to store the score information.
The application may prompt the user for this information using the console or a message dialog box.
The prompt to the user for each score will indicate both the category of the score and a unique identifier for the score, e.g. “Quiz 3” or “Attendance 9/29/2018.”
The program displays a report on the console with an appropriate title showing the student’s name that was entered by the user and the details of each grade entered:
grade category (quiz, in-class assignment, homework or attendance)
score name (e.g. “Quiz 3” or “Homework 4”)
points earned
points possible
The program displays on the report the average score, as a percentage, for each grading category and labels each clearly. Where you choose to display all the elements on the report is up to you. Just remember readability is important.
Attendance is worth 1 point per day and counts for 20% of the total grade. Create six attendance scores from user input.
Quizzes are 10 points each and count for 20% of the total grade. Create six quiz scores from user input.
In-class assignments are 10 points each and count for 20% of the total grade. Create six in-class assignment scores from user input.
Homework assignments are 20 points each and count for 40% of the total grade. Create six homework assignment scores from user input.
The report displays an overall grade as both a percentage and as a letter grade. Use the following ranges to determine the letter grade.
A
90 through 100
B
80 to < 90
C
70 to < 80
D
60 to < 70
F
< 60
So... (for what it's worth) here is what I have come up with so far...
package studentgrades; //*import packages*// import java.util.*; //declare class public class StudentGrades { //Declare scanner object public static Scanner sc = new Scanner(System.in); //Declare global variables public static int attendanceScore = 6; public static int quizScore = 60; public static int inclassScore = 60; public static int homeworkScore = 120; public static int inputStudent = 0; //main method public static void main (String[] args) { //call the method //Outputs introduction System.out.println("This program calculates the Student's six day attendance record,"); System.out.println("six different quiz scores, along with scores from six in-class"); System.out.println("assignments and six homework assignments."); System.out.println(""); System.out.println("The Student's final grade will be displayed"); System.out.println("as both a percentage and a letter grade."); System.out.println(); System.out.print("Input weights of each category"); System.out.println(); //weight of each category System.out.print("What is the Weight of Attendance? "); int attendanceWeight= sc.nextInt(); System.out.print("What is the Weight of Quizes? "); int quizWeight = sc.nextInt(); System.out.print("What is the Weight of In-Class Assignments? "); int inClassAssignmentWeight = sc.nextInt(); System.out.print("What is the Weight of Homework? "); int homeworkWeight = sc.nextInt(); System.out.println(); System.out.print("Please Enter Student's Name: "); int inputStudent = sc.nextInt(); //Enter grades for each attendance point System.out.print("Grade of attendance 10/8/2018? "); int attendance1 = sc.nextInt(); System.out.print("Grade of attendance 10/9/2018? "); int attendance2 = sc.nextInt(); System.out.print("Grade of attendance 10/10/2018? "); int attendance3 = sc.nextInt(); System.out.print("Grade of attendance 10/11/2018? "); int attendance4 = sc.nextInt(); System.out.print("Grade of attendance 10/12/2018? "); int attendance5 = sc.nextInt(); System.out.print("Grade of attendance 10/15/2018? "); int attendance6 = sc.nextInt(); //Enter grades for each quiz score System.out.print("Grade of quiz 1? "); int quiz1grade = sc.nextInt(); System.out.print("Grade of quiz 2? "); int quiz2grade = sc.nextInt(); System.out.print("Grade of quiz 3? "); int quiz3grade = sc.nextInt(); System.out.print("Grade of quiz 4? "); int quiz4grade = sc.nextInt(); System.out.print("Grade of quiz 5? "); int quiz5grade = sc.nextInt(); System.out.print("Grade of quiz 6? "); int quiz6grade = sc.nextInt(); //Enter grades for each in-class assignment score System.out.print("Grade of in-class assignment 1? "); int inclassAssignment1grade = sc.nextInt(); System.out.print("Grade of in-class assignment 2? "); int inclassAssignment2grade = sc.nextInt(); System.out.print("Grade of in-class assignment 3? "); int inclassAssignment3grade = sc.nextInt(); System.out.print("Grade of in-class assignment 4? "); int inclassAssignment4grade = sc.nextInt(); System.out.print("Grade of in-class assignment 5? "); int inclassAssignment5grade = sc.nextInt(); System.out.print("Grade of in-class assignment 6? "); int inclassAssignment6grade = sc.nextInt(); //Enter grades for each homework assignment score System.out.print("Grade of homework assignment 1? "); int homeworkAssingment1grade = sc.nextInt(); System.out.print("Grade of homework assignment 2? "); int homeworkAssingment2grade = sc.nextInt(); System.out.print("Grade of homework assignment 3? "); int homeworkAssingment3grade = sc.nextInt(); System.out.print("Grade of homework assignment 4? "); int homeworkAssingment4grade = sc.nextInt(); System.out.print("Grade of homework assignment 5? "); int homeworkAssingment5grade = sc.nextInt(); System.out.print("Grade of homework assignment 6? "); int homeworkAssingment6grade = sc.nextInt(); System.out.println(); System.out.println("Each grade as a Percentage for" + inputStudent + "per category are recorded as follows"); //Percentage of total in Attendance System.out.print("Attendance = " + (((attendanceWeight/100)*((attendance1 + attendance2 + attendance3 + attendance4 + attendance5 + attendance6)/(attendanceScore))+ "%" ))); System.out.println(); //Percentage of total in Quizes System.out.print("Quizes = " + (((quizWeight/100) * (quiz1grade + quiz2grade + quiz3grade + quiz4grade + quiz5grade + quiz6grade)/(quizScore)+ "%" ))); System.out.println(); //Percentage of total in In-class Assignments System.out.print("In-Class Assignments " + (((inClassAssignmentWeight/100) * (inclassAssignment1grade + inclassAssignment2grade + inclassAssignment3grade +inclassAssignment4grade + inclassAssignment5grade + inclassAssignment6grade)/(inclassScore)+ "%" ))); System.out.println(); //Percentage of total in In-class Assignments System.out.print("Homework Assignments " + (((homeworkWeight/100) * (homeworkAssingment1grade + homeworkAssingment2grade + homeworkAssingment3grade +homeworkAssingment4grade + homeworkAssingment5grade + homeworkAssingment6grade)/(homeworkScore)+ "&" ))); System.out.println(); System.out.println(); } }
Any help would be greatly appreciated!