2023 Java Stacks Due date July 14 2013 9 00AM EST Objectives To gain | Assignment Collections
Computer Science 2023 Java@Stacks
2023 Java Stacks Due date July 14 2013 9 00AM EST Objectives To gain | Assignment Collections
Java @ Stacks Due date : July 14, 2013 9.00AM (EST) Objectives: To gain experience with stacks. Documentation: Explain the purpose of the program as detail as possible – 13%. Develop a solution for the problem and mention algorithms to be used -16% List data structures to be used in solution. – 5%. Give a description of how to use the program and expected input/output – 5% Explain the purpose of each class you develop in the program. – 5%. Programming: For each method, give the pre and post conditions and invariant, if any – 10% Program execution according to the requirements given 36% Naming of program as required 5% Print out of source code 5% Description of Program You are to write a program name calc.java that evaluates an infix expression entered by the user. The expression may contain the following tokens: (1) Integer constants (a series of decimal digits). (2)x (representing a value to be supplied later). (4) Binary operators (+, -, *, / and %). (5) Parentheses Spaces between tokens are allowed but not required. The program will convert the (user input) infix expression to postfix (RPN) form and display the converted expression on the screen. The following example illustrates the behavior of the program (user input is in bold and red): Porgram output is in bold and green. Enter infix expression: (7 + x) * (8 – 2) / 4 + (x + 2) Converted expression: 7 x + 8 2 – * 4 / x 2 + + Enter a value for x: 5 The result is: 25 Enter a value for x: 8 The result is: 36 Enter a value for x: 3 The result is: 20 Enter a value for x: q ——>Any value that is not an integer – the program terminates When solving the postfix expression, you must prompt the user for an input value for x, solve the expression and return a result. You must use an operand stack to process the postfix expression. Display this result on the screen as well as the postfix expression as shown above. If the infix expression contains an error of any kind, the program must display…
We give our students 100% satisfaction with their assignments, which is one of the most important reasons students prefer us to other helpers. Our professional group and planners have more than ten years of rich experience. The only reason is that we have successfully helped more than 100000 students with their assignments on our inception days. Our expert group has more than 2200 professionals in different topics, and that is not all; we get more than 300 jobs every day more than 90% of the assignment get the conversion for payment.