Hi Guy's
I'm a first yr computing degree student and have run into a problem at a really bad time
my JDK is acting up. I'm getting the following error when I try to compile any Java programs (even ones which previously worked)
\Airline.java:21: cannot access Keyboard
bad class file: .\Keyboard.class
class file contains wrong class: cs1.Keyboard
Please remove or make sure it appears in the correct subdirectory of the classpath.
option = Keyboard.readChar();
^
1 error
Tool completed with exit code 1
I've tried several things from downloading a new Keyboard.class file to re-installing the JDK and Keyboard.class after some googleing I also tried adding the line package cs1; to my program and whilst this had some affect I'm now getting the "Unable to find Variable: Keyboard error"
Any Assistance would be great. I've a project due for submission on Friday which is worth 50% of my whole Java module and I can't do any coding at home because of this issue
Here is some of my code so far
class Airline{//start class public static void main(String[] args){//start main char option,YesNo='N';//declare char variable char seatplan[][] = new char [10][5]; System.out.println("Welcome To Raptor Air Please make a selsection from the options below");//print to screen System.out.println("*******************************************");//print to screen System.out.println("Please Enter [A] To View Seat Plan");// ask for user input# System.out.println("Please Enter [B] To Book A Seat ");// ask for user input System.out.println("Please Enter [C] To Cancel A Booking");// ask for user input System.out.println("Please Enter [D] To RESET ALL SEATS");// ask for user input System.out.println("Please Enter [E] To EXIT");// ask for user input System.out.println("*******************************************");//print to screen option = Keyboard.readChar();//the value of variable "table" is inputed from keyboard option= Character.toUpperCase(option);//switch lowercase entry to uppercase switch (option)//switch statement {//start of switch conditions case 'A': System.out.println("Seat Plan");System.out.println("");Plan(seatplan);break;// case A print Seat Plan to screen and call procedure(plan)passing array parameters case 'B': System.out.println("Book A Seat");System.out.println(""); Book(seatplan); break;// case B print Book A Seat to screen and call procedure(Book)passing array parameters case 'C': System.out.println("Cancel A Booking");System.out.println(""); Cancel(seatplan);break;// case C print Cancel A Seat to screen and call procedure(Cancel)passing Array parameters case 'D': System.out.println("Reset All Seats");System.out.println(""); Reset(seatplan);break;// case D print Reset All Seats to screen and call procedure(Reset)passing Array parameters case 'E': Exit();break;// case C print multiply to screen and call procedure(mod)passing parameters default:System.out.println ("This is Not A Valid Entry "); break;// if the Letter. entered is not A,B or C tell the user "This Is Not A Valid Entry" }//end off switch }//end main static void Plan(char seatplan[][]) { System.out.println(" A B C D"); for(int r=1;r<5;r++){ System.out.print("\n"); System.out.print( r); System.out.print(""); for (int c=1;c<seatplan[c].length;c++){ System.out.print(" -"); System.out.print(" "+ seatplan[r][c]); } } System.out.print("\n"); System.out.print("\n");System.out.print("\n"); for(int r=5;r<9;r++){ System.out.print("\n"); System.out.print( r); System.out.print(""); for (int c=1;c<seatplan[r].length;c++){ System.out.print(" -"); System.out.print(" "+ seatplan[r][c]); } } System.out.print("\n"); System.out.print("\n");System.out.print("\n"); } static void Book(char seatplan[][]) { System.out.println(" A B C D"); for(int r=1;r<5;r++){ System.out.print("\n"); System.out.print( r); System.out.print(""); for (int c=1;c<seatplan[c].length;c++){ System.out.print(" -"); System.out.print(" "+ seatplan[r][c]); } } System.out.print("\n"); System.out.print("\n");System.out.print("\n"); for(int r=5;r<9;r++){ System.out.print("\n"); System.out.print( r); System.out.print(""); for (int c=1;c<seatplan[r].length;c++){ System.out.print(" -"); System.out.print(" "+ seatplan[r][c]); } } System.out.print("\n"); System.out.print("\n");System.out.print("\n"); System.out.println("please Enter the Seat Ref [row num then seat num]"); char status; String ref =new String(); ref= Keyboard.readString(); } static void Cancel(char seatplan[][]){ } static void Reset(char seatplan[][]){ } static void Exit(){ } }//end class