Parser (Group 8: Schedule)
Keywords: com.example.model.Parser class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.example.model
Class Parser

    java.lang.Object
      com.example.model.Parser

    public class Parser

extends java.lang.Object

Constructor Summary
`Parser()`

Method Summary
`static Schedule` | `createSchedule(java.lang.String[] arrayOfStrings)` REMOVED TEST MAIN ***************** public static void main(String[] args) { String[] array = new String[5]; array[0] = new String("0:1-2;1:1-3"); array[1] = new String("0:1-2;1:1-3"); array[2] = new String("0:1-2;1:1-3"); array[3] = new String("0:1-2;1:1-3"); array[4] = new String("0:1-2;1:1-3"); Schedule testSched = new Schedule(1); testSched = createSchedule(array); testSched.setFreeSchedule(); String newString = testSched.printFreeSchedule(); System.out.println( newString ); String expectedResult = "Day: M, Hour: 1pm" + '\n' + "Day: M, Hour: 2pm" + '\n' + "Day: T, Hour: 1pm" + '\n' + "Day: T, Hour: 2pm" + '\n' + "Day: W, Hour: 1pm" + '\n' + "Day: W, Hour: 2pm" + '\n' + "Day: TR, Hour: 1pm" + '\n' + "Day: TR, Hour: 2pm" + '\n' + "Day: F, Hour: 1pm" + '\n' + "Day: F, Hour: 2pm" + '\n'; System.out.println(expectedResult); if( newString.compareTo(expectedResult) == 0 ) System.out.println("return true"); else System.out.println("return false "); //return 0; } END OF REMOVAL

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Parser

    public Parser()

Method Detail

### createSchedule

    public static Schedule createSchedule(java.lang.String[] arrayOfStrings)

  REMOVED TEST MAIN ***************** public static void main(String[] args) { String[] array = new String[5]; array[0] = new String("0:1-2;1:1-3"); array[1] = new String("0:1-2;1:1-3"); array[2] = new String("0:1-2;1:1-3"); array[3] = new String("0:1-2;1:1-3"); array[4] = new String("0:1-2;1:1-3"); Schedule testSched = new Schedule(1); testSched = createSchedule(array); testSched.setFreeSchedule(); String newString = testSched.printFreeSchedule(); System.out.println( newString ); String expectedResult = "Day: M, Hour: 1pm" + '\n' + "Day: M, Hour: 2pm" + '\n' + "Day: T, Hour: 1pm" + '\n' + "Day: T, Hour: 2pm" + '\n' + "Day: W, Hour: 1pm" + '\n' + "Day: W, Hour: 2pm" + '\n' + "Day: TR, Hour: 1pm" + '\n' + "Day: TR, Hour: 2pm" + '\n' + "Day: F, Hour: 1pm" + '\n' + "Day: F, Hour: 2pm" + '\n'; System.out.println(expectedResult); if( newString.compareTo(expectedResult) == 0 ) System.out.println("return true"); else System.out.println("return false "); //return 0; } END OF REMOVAL

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD