Closed NoahSewBSU closed 22 hours ago
Created the getter methods in SSHCreateBTreeArguments (CBT) Created the parseArguments method in SSHCreateBTree (CBTArgs) Creating test with toString method from CBTArgs into CBT
Basics of parsing arguments is completed Creating an empty BTree has been completed Inserting keys into the new BTree from a file indicated by the arguments is the next step Currently finding a way to comb through a file using the --type= given from the user
PROBLEM: We need to parse the --type= argument into two parts (entryA and entryB).
INFORMATION:
Right now, the user gives us a string argument of "--type=
We also know that entryB will be one of the following: {"ip", "timestamp"}
*If any other option is given, we should throw back an error.
How do we record these entrys and then go through a file and record the proper information from lines which contain both specified entries?
SOLUTION: 1.Save entryA and entryB if they both match one of their given options (else throw error) 2.Comb through the file given, starting at the first line until null is returned 3.On each line, check for entry A. If found, check for entry B. 4.If both are found, create a new String concatenating entryA and the String located at entryB's specification (ip will be found between the 4th white-space until '\n' or null, timestamp is found between the 1st and 2nd white-space) 5.Otherwise, continue to the next line
Ended up using a switch board and a splitter which parses the treeType given from the user.
Went over and reviewed with the team.
SSHCreateBtree has been written: [20 points]