Results 1 to 5 of 5
Thread: Infix to Prefix
- 07-21-2009, 07:40 PM #1
Member
- Join Date
- Jul 2009
- Posts
- 2
- Rep Power
- 0
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.
- 07-22-2009, 04:19 AM #3
Member
- Join Date
- Jul 2009
- Posts
- 2
- Rep Power
- 0
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++
- 07-22-2009, 06:21 AM #4
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...
USE CODE TAGS--> [CODE]...[/CODE]
Get NotePad++ (free)
- 12-08-2010, 03:57 PM #5
Member
- Join Date
- Dec 2010
- Posts
- 1
- Rep Power
- 0
Similar Threads
-
Infix to Post fix
By Tenn in forum New To JavaReplies: 0Last Post: 05-03-2009, 09:21 PM -
Postfix into prefix and vice versa
By sfe23 in forum New To JavaReplies: 9Last Post: 02-19-2009, 10:37 PM -
any can help me? About MDAS and PEMDAS rules and Infix-Prefix, Infix-Postfix rules
By darlineth in forum New To JavaReplies: 1Last Post: 07-05-2008, 03:08 PM -
How to convert infix arithmetic expressions to postfix
By Java Tip in forum java.langReplies: 0Last Post: 04-15-2008, 07:36 PM -
Help with Prefix cnt
By trill in forum New To JavaReplies: 1Last Post: 08-07-2007, 07:26 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks