Infix to Prefix
Good day programmers. i dont know where to start but may i ask help for me to create a program that converts infix expression to prefix expression. i got the idea that i can use stack implementation for the infix-prefix converter to work. my only problem is i dont know how to implement a stack into a code that i can use for converting infix to prefix notation. I need some ideas and algorithms that can help me in my coding.
im not a good programmer that's why i joined this forums because i think by interacting with fellow programmers, i can become good and enhance my skills by sharing ideas, opinions and algorithms with other programmers. i hope that this forums will help me grow as a programmer even little by little.... i would greatly appreciate your ideas if any... I will also try to code it then i hope that i can ask for permission for the members to check and analyze my code. this infix-prefix converter i think is a very hard program. but i hope that i can do it with the help of my fellow programmers here in this forum. thanks....
There are several good tutorials on this very problem, some with Java code that can be found with Google. Have you had a look at these first? Best of luck.
Yep i already have. but most of them are not working properly after i compile and run them... im clueless and i dont know how to start coding it and applying stack implementation because we haven't been taught how to program it in java... only in C++...
And being new to Java, its syntax is different to C++
When starting out, you are better off not looking at other codes as it might influence your design in the wrong direction. Best place for me was the pseudocodes on wikipedia. Think how you want to design it. For me, I wrote a parser that splits the numbers and OPs, then push/pop them on/off the stack following the pseudocode. That's the conversion phase only, Then there's the evaluation...
I downloaded a trial of Infix on my PC and it is the best thing i ever did! I've tried a few other PDF Editor's but nothing compares to Infix. It's quick and easy to use creates great results! Can't wait to keep using it, it has made my life sooo much easier! :)