Question
Please Provide me all necssary Screenshort, Commentds and make all class are separate with highlight:(I use eclipse) Requirements The purpose of this project is to
Please Provide me all necssary Screenshort, Commentds and make all class are separate with highlight:(I use eclipse)
Requirements
The purpose of this project is to gain an understanding of using recursion to solve problems.
Arithmetic Expression Evaluator:
The purpose of the project is to gain an understanding of Java recursion. Therefore recursion should be used. Stacks should not be used.
That is, have the following procedures: expression, term, and factor. You call expression first. It always calls term (based on the BNF description). Upon return it checks for a + or or end of expression string. In the case of + or it calls expression (recursively) (based on the BNF description) and then does the addition or subtraction.
You do the same for term and factor following the BNF description.
You dont need any stacks. Just use normal Java recursion calling : expression, term, and factor based on the BNF description.
Write a Java application or applet that asks a user to enter an arithmetic expression, and then compute and print out the result. The expression may contain parenthesis, *, /, +, - and numbers. Unary plus and minus do not need to be supported. Normal Java evaluation precedence should be used. For example:
(1 + 2) * (6 / 2 + 3) = 18
BNF (Backus-Naur Form) is commonly used in compilers to describe the language to be accepted. A BNF definition of an arithmetic expression is:
You may use the above BNF definition as a basis for your implementation. The BNF definition should show you how to call the various functions recursively if you name your functions expression, term and factor. You may use Google searches to help with this project, but you may not use any code found by these searches.
Grading Criteria:
Methods must be of appropriate length usually less than 1 page in length
Appropriate private and public access modifiers must be used. Almost always data is private and methods are public although you may certainly have private or protected methods if appropriate.
Meets program specifications as described above
The program is robust with no runtime errors or problems
Program is readable
Comments
Use Javadocs conventions (Appendix H)
Include comments on the class as a whole including
Description of program
Your name (use @author)
Date (due or date you started or last modified)
Source of any borrowed code
For each method include
Concise description of what method does
Arguments for each method (use @param)
Returned value (use @returns)
Exceptions which are thrown (@throws)
Consistent and correct indenting
Meaningful identifiers
Normal capitalization conventions are used
The source of any "borrowed" code is clearly identified
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started