Hi Joe, I agree with Kirt's suggestions in general. See more below.
On Thu, 28 Apr 2016 17:15:05 -0500, Joseph Alotta <[email protected]> wrote: >Greetings, >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 helpful. >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. Sounds good. >I would appreciate some design help? >Sincerely, >Joe. Lou -- Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon _______________________________________________ Beginners mailing list [email protected] http://lists.squeakfoundation.org/mailman/listinfo/beginners
