Giter Club home page Giter Club logo

triestock's Introduction

Trie-Based Stock

This Java application manages stock using a trie data structure.

Overview

The Trie-Based Stock Management Application allows you to perform various operations on a stock of products using a trie data structure. The application reads operations from an input file, processes them using the trie-based stock implementation, and writes the results to an output file.

Usage

  1. Compile the Java source files using your preferred Java compiler.

  2. Run the compiled program with the following command-line arguments:

    java Main TREE <InputFile> <OutputFile>

  • <InputFile>: The name of the input file containing operations to perform on the stock.
  • <OutputFile>: The name of the output file to store the results of the operations.
  1. The application will process the operations, perform them using the trie-based stock implementation, and write the results to the output file.

Command-Line Arguments

  • <InputFile>: Provide the name of the input file with the operations to be performed.
  • <OutputFile>: Specify the name of the output file to store the results.

Input Format

Each line in the input file represents an operation. The format of each line is as follows:

<Operation> <Product> <Quantity>

  • <Operation>: The operation to perform (compra, venta, unidades, listado).
  • <Product>: The product identifier (string).
  • <Parameters>: Additional parameters based on the operation.

Output Format

The application writes the results of each operation to the output file. The output format depends on the operation type:

  • compra or venta: Describes the result of the operation on the stock.
  • unidades: Reports the number of units of a product in stock.
  • listado: Lists products in stock with matching prefixes and their quantities.

Example

Suppose you have an input file named input.txt. Run the following command:

java Main TREE input.txt output.txt

The application will process the operations in input.txt using the trie-based stock implementation and store the results in output.txt.

Requirements

  • Java Compiler (JDK) to compile and run the Java program.

License

This project is licensed under the MIT License.

triestock's People

Contributors

nusisko avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.