View the step-by-step solution to:

m Create a class called BasicCa/cularoL/'ava. The calculator can operate in two modes: Standard and Scientic modes. The Standard mode will allow the...

Screen Shot 2018-11-03 at 11.34.16 PM.pngI need guidance how to create java basic and scientific console calculator. The Standard mode will allow the user to perform add, subtract, multiply, and divide. The Scientific mode will allow the user to perform the same functionality as the Standard plus the following: sin x, cos x, tan x

Screen Shot 2018-11-03 at 11.34.16 PM.png

m
Create a class called BasicCa/cularoL/‘ava. The calculator can operate in two modes: Standard and Scientific modes. The Standard mode will allow the user to perform the following operations: add. subtract. multiply, and divide. The Scientific mode will allow the user to perform the same
functionality as the Standard plus the following: sin x. cos x. tan x.
. The calculator program will first ask the user for the mode to operate in [Standard or Scientific]
Sample Output
Enter the calculator mode: Standard/Scientific?
Standard
. The program should then ask the user for the operation to execute [+. -, r, /. sin x. cos x. tan x]
Sample Output
Enter ‘+' for addition. '-' for subtractions. "' for multiplication, ’/' for division. ‘sin' for sin x. ‘cos’ for cos x. ‘tan' for tan x:
o If the user enters an invalid operation. output a message telling the user the input is invalid and re-prompt the user for the operation again.
Enter '+' for addition. '-' for subtractions. "' for multiplication. '/' for division, 'sin' for sin x. ‘cos' for cos x. ‘tan' for tan x:
division
Invalid operation entered
Enter ‘+' for addition. '-' for subtractions. "' for multiplication. '/' for division. ‘sin' for sin x. ‘cos’ for cos x. ‘tan‘ for tan x:
/
o In order to know how many times the user will need to perform the operation. prompt the user for the number of double values they want to enter [All numbers in this program are double]. then ask the user to enter the numbers.
Sample Output:
How many numbers do you want to subtract:
3
Enter 3 numbers:
4
35
9
Note: In this example the calculator will calculate 4 + 35 + 9. The result will be 48.
- As an example. the calculator should be able to perform addition. subtraction. multiplication. and division of two or m. numbers but perform sin x. cos x. and tan x of one number only [the number is in radians]. For example. the calculator should be able to perform the following operations:
2+3 = 5
2+6+141+l = 11
1-2-90 - 91
10‘? 0
10/ 2/ 5 = i
cos[0] = l
siniO] = D
ian[o] = a Note: This calculator does NOT support multiple operations in the expressions like: 10+2—B
- Create a separate method for each operation types (add. subtract. multiply. divide. sin. cos. ban] and call the corresponding method to execute the operations logic. For example. if the user enters '+'. the program will call the addition method. if the user enters the program will
call the subtraction method
. Finally. output the result to the user and ask the user if he/ she want to start over.
Sample Output:
Result: 50.0
Start over? Y/N
Y
Put Mot
Create an enhanced version of your calculator in a separate class called Enhancedcalculaton/ava [Create a separate file]. Extend the calculator to allow for multiple operations in the expressions. For example, the program will be able to perform the following expressions: 10+2-B and 10/23 and cositan[3]] a

Top Answer

Here is a detailed explanation... View the full answer

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online