Skip to content

This repository contains the implementation of PokeHash, an extendible hashing application designed for storing Pokémon data.

License

Notifications You must be signed in to change notification settings

ramazantokay/PokeHash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PokeHash: Pokémon Hashing Application

This repository contains the implementation of PokeHash, an extendible hashing application designed for storing Pokémon data. PokeHash allows Pokémon Trainers to efficiently manage and organize their collection using an in-memory hash table. It offers features such as adding Pokémon, deleting Pokémon, searching for specific Pokémon, and printing the complete table structure.

Overview

PokeHash was developed as part of CENG351 Data Management & File Structures course project. The assignment aimed to create an extendible hashing application using a hash table to store Pokémon. The implementation consists of several classes, including CengBucket, CengBucketList, CengPoke, CengPokeParser, CengHashRow, and CengHashTable. The application is designed to be run from the command line. The user can enter commands to perform operations on the hash table. The commands are parsed and executed by the application. The application is written in Java and uses Java (Version 13) features.

Usage

To run the PokeHash application, follow these steps:

  1. Compile the Java source files:
javac *.java
  1. Run the PokeHash application:
java CengPokeKeeper <hashMod> <bucketSize> <inputFileName> <enableGUI>
  • <hashMod>: An integer value representing the hash modulus. 1 and will be 2^n format.
  • <bucketSize>: An integer value indicating the maximum number of Pokémon each bucket can hold.
  • <inputFileName>: The name of the input file containing Pokémon data (required for GUI, but not tested).
  • <enableGUI>: A boolean value (True or False) indicating whether to enable the GUI (optional).

Example:

java CengPokeKeeper 8 2 pokemons.txt True
  1. Use the command-line interface to interact with the PokeHash application. Enter commands such as add, delete, search, print, or quit to perform various operations.

Commands

PokeHash supports the following commands:

  1. Add Pokémon: Add a new Pokémon to the hash table.
add -pokeKey- -pokeName- -pokePower- -pokeType-
  1. Delete Pokémon: Delete a Pokémon from the hash table.
delete -pokeKey-
  1. Search Pokémon: Search for a Pokémon in the hash table.
search -pokeKey-
  1. Print Table: Print the complete table structure.
print
  1. Quit: Exit the application.
quit

Input and Output Files

The repository includes input and expected output files that can be used to test the PokeHash application:

  • <inputs> folder: Contains a series of commands to be executed by the PokeHash application.
  • <expected_output> folder: Provides the expected output corresponding to the commands in the input .txt files.

Output Format

The output generated by PokeHash follows a JSON-like format. It provides information about Pokémon, buckets, rows, and the overall table structure.

Disclaimer

Please note that this implementation may contain limitations, potential bugs, and dependencies on external libraries and tools. While efforts have been made to ensure correctness, there is no guarantee of flawless execution. Exercise caution, conduct thorough testing, and adapt the code to your requirements. Report issues on GitHub and contribute to improvements. Use responsibly, validate results, and the authors disclaim liability for any damages or issues arising from the use of this code.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! If you have any suggestions or improvements, feel free to submit a pull request or open an issue in the GitHub repository.

About

This repository contains the implementation of PokeHash, an extendible hashing application designed for storing Pokémon data.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages