I need this program to recieve : 1) an array of students and marks AND 2) an integer to indicate the student index for which the marks will be entered for. The program will prompt for the four marks. The function will enter the marks in the array and return the array with the four marks entered in the appropriate student number
This is all I have so far.
Quote:
import
java.util.Scanner;
import
java.lang.String;
import
java.io.*;
import
java.util.Arrays;
/**
*
*/
/**
* @author Rami
*
*/
public
class FinalProjectPart1 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in =
new Scanner (System.in);
System.
out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t\tAsylum Software Presents..." );
System.
out.print("\t\t\t\t\t\t\t\tMarbook 1972\n");
System.
out.println("\t\t\t\t\t\t\tCompiled by Rami Abdelghani");
try {
Thread.sleep(5000);
// Wait 5 seconds
}
catch (InterruptedException e) {
// Do nothing, not critical to
// be interrupted
}
int a = 0;
for(a=0;a<25;a++)
System.
out.println("\n");
System.
out.print("Note: All students are assignmed a -1 by default.\n\n" );
{
int B [][]= new int [10][4];
for (int i = 0; i < B.length ; i++){
for (int j = 0; j < B[0]. length; j++){
B [i][j]=-1;
System.
out.print(B[i][j]+"\t");
}
System.
out.println(" ");
}
try {
Thread.sleep(5000);
// Wait 5 seconds
}
catch (InterruptedException e) {
// Do nothing, not critical to
// be interrupted
}
int x = 0;
for
(x=0;x<25;x++)
System.
out.println("\n");
int
reply;
System.
out.print("Please choose one of the following 4 options: " );
reply=in.nextInt();
if
(reply==1);
System.
out.print("ENTERING MARKS SUBPROGRAM\n");
System.
out.print(B.length +"\t" );
}
}}