Jump to content

Calculator


Jordan

Recommended Posts

I watched a guide on how to make this, and I'm going to try and improve on it periodically to improve my java skills.

 

Day 1

40FkM.png

 

It successfully does your math!

 

Day 2

So, I went through and found a better source to use. I didn't actually make it, but I liked it's style.

41wYN.png

Edited by Master Chief
  • Like 1
Link to comment
Share on other sites

I watched a guide on how to make this, and I'm going to try and improve on it periodically to improve my java skills.

 

Day 1

40FkM.png

 

It successfully does your math!

Are you using infix to postfix conversion with the use of stacks?Otherwise doing the math will become a clusterfuck when youre not doing single operator conversions. You also need to push the postfix conversion into a binary tree the choose a traversal method, otherwise it will be a lot of hardcoding.

Heres an examples of what they made us create in university

 

snippet_zps2fa41a22.png

 

after the postfix conversion is done everything is pushed into a binary tree in nodes then a bst search is applied and the correct mathematical rules are followed

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...