{"id":24033880,"url":"https://github.com/mohamedwelteir/infix-to-postfix--expression-evaluator","last_synced_at":"2026-06-11T03:31:52.822Z","repository":{"id":154484631,"uuid":"632027616","full_name":"MohamedWElteir/Infix-to-Postfix--Expression-Evaluator","owner":"MohamedWElteir","description":"This project is for converting mathematical expression from infix to postfix as well as evaluating the expression.","archived":false,"fork":false,"pushed_at":"2024-09-04T16:01:49.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-26T05:33:09.367Z","etag":null,"topics":["data-structures","java"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MohamedWElteir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-24T14:58:35.000Z","updated_at":"2024-09-04T16:01:53.000Z","dependencies_parsed_at":"2023-12-24T02:26:09.881Z","dependency_job_id":"f926914f-9560-4705-96aa-c9eba8b98d32","html_url":"https://github.com/MohamedWElteir/Infix-to-Postfix--Expression-Evaluator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MohamedWElteir/Infix-to-Postfix--Expression-Evaluator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohamedWElteir%2FInfix-to-Postfix--Expression-Evaluator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohamedWElteir%2FInfix-to-Postfix--Expression-Evaluator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohamedWElteir%2FInfix-to-Postfix--Expression-Evaluator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohamedWElteir%2FInfix-to-Postfix--Expression-Evaluator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MohamedWElteir","download_url":"https://codeload.github.com/MohamedWElteir/Infix-to-Postfix--Expression-Evaluator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohamedWElteir%2FInfix-to-Postfix--Expression-Evaluator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34181554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-structures","java"],"created_at":"2025-01-08T18:55:27.442Z","updated_at":"2026-06-11T03:31:52.793Z","avatar_url":"https://github.com/MohamedWElteir.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Infix to Postfix Converter and Expression Evaluator\n\n- This project provides a tool for converting mathematical expressions from infix to postfix notation and evaluating postfix expressions. \n- It features a simple GUI built with Java Swing to make the interaction more user-friendly compared to traditional terminal-based programs. The tool supports evaluation of any kind of expression, not limited to single-digit operands.\n- This project was created as part of the Data Structures and Algorithms course at the Faculty of Science, Alexandria University.\n\n## Features\n\n- **Infix to Postfix Conversion**: Converts mathematical expressions from infix notation (e.g., `A + B`) to postfix notation (e.g., `A B +`).\n- **Expression Evaluation**: Evaluates postfix expressions to compute their results.\n- **User-Friendly Interface**: A GUI built with Java Swing for easier interaction.\n- **Flexible Expression Handling**: Supports complex expressions, including multi-digit numbers and various operators.\n\n## How to Use\n\n1. **Clone the Repository**: \n\n   ```bash\n   git clone https://github.com/MohamedWElteir/Infix-to-Postfix--Expression-Evaluator.git\n2. **Compile and run the project**: Use a java compiler like `javac` to compile all `.java` files under the `src` directory.\n\n   ```bash\n   javac src/**/*.java\n   ```\n3. **Run the Application**: Execute the main class to start the GUI application.\n\n   ```bash\n   java -cp src Main.Main\n   ```\n4. **Enter an Expression**: Type the infix or postfix expression in the provided text field.\n\n5. **Choose an Operation**: Select \"Infix to Postfix\" or \"Expression Evaluation\".\n\n6. **Click Perform**: The result will be displayed in the text area below the input field.\n\n## Project Structure\n\n- **`src/Main`**\n  - `Main.java`: The main entry point of the application, implementing the GUI and handling user interactions.\n  - `MainTest.java`: Contains unit tests for the main functionality.\n  \n- **`src/Operations`**\n  - `Evaluate.java`: Contains the methods for evaluating postfix expressions.\n  - `InfixToPostfix.java`: Contains the logic for converting infix expressions to postfix notation.\n\n- **`src/Queue`**\n  - `Queue.java`: Interface for queue operations.\n  - `Queue_Array.java`: Array-based implementation of the queue.\n  - `Queue_Linked.java`: Linked list-based implementation of the queue.\n  \n- **`src/Stack`**\n  - `Stack.java`: Interface for stack operations.\n  - `Stack_Array.java`: Array-based implementation of the stack.\n  - `Stack_Linked.java`: Linked list-based implementation of the stack.\n\n## Example Usage\n\n- **Input**: Infix Expression: `3 + 4 * 2 / ( 1 - 5 )`\n- **Output**: Postfix Expression: `3 4 2 * 1 5 - / +`\n\n- **Input**: Postfix Expression: `3 4 2 * 1 5 - / +`\n- **Output**: Evaluation Result: `1`\n\n## Requirements\n\n- Java Development Kit (JDK) 8 or higher\n\n## Technical Details\n\n### GUI Implementation\n\nThe GUI is built using Java Swing. It features:\n- Radio buttons for selecting the operation (Infix to Postfix or Expression Evaluation).\n- A text field for user input.\n- A button to perform the operation.\n- Labels to display instructions, results, and notes to the user.\n\n### Core Operations\n\n1. **Infix to Postfix Conversion**: Implemented in `InfixToPostfix.java` using the Shunting Yard algorithm.\n2. **Expression Evaluation**: Implemented in `Evaluate.java` using a stack-based approach.\n\n## Future Enhancements\n\n- Add support for additional operators (e.g., exponentiation).\n- Extend the GUI to include error handling and real-time feedback.\n- Improve performance by optimizing the underlying data structures.\n\n## Contributing\n\nContributions are welcome! Please fork the repository and create a pull request with your improvements.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamedwelteir%2Finfix-to-postfix--expression-evaluator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohamedwelteir%2Finfix-to-postfix--expression-evaluator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamedwelteir%2Finfix-to-postfix--expression-evaluator/lists"}