{"id":25545206,"url":"https://github.com/khushi130404/postfix-calc","last_synced_at":"2026-02-09T03:30:20.069Z","repository":{"id":220459861,"uuid":"746696117","full_name":"Khushi130404/Postfix-Calc","owner":"Khushi130404","description":"Postfix-Calc is an Android application built using Java in Android Studio. It is a calculator that uses Infix to Postfix conversion to evaluate mathematical expressions. The calculator provides a simple and intuitive user interface resembling the iOS calculator.","archived":false,"fork":false,"pushed_at":"2025-02-18T03:21:44.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-18T04:22:23.043Z","etag":null,"topics":["infix-to-postfix","postfix-evaluation","precedence","ranking-algorithm","stack"],"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/Khushi130404.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":"2024-01-22T13:48:49.000Z","updated_at":"2025-02-18T03:24:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"993b56a1-20a3-45f5-8653-ad856f76cafa","html_url":"https://github.com/Khushi130404/Postfix-Calc","commit_stats":null,"previous_names":["khushi130404/mycalulator","khushi130404/postfix-calc"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Khushi130404%2FPostfix-Calc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Khushi130404%2FPostfix-Calc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Khushi130404%2FPostfix-Calc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Khushi130404%2FPostfix-Calc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Khushi130404","download_url":"https://codeload.github.com/Khushi130404/Postfix-Calc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239800430,"owners_count":19699129,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["infix-to-postfix","postfix-evaluation","precedence","ranking-algorithm","stack"],"created_at":"2025-02-20T08:18:17.850Z","updated_at":"2026-02-09T03:30:20.012Z","avatar_url":"https://github.com/Khushi130404.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📱 Postfix-Calc\n\nPostfix-Calc is an Android application built using Java in Android Studio. It is a calculator that uses Infix to Postfix conversion to evaluate mathematical expressions. The calculator provides a simple and intuitive user interface resembling the iOS calculator.\n\n## 🎯 Features\n\n- Converts infix expressions to postfix notation\n  \n- Supports the following operations:\n  - ➕ Addition (`+`)\n  - ➖ Subtraction (`-`)\n  - ✖️ Multiplication (`×`)\n  - ➗ Division (`÷`)\n  - 🔢 Modulus (`%`)\n  - 📝 Parentheses (`(` and `)`) \n  - 🟰 Equals (`=`) to evaluate the expression\n  - 🧹 Clear (`AC`) and 🔙 Backspace (`BACK`) operations\n    \n- 📱 User-friendly UI designed similar to the iOS calculator\n\n## 🛠 Technologies Used\n\n- **Android Studio**: IDE for development\n  \n- **Java**: Programming language\n  \n- **Stack Data Structure**: Used for infix to postfix conversion\n\n## 🔢 Infix to Postfix Conversion\n\nThe conversion follows these precedence rules:\n- **Operators Precedence**:\n  - `+`, `-` have the lowest precedence\n  - `×`, `÷`, `%` have higher precedence\n  - `(` has the highest precedence for parsing purposes\n- Operands are directly added to the postfix expression\n- Operators are pushed onto a stack according to precedence\n- Parentheses are handled separately for grouping expressions\n\n## 🏗 Code Structure\n\nThe core logic for infix to postfix conversion and evaluation is implemented in:\n- **`Infix_To_Postfix1.java`**:\n  - `infixPrec(char c)`: Determines the precedence of operators in the infix expression.\n  - `stackPrec(char c)`: Determines the precedence of operators in the stack.\n  - `rank(char c)`: Returns the rank of an operator to ensure proper expression evaluation.\n  - `infix_Postfix()`: Converts an infix expression to postfix notation.\n- **`Evaluation1.java`**:\n  - `evaluate(float a, float b, char c)`: Performs arithmetic operations based on the operator.\n  - `postfixEvaluation()`: Evaluates a postfix expression using a stack.\n  - `Evaluation1(String ans)`: Initializes the evaluation process by converting infix to postfix.\n\n- **`MainActivity.java`**:\n  - Handles user input from the calculator UI.\n  - Listens for button clicks and updates the display accordingly.\n  - Manages parentheses balancing and ensures valid expressions before evaluation.\n  - Calls `Evaluation1` to compute the result when `=` is pressed.\n  - Implements error handling for invalid expressions.\n\n## 📥 Installation \u0026 Usage\n\n1. Clone the repository:\n   ```sh\n   git clone https://github.com/Khushi130404/Postfix-Calc.git\n   ```\n   \n2. Open the project in Android Studio.\n   \n3. Build and run the application on an Android device or emulator.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhushi130404%2Fpostfix-calc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhushi130404%2Fpostfix-calc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhushi130404%2Fpostfix-calc/lists"}