Class ThinkAway

java.lang.Object
  extended by ThinkAway

public class ThinkAway
extends java.lang.Object

ThinkAway is a main program for reading assignment information. It will take the info and output it in a more student friendly way.

Version:
1.7
Author:
Fred Kral

Field Summary
static boolean DEFAULT_IS_POPUP
          Do we default to the window pop-up dialog box (or the terminal/command prompt) for pasting input?
static java.lang.String INPUTCHOICE
          Choices for input source: see the method itself.
 
Constructor Summary
ThinkAway()
           
 
Method Summary
static java.util.Scanner chooseInput(java.lang.String choice, boolean defaultPopUp, java.lang.String osName)
          chooseInput takes the assignment and course data from user or from a file
static void main(java.lang.String[] args)
          Main main :-)
static void read()
          read can be called from main from any class.
static void readCourses(java.util.Scanner sc, Person student)
          Read courses from a list from a webpage from a person
static Semester readSemesterInfo(java.lang.String semesterInfoFile)
          Read a file with the semester information
static void testInitial(java.util.Scanner sc)
          testInitial reads the input file: Is the beginning of the imput looking good?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INPUTCHOICE

public static final java.lang.String INPUTCHOICE
Choices for input source: see the method itself.

See Also:
Constant Field Values

DEFAULT_IS_POPUP

public static final boolean DEFAULT_IS_POPUP
Do we default to the window pop-up dialog box (or the terminal/command prompt) for pasting input?

See Also:
Constant Field Values
Constructor Detail

ThinkAway

public ThinkAway()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.io.FileNotFoundException
Main main :-)

Throws:
java.io.FileNotFoundException

read

public static void read()
                 throws java.io.FileNotFoundException
read can be called from main from any class. It is the beginning of the program

Throws:
java.io.FileNotFoundException

chooseInput

public static java.util.Scanner chooseInput(java.lang.String choice,
                                            boolean defaultPopUp,
                                            java.lang.String osName)
                                     throws java.io.FileNotFoundException
chooseInput takes the assignment and course data from user or from a file

Parameters:
choice - ""=file/window/terminal "popup"=dialog box ""=terminal. File/popup/terminal out means looking for student.txt first here and then elsewhere, then using either popup (if default is popup) or terminal.
Throws:
java.io.FileNotFoundException

readSemesterInfo

public static Semester readSemesterInfo(java.lang.String semesterInfoFile)
                                 throws java.io.FileNotFoundException
Read a file with the semester information

Throws:
java.io.FileNotFoundException

testInitial

public static void testInitial(java.util.Scanner sc)
testInitial reads the input file: Is the beginning of the imput looking good?


readCourses

public static void readCourses(java.util.Scanner sc,
                               Person student)
Read courses from a list from a webpage from a person