Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nmfzone/data-structure-practicum-project
This is my Data Structure Practicum Project for Responsi using JAVA
https://github.com/nmfzone/data-structure-practicum-project
Last synced: 7 days ago
JSON representation
This is my Data Structure Practicum Project for Responsi using JAVA
- Host: GitHub
- URL: https://github.com/nmfzone/data-structure-practicum-project
- Owner: nmfzone
- Created: 2015-06-13T15:58:28.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-06-22T05:52:06.000Z (over 9 years ago)
- Last Synced: 2023-02-27T20:14:42.719Z (almost 2 years ago)
- Language: Java
- Homepage:
- Size: 180 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# About this Project
This is my "Struktur Data" Practicum Project for "Responsi" using JAVA in Islamic University of Indonesia.# About The Program
```
The program is for calculate the formula that have been inputed by user.
The program can calculate the formula that have variables or not. The program
calculate the formula by using LinkedList, Queue, and Stack, the basic algorithm
to calculate the formula.
```# Features
```
1. Calculate the formula that have a variables or not2. Can calculate the formula that have variables a, b, x and y. You can easily
add or remove the variables that can be used by edit this line in
Kalkulator.java :private String[] variables = {"a", "b", "x", "y"};
3. Can calculate the formula that have operator ^(pow), %(modulo), *(multiply),
/(div), +(plus) and -(minus). You can easily add or remove the operators that
can be used by edit this line in Kalkulator.java :private String[] operator = {"^", "%", "*", "/", "+", "-"};
but you must also add the priority in this line :
private int[] priority = {5, 4, 3, 2, 1, 0};
and then you must also add the operation in this section :
(please beware about this)switch (test)
{
case "^":
calc = Math.pow(val2, val1);
hitung.push(new Element(new Info(String.valueOf(calc))));
break;
case "%":
calc = val2 % val1;
hitung.push(new Element(new Info(String.valueOf(calc))));
break;
case "*":
calc = val2 * val1;
hitung.push(new Element(new Info(String.valueOf(calc))));
break;
case "/":
calc = val2 / val1;
hitung.push(new Element(new Info(String.valueOf(calc))));
break;
case "+":
calc = val2 + val1;
hitung.push(new Element(new Info(String.valueOf(calc))));
break;
case "-":
calc = val2 - val1;
hitung.push(new Element(new Info(String.valueOf(calc))));
break;
}```
# About Release
```
v1.1Bugs:
* I think no one. Please pull request if you found a bugs.
``````
v1.0Bugs:
* Errors when the end of list found empty string.
``````
v0.1 - BETA
Bugs:
* Can only calculate for single number (1-9), in that sense number can only
with one digit. (will be fixed for next releases)
```