w102eaj
10-30-2003, 05:05 PM
i am writing a program used for inputting grades. when i try to compile the program i get an error saying cannot resolve symbol, variable array, variable values. any ideas on what to do would be greatly appreciated. below is sample of the code i’m having problems with: i put // where the problem is
import java.io.*;
import MyInput;
public class lab5_141
{
static final int MAX=5;
public static void main(String[]args)
{
int array[]=new int[MAX];
int values;
int choice;
System.out.println("Welcome to grades");
System.out.println();
do{
System.out.println("1 - Input Grades");
System.out.println("2 - List Grades");
System.out.println("3 - Change Grades");
System.out.println("4 - Convert Grades");
System.out.println("5 - Exit");
System.out.println();
System.out.print("Enter Choice ");
choice=MyInput.readInt();
System.out.println();
switch(choice)
{
case 1: values=get_grades(array);
break;
case 2: list_grades(array, values);//problem begins
break; //here
case 3: change_grades(array, values);//
break;
case 4: convert_grades(array, values);//
break;
case 5: System.out.println("Goodbye");
break;
}
}while((choice < 0) || (choice > 5));
}//end main;)
import java.io.*;
import MyInput;
public class lab5_141
{
static final int MAX=5;
public static void main(String[]args)
{
int array[]=new int[MAX];
int values;
int choice;
System.out.println("Welcome to grades");
System.out.println();
do{
System.out.println("1 - Input Grades");
System.out.println("2 - List Grades");
System.out.println("3 - Change Grades");
System.out.println("4 - Convert Grades");
System.out.println("5 - Exit");
System.out.println();
System.out.print("Enter Choice ");
choice=MyInput.readInt();
System.out.println();
switch(choice)
{
case 1: values=get_grades(array);
break;
case 2: list_grades(array, values);//problem begins
break; //here
case 3: change_grades(array, values);//
break;
case 4: convert_grades(array, values);//
break;
case 5: System.out.println("Goodbye");
break;
}
}while((choice < 0) || (choice > 5));
}//end main;)