My CS ethics professor taught us that we should go find help if we get stuck rather than waste time thinking in circles. So here I am. I’m helping my brother in IT (and starting my code portfolio) by writing a program that will sort out some files containing a user and what programs they have installed.
I wrote a program in C++ that reads a folder in the registry and outputs a file UserName.txt and then lists the programs they have installed.
Now, in java becuse is less of a bitch about file I/O than C++, I’m coding a program to read those files and re-sort it into one large output file with a list of ALL the installed software follwed by a comma seperated list of the users that have that software installed on thier computers. My code to read the files works, but I am having trouble finding and/or creating an appropriate structure to hold this data before it is written to the output file.
I have already tried creating a bastardized linked list with a Node class containing a string for the program name and a string array for the users.
I’ve found the structures in java.util inneffective because they appear to be intended to hold data of a single type NOT a class that contains more than one type of data.
NOT List.find(MyDataObject.programName = “program”)
I need an alternative or a means of accessing the data in the second form. I need to be able to access the entire dataset by JUST the program name. I do not need to search by users, that can be handled earlier in the process.
Can anyone suggest any appropritate structure, syntax, or plan of attack??
If it matters I’m a CS major at Kent State. Thanks to high school AP testing into DataStructures, I’ve been in classes coving theory for almost two years instead of coding classes, I’m a bit rusty. This project is already GPL’d and free-as-in-beer because I had to read/alter some GPL’d code to understand how the registry reader works.