Free Help with Programming Problems

October 15th, 2006

Sometimes you might be working on your blog and need a tip getting something customized just right. If you’re like me then you often receive programming assignments and find yourself stuck on one little tiny problem that you just can’t seem to solve. I don’t have very much experience with Java and that’s what language all of our programming assignments are in this year. It gets really frustrating sometimes when I know what I want to do but can’t quite figure out the right way to do it in Java. CodeCall Programming Forum is an excellent resource for getting help with programming problems big and small. Programming experts and professionals frequent the forums and offer their help for free! Whether you need help with Java, C, or even just plain HTML you can hop onto the forum and get answers.

One Response to “Free Help with Programming Problems”

  1. Anthony Dabney says:
    COCS3308                  Assignment-2 (Programming)            Due: Friday, 9/19/2008
               Balanced Parenthesis Expression (BPE) Generation
    
         THE FOLLOWING CFG MAY DEFINE THE SET OF BPE EXPRESSIONS:
    
            S -> S R
            S -> R
            R -> ( S )
            R -> ( )
    
         Objectives:
    
         1. Appreciate the practical utility of unambiguous grammars.
         2. Understand the process of leftmost derivations in obtaining all possible derivations.
    
         Task:
         Your task is to write a well-structured program (in any language of your choice)
         that generates and prints all different expressions for length of 8, 10, 12, and 14 respectively.
         For example, for the length of 4,
        we have two such expressions:
                (())
                ()()
        and for the length of 6,
        we have five such expressions:
                ((()))
                (()())
                (())()
                ()(())
                ()()()
    
         SUGGESTED Functions
    
         1.  void S(int N, int POS, CHARSTRING A)
               {
             // N is the number of nonterminals yet to be derived and
             // it is initially half the length being sought.
             CHARSTRING Save;
             if (N==0) PRINT(A,POS)
                // TO PRINT AN EXPRESSION found
                      // AFTER CONVERTING EVERY NONTERMINAL TO "()"
              else
              {
              strcpy(Save,A);
              RULE1 (N,POS,A);  // TO APPLY RULE#1 AND THEN
                                        // RECURSIVELY CALL S() to continue
              strcpy(A,Save);
              RULE2 (N,POS,A);  // TO APPLY RULE#2 AND THEN
                                        // call R() to continue
              }
               }
           // End of S()
    
         2.  void R(SAME PARAMETERS)
           {
             Charstring Save;
               if (N==0) PRINT(A,POS);
               else
             {
               strcpy(Save,A);
               RULE3 (N,POS,A);    // TO APPLY RULE#3 AND THEN CALL S() to
                       // continue
               strcpy(A,Save);
               RULE4 (N,POS,A);    // TO APPLY RULE#4, LOCATE NEXT
                                       // NONTERMINAL R AND CALL R() to continue
             }
               }  // END of R()
    
         3. void RULE1 (int MORENONT, int POS, CHARSTRING A)
            { // Applying the rule-1: S -> S R
              int M;
              for ( M=MAXSIZE-1; M>=POS+1; M--)
                A[M+1]=A[M];
              A[POS+1] := 'R';
              S(MORENONT-1,POS,A);
            // as the result of applying rule-1, the number of remaining
            // nonterminals is reduced by one.
            } // end of RULE1()
    
         4. OTHER functions:
                RULE2
            RULE3
            RULE4
            PRINT(A, Pos)
            // This function will print the string
            // contents of 'A' after converting each remaining
            // nonterminal to be found beyond the given position
            // into "()"

    i am writing this program an i am stuck because i do not understand where i can sto p and see where the condition of right number of parethsis is met ?

Leave a Reply

You must be logged in to post a comment.


google.ruyandex.ru