I have a project for school and I cant figure out what to do. I need all the help I can get. Its due tonight and I am stumped. I have spent 7hrs on it today already and Im stumped 100%. Here is the assignment. We use Netbeans to write.
The elementary school for which you are doing development work has asked you to create a program to store quiz grades for the students of a class. The program should prompt the teacher to input a student number. The quiz score for that student will be displayed. The program can prompt for each quiz score or the scores can be preloaded or hard-coded into the program. Your solution must include an array. Your solution must include 5 parts in addition to the coded solution.
Thank you so much for any help. Email me directly at <email snipped> with anything you come up with.
Sorry I dont know how to make it come out with all the numbers on the side and all that. Im a JAVA newbie.
Here is what I have so far:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ip5;
import java.util.Scanner;
/**
*
* @author Ed
*/
public class Main {
public static void main(String[] args) {
int[] student;
// declares an array of integers
student = new int[10];
// allocates memory for 10 integers
student[0] = 92; // initialize first element
student[1] = 88; // initialize second element
student[2] = 75; // etc.
student[3] = 97;
student[4] = 93;
student[5] = 72;
student[6] = 66;
student[7] = 90;
student[8] = 89;
student[9] = 80;
{
for (int x=0 ; x >100 ; x++){
System.out.println("The grade of student number" + x + "is " + student[x]);
System.out.println("Student number 0 has a grade of: " + student[0]);
System.out.println("Student number 1 has a grade of: " + student[1]);
System.out.println("Student number 2 has a grade of: " + student[2]);
System.out.println("Student number 3 has a grade of: " + student[3]);
System.out.println("Student number 4 has a grade of: " + student[4]);
System.out.println("Student number 5 has a grade of: " + student[5]);
System.out.println("Student number 6 has a grade of: " + student[6]);
System.out.println("Student number 7 has a grade of: " + student[7]);
System.out.println("Student number 8 has a grade of: " + student[8]);
System.out.println("Student number 9 has a grade of: " + student[9]);
}
}