Week 7: Assignment #07
Calculator Web App
DUE: Tuesday, 2/28 @ 5pm
You will be making a basic four-function web-based calculator.
Save the startpage to your computer. Notice that this file ALREADY has some functions and variables defined in it. These should help to give some structure and hints to help you start.
Basic workflow of this page is that a person enters a number by clicking the buttons with their cursor, then presses a math function, then enters a second number, then presses the equal sign, and the result appears.
Requirements:
- Create a visual identity for the app (colors, typography, styles, etc)
- Design the appearance of the calculator buttons.
- When the user presses a numeric button, the number is added to the input field.
- When the user presses a math button, the first number is stored, the math operation is stored, and the input screen is cleared.
- When the user presses the equal button, the current number is stored, the app checks to make sure the user previously entered a first number and a math operation, and then performs the appropriate calculation, outputs the result to the text box, and clears the variables.
- If the user presses the clear button, the variables are all cleared and the input box is cleared.
Upload your completed assignment by the due date specified above and make sure that you add a working link to it on your class page, otherwise it will not be reviewed and you will not receive credit. If you expect to be late submitting an assignment, you need to email the instructor and grader prior to the deadline to notify them of the late submission, then later follow up once your assignment has been completed, uploaded, and linked from your class page. The latest a late assignment can be submitted is a week after its original due date.