NoahSewBSU / CS321-002-f24-team-02

This is for CS321 Data Structures. The objective is to create a program using BTrees to sort large amount of objects and to gain more experience working with a team of programmers.
0 stars 0 forks source link

SSHCreateBTree has been written #23

Closed NoahSewBSU closed 22 hours ago

NoahSewBSU commented 2 weeks ago

SSHCreateBtree has been written: [20 points]

NoahSewBSU commented 1 week ago

Created the getter methods in SSHCreateBTreeArguments (CBT) Created the parseArguments method in SSHCreateBTree (CBTArgs) Creating test with toString method from CBTArgs into CBT

NoahSewBSU commented 3 days ago

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 know entryA is going to be one of the following:{"accepted", "failed", "invalid", "reverseaddress", "user"}

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

NoahSewBSU commented 22 hours ago

Ended up using a switch board and a splitter which parses the treeType given from the user.

Went over and reviewed with the team.