Needing to compare my new files Recursive.java which contains the details of creating the 4 methods as
Fantastic news! We've Found the answer you've been seeking!
Question:
Needing to compare my new files
- Recursive.java which contains the details of creating the 4 methods as specified above:
- int sum_sqr_rec(stack stk),(15 points)
- int plus_minus_rec(stack stk),(15 points)
- void prt_chars_rev_rec(stack stk),(15 points)
- void prt_chars_rec(queue stk),(15 points)
- RecursiveDemo.java which:
- A- reads a string expression:
- {(1+2)+[4*(2+3)]}
- and store the expression in a stack and a queue.(15 points)
- a- prints the corresponding expression "in reverse" using: prt_chars_rev_rec ( 5 points)
- b- prints the corresponding expressing "as is" using: prt_chars_rec.( 5 points)
- B- reads an array of integers: { 1, 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 }
- and store them in a stack of ints.(5 points)
- Then it:
- C- prints the sum of the squares of the elements in the stack usingint sum_sqr_rec(stack stk) and outputting the value(5 points):
- 385
- D- prints the sum of the elements in the stack using:
- intplus_minus_rec(stack stk)and outputting the value(5 points):
- 1 - 2 + 3 - 4 + 5 - 6 + 7 - 8 + 9 - 10 = -5
- A- reads a string expression:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date: