Friday, March 28, 2008

What is the rational behind the Time Class?

The Time Class needs to allow the input of time in the following formats: HH:MM:SS.ss, MM:SS.ss, HH.hh or MM.mm. Thus, I think it would be best to include methods that can handle such formats. I also think the Class would need to know as much about the time format as possible. This means keeping a decimal format data type stored to indicate how the data was entered: either in HH.hh or MM.mm format. This should also determine how to display the time data in a particular decimal format. Thus, I also think that it would be a good idea to also store a decimal boolean. This would indicate whether or not data should be displayed in as a decimal or in the traditional form.

I think I also should include arithmetic methodologies with the class: the ability to add and subtract different time objects and return a value from that arithmetic operation. I believe these will help to define the type of class the Time class intent.

No comments: