Results 1 to 5 of 5

Thread: Infix to Prefix

  1. #1
    Sasarai is offline Member
    Join Date
    Jul 2009
    Posts
    2
    Rep Power
    0

    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
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    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.

  3. #3
    Sasarai is offline Member
    Join Date
    Jul 2009
    Posts
    2
    Rep Power
    0

    Default

    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++

  4. #4
    angryboy's Avatar
    angryboy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    742
    Rep Power
    6

    Default

    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)

  5. #5
    Kirsty@forum is offline Member
    Join Date
    Dec 2010
    Posts
    1
    Rep Power
    0

    Default Infix!!

    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! :)

    Try it!!

Similar Threads

  1. Infix to Post fix
    By Tenn in forum New To Java
    Replies: 0
    Last Post: 05-03-2009, 10:21 PM
  2. Postfix into prefix and vice versa
    By sfe23 in forum New To Java
    Replies: 9
    Last Post: 02-19-2009, 11:37 PM
  3. Replies: 1
    Last Post: 07-05-2008, 04:08 PM
  4. Replies: 0
    Last Post: 04-15-2008, 08:36 PM
  5. Help with Prefix cnt
    By trill in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 08:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •