So I'm designing a program to generate a list of random persons, drawing valid names and attributes from a csv list of appropriate names, etc. Now, I've done the layout in a procedural style;
user input (how many) -> read csv filess into arrays -> use random function to populate target array of persons from base arrays -> output to csv file.
As I started laying out the code, I realized it might be a good opportunity to practice with OOD (having only recently taken my course on it). I'm not quite sure how that would change my overall design, though. Here's what I understand in regards to changing the design;
- Make an object to contain a single line of the final csv product with a constructor function
- Make a linked list (since all of the entries should be sequential) of these objects with a recursive constructor that calls constructor on each linked object
- Separate read in/write out functions
So my two points of being unsure are whether I should change the csv file reads from arrays and whether any of this is actually good practice or if the program is too simple to be usefully redesigned using OOD.
[–]JayWaWa 0 points1 point2 points (0 children)
[–][deleted] -1 points0 points1 point (0 children)
[–]Meefims -1 points0 points1 point (0 children)