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

Variable Index

 o debugLevel

Constructor Index

 o Dates()

Method Index

 o main(String[])
 o parseDates(String[], int)
parseDates.
 o parseFile(String)
parseFile.
 o syntaxMessage()
syntaxMessage.

Variables

 o debugLevel
 private int debugLevel

Constructors

 o Dates
 public Dates()

Methods

 o 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.
 o 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
 o syntaxMessage
 private static void syntaxMessage()
syntaxMessage. Prints out syntax/help message.

 o main
 public static void main(String args[]) throws FileNotFoundException, IOException, BadDateException

All Packages  Class Hierarchy  This Package  Previous  Next  Index