Question: *********You cannot use loops ************** **************only if else and switch************* ********* for exponents please use math pow***************** comments are not necessary Write an algorithm and
*********You cannot use loops **************
**************only if else and switch*************
********* for exponents please use math pow*****************
comments are not necessary


Write an algorithm and then the code for a java program that is a simple calculator. The algorithm or program plan must be in a Word document uploaded with this assignment. Make sure to let the user know what this program does at the beginning of the program so the user knows why data is being entered and what restrictions are being placed on that data. The calculator works like this: Takes 3 inputs from the keyboard: two of them are single digits ( integers from 0-9) - you must check the input to make sure it meets the criteria. An error message must be printed immediately after input if a value does not meet the criteria and the program must end. The user must enter integer values, Takes a character from the keyboard representing an operation + for addition .- for subtraction . * for multiplication ./ for division . *for exponentiation An error message must be printed immediately if an incorrect character is entered and the program must end * Outputs the description of the operation in plain English as well as the numeric result Examples: For inputs outputs five multiplied by three is 15 For inputs 9 outputs two minus nine is -7 For inputs outputs five to the power of two is 25 For inputs 4 / outputs Division by zero is not allowed. For inputs 24 outputs Invalid number should be printed after the 24 is entered. The user should not be able to enter other data. For inputs 6 7 $ outputs Invalid operator error should be printed immediately after the $ is entered. The user should not be able to enter any other data. NA UNUI NON w + Numbers that are input should be translated to English words. For example, if 5 is input, it should be translated to print as five. The operators should be translated into English words as follows: plus minus multiplied by divided by to the power of Note: Nested if, if else, and switch statements must be used when you code. Methods may not be used. Only concepts from Chapters 1 - 3 in our textbook may be used in this project. Any project using other concepts will not be accepted. The goal of this project is to use and put together the concepts learned in Chapters 1 - 3 before continuing on in our course
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
