[Newbies] conceptual design help
Lou at Keystone-Software.com
Thu Apr 28 23:30:34 UTC 2016
I agree with Kirt's suggestions in general. See more below.
On Thu, 28 Apr 2016 17:15:05 -0500, Joseph Alotta <joseph.alotta at gmail.com> wrote:
>I am writing a program to consolidate all my personal finances for tax time next year. (This is not a school project.)
>There are transaction files from several banks and credit card companies. Each has a similar format, CSV, but they vary in many ways, order of items, extra notes, pipe delimited or tabs, etc. I want to read them and load them into a collection of transaction objects.
>1. Should I have a FileReader object?
>2. Should it have subclasses like FileReaderAmericanExpress, FileReaderJPMorgan ?
No. I would with the object you want to hold the information and work out from there. An
object or your main program object should read the files and instantiate the objects (same
class) that gets the data.
>3. Or should it have different methods like loadAmericanExpresFile, loadJPMorganFile ?
Yes. Use different methods to read and parse the files and instantiate the objects. Depending
upon how close (similar) the files are you could have a method with a few parameters (three or
four at most) that handles more than one file.
>4. Is a Collection of Transaction objects, the structure that you would load the files into?
Yes. An ordered or sorted collection would be good so you could sort by date/time if that is
>The rest of the project would be to do data checking on the files, to make sure there are no duplicates or missing dates. Then write reports that I can give to my accountant.
>I would appreciate some design help?
Keystone Software Corp.
More information about the Beginners