Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void doLoad() {
- // YOUR CODE HERE
- try{
- Scanner scan = new Scanner(new File(FileChooser.open()));
- while(scan.hasNext()){
- int unit = scan.nextInt();
- int day = scan.nextInt();
- String name = scan.nextLine();
- String number = scan.nextLine();
- for(int i = 0; i< numUnits +1; i++){
- if(unit == i){
- for(int a = 0; a <numDays; a++){
- if(day == a){
- bookings[i][a] = new Booking(name, number);
- }
- }
- }
- }
- }
- }catch(Exception e){System.out.println(e);}
- }
Add Comment
Please, Sign In to add comment