아직이 프로젝트에 문제가 있습니다. 내 세 번째 방법과 'Footballer PlayerIn []'부분에서 '기호를 찾을 수 없습니다'라는 메시지가 계속 표시됩니다! 당신이 나를 도울 수 있다면 크게 감사하겠습니다! 언어와개체 지향 메뉴
public static int addOne(String theArray[], int place, String theName, int noOfValues)
{
int step;
if (noOfValues == 0)
{
theArray [0] = theName;
noOfValues ++;
}
else
{
for (step = noOfValues - 1 ; step >= place; step --)
{
theArray[step + 1] = theArray[step] ;
}
theArray[place] = theName;
noOfValues ++;
}
return noOfValues;
}
public static int findPlace(String theArray[], String theName, int noOfValues)
{
int step;
int place;
step = 0 ;
while ((step < noOfValues) && (theName.compareTo(theArray[step]) > 0))
{
step ++;
}
place = step ; // Holds the correct location of place
return place; // method must return an int
}
public static void listAll(Footballer PlayerIn[], int noOfValues)//displays array contents
{
int index;
for(index =0; index <noOfValues; index++)
{
System.out.print(PlayerIn[index]);
}
}
public static void menu()
{
System.out.println(" Menu ");
System.out.println(" ---------- ");
System.out.println();
System.out.println(" 1. Add ");
System.out.println(" 2. Delete ");
System.out.println(" 3. List All ");
System.out.println(" 4. Exit ");
}
public static void options()
{
char options;
System.out.println();
System.out.print("Enter Option Required (1-4) ");
options = EasyIn.getChar();
while (options != '4')
{
switch(options)
{
case '1': System.out.println("Add Name");
EasyIn.pause();
break;
case '2': System.out.println("Delete Name");
EasyIn.pause();
break;
case '3': System.out.println("List All");
EasyIn.pause();
break;
default: System.out.println("Invalid Option!");
EasyIn.pause();
}
System.out.println();
System.out.println("Enter Option Required (1-4) ");
options = EasyIn.getChar();
}
}
public static void main(String[] args)
{
menu();
options();
}
}
, 그것은의 길이를 점점 목록의 수단이 불행하게도 다른 이름이 있다는 사실을 방법을 유지 그리고 당신은 파라미터 –
@kolossus에서 무엇을 전달 했습니까? 제 3의 메소드를 주석 처리 할 때 그것은 않습니다. 그러나 'Footer PlayerIn []'부분에 '심볼을 찾을 수 없습니다'라고 표시되어 있습니다. – ConorDoyle21
전체 스택 트레이스 표시 – kolossus