Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For your third JavaScript assignment, I would like you to implement this calculator. However, in implementing this calculator, I am going to ask you to
For your third JavaScript assignment, I would like you to implement this calculator. However, in implementing this calculator, I am going to ask you to only have ONE event listener. This means you will need to have a good understanding of the Propagation slide in the Handling Events PowerPoint.
There are just a couple more rules you need to follow for full credit:
You may NOT use the JavaScript eval function or other similar functions
The eval function is a String to JavaScript function that will evaluate strings like they were code
You may not modify the included HTML code. The only modification you can make is within the script tags
Please note, this should be a basic calculator. I do not expect you to obey the order of operations. For example, if the users enter an answer of is perfectly acceptable even though the answer should be if we follow the order of operations. You are also not expected to correct JavaScript behavior. That is can result in You may wait for the user to hit to perform any calculations or just keep a running total but the calculations should be correct other than what was noted.
These are the operations of the calculator:
c means clear everything from the answerWindow
means multiplication
means division
means subtraction
means addition
means to put a decimal point in your number
means perform the calculation placing the result in the answerWindow
number represent themselves.
After each item is clicked, it should be placed in the answerWindow or affect the answerWindow in some way or the user me will get confused I am easily confused
For one final helpful hint, I am going to tell you that the split method we talked about when we were talking about string functions will also take a regular expression as a parameter not just a substring
This assignment will be worth points
points for a correctly functioning calculator that follows all the above rules
points for good comments
points for good programming styletableCalculatorc
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