20 likes | 170 Views
This project focuses on developing advanced data structures using UML principles, specifically tailored for handling states in the United States. It involves the creation of a tree structure that can insert, find, delete, and traverse nodes representing states, each with attributes like name, abbreviation, region, and population. The implementation utilizes Java's BufferedReader for file handling to read state data. This project not only demonstrates object-oriented programming concepts but also emphasizes efficient data management and retrieval, showcasing the project's robustness through various tree traversal methods.
E N D
FileInterface Felipe X. Aspillaga COP 3540 – Data Structures Project 4 - UML -fr: FileReader -br: BufferedReader +FileInterface( String fileName ) +hasNext( ): boolean +process( ): String +closeFile( ): void Tree 0…1 -root +Tree( ) +insert( String name, String abbrev, int pop ): void +find( String key ): void +delete( String key ): void -getSuccessor( Node delNode ): Node +traverse( Node localRoot, int nodeID ): void +recLNR( ): void +recLNR( Node localRoot ): void +iterLNR( ): void +recNLR( ): void +recNLR( Node localRoot ): void +iterNLR( ): void +recRNL( ): void +recRNL( Node localRoot ): void +iterRNL( ): void 0…1 0…1 Main State -name: String -capital: String -abbrev: String -region: String -population: int -number: int +main( String args ): void +State( String fileLine, int lineNumber ) +displayState( ): void +getName( ): String +getAbbrec( ): String +getPop( ): String +parseLine( String s, int lineNum ): int USArray -recordNum: int = 0 +USArray( ) +insertState( String record ): void +isEmpty( ): boolean +displayStates( ): void +removeState( ): State Node +name: String +abbrev: String +population: int +nodeId: int 0…* -states +leftChild +displayNode( ): void +rightChild