All Packages Class Hierarchy This Package Previous Next Index
Class com.markcrocker.thoughtworks.Dates
java.lang.Object
|
+----com.markcrocker.thoughtworks.Dates
- public class Dates
- extends Object
-
debugLevel
-
-
Dates()
-
-
main(String[])
-
-
parseDates(String[], int)
- parseDates.
-
parseFile(String)
- parseFile.
-
syntaxMessage()
- syntaxMessage.
debugLevel
private int debugLevel
Dates
public Dates()
parseDates
private static MyDate parseDates(String args[],
int i) throws BadDateException
- parseDates. Converts an array of strings into a MyDate
object. Input format is VERY fussy. Expects
- Parameters:
- args - is a string array of at least three elements. The elements starting at the indicated index should be MM, DD, YYYY[,] respectively.
- i - is the array index where the strings defining the date start.
- Returns:
- Initialized MyDate object.
- Throws: BadDateException
- via MyDate constructor.
parseFile
private static void parseFile(String fileName) throws FileNotFoundException, IOException, BadDateException
- parseFile. Converts a file with pairs of dates on each line
into dates and prints out the number of days
between the two dates. The date format is VERY fussy.
Each date should be in the format MM, DD, YYYY[,].
- Parameters:
- fileName - is the file that data data is to be read from.
- Throws: BadDateException
- via MyDate constructors
syntaxMessage
private static void syntaxMessage()
- syntaxMessage. Prints out syntax/help message.
main
public static void main(String args[]) throws FileNotFoundException, IOException, BadDateException
All Packages Class Hierarchy This Package Previous Next Index