Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Infix to Prefix

  1. #1
    Junior Member
    Join Date
    Jul 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 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....


  2. #2
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: Infix to Prefix

    The Shunting Yard algorithm will help you get from infix to postfix notation. From there, it shouldn't be too hard to convert to pre-fix.

    Here's a link to a simple java calculator that parses infix to post-fix (scroll down to the last post).

  3. #3
    Junior Member
    Join Date
    Nov 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Infix to Prefix

    hi did someone help you with this???? im also having the same problem as a part of project in school