Assign number to functions (+,-,*,/,-RND= Random number,AC=All clear,to end the program) The function should ask for a number, operator, number first and then output in two lines. Line one should be the calculation and the answer (for example 2+3=5)and sencond line should ask for another operator to calulate the result above even further and when you put in the operator then ask for a number and keep doing it untill you press the assigned button to end (AllClear) it. A simple command line calculator is good enough.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Assign number to functions (+,-,*,/,-RND= Random number,AC=All clear,to end the program)

The function should ask for a number, operator, number first and then output in two lines. Line one should be the calculation and the answer (for example 2+3=5)and sencond line should ask for another operator to calulate the result above even further and when you put in the operator then ask for a number and keep doing it untill you press the assigned button to end (AllClear) it. A simple command line calculator is good enough. 

You have probably given programming assignments with a complete list of requirements as well as a template
design in your previous programming courses. In this assignment, you will ANALYZE a given program first
and then DESIGN and IMPLEMENT a similar Java program to the original one.
The problem is to provide a single Java program with a command-line interface (CLI) that mimics the
behavior of the following web-based calculator program closely:
https:// www.calculator.net/math-calculator.html
*Some of the functionality of the calculator (i.e., greyed
out ones) was removed to simplify the assignment.
7
4
2 3
RND AC
In other words, your program should support the same functions, accept the input values with the same value
ranges, print the results of operations in mostly the same way except the simplifications given in 3, 4, and 5
below.
For simplicity, your calculator should be able to do calculations up to 10 digits, i.e., it should work for all
input values that would give a calculation result up to 9,999,999,999. You don't need to support or test the
numbers larger than that value.
For simplicity, your calculator does NOT need to handle invalid inputs or do any error checking. Instead, it
should guide the user with appropriate prompts about the expected inputs and allowed input formats/values so
that the user inputs will not cause the program to crash or err.
You can safely assume that the user will follow the displayed prompts and enter completely valid inputs.
For simplicity, you are NOT expected to implement a GUI (Graphical User Interface) for your program, but a
command-line interface (CLI.) You can do your own CLI design freely.
Hint: Any CLI that allows the user to enter or select the calculator type, operation to be performed, and enter the
input values, display the output results to the user as text on the console is acceptable. Both implementations should
be provided with the same user interface.
Transcribed Image Text:You have probably given programming assignments with a complete list of requirements as well as a template design in your previous programming courses. In this assignment, you will ANALYZE a given program first and then DESIGN and IMPLEMENT a similar Java program to the original one. The problem is to provide a single Java program with a command-line interface (CLI) that mimics the behavior of the following web-based calculator program closely: https:// www.calculator.net/math-calculator.html *Some of the functionality of the calculator (i.e., greyed out ones) was removed to simplify the assignment. 7 4 2 3 RND AC In other words, your program should support the same functions, accept the input values with the same value ranges, print the results of operations in mostly the same way except the simplifications given in 3, 4, and 5 below. For simplicity, your calculator should be able to do calculations up to 10 digits, i.e., it should work for all input values that would give a calculation result up to 9,999,999,999. You don't need to support or test the numbers larger than that value. For simplicity, your calculator does NOT need to handle invalid inputs or do any error checking. Instead, it should guide the user with appropriate prompts about the expected inputs and allowed input formats/values so that the user inputs will not cause the program to crash or err. You can safely assume that the user will follow the displayed prompts and enter completely valid inputs. For simplicity, you are NOT expected to implement a GUI (Graphical User Interface) for your program, but a command-line interface (CLI.) You can do your own CLI design freely. Hint: Any CLI that allows the user to enter or select the calculator type, operation to be performed, and enter the input values, display the output results to the user as text on the console is acceptable. Both implementations should be provided with the same user interface.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Concept of Parenthesis
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education