Loading...
Seen in this web page a simple calculator HTML mark up with two mathematical function which is Addition and Subtraction.
Usage: Enter a number and press either the + or - button to perform the desired computation and then press = to obtain the results. To perform another calculation, press the C button to clear memory.
Tech notes: There are two scripts classes.js and index.js. The calculator script is written in a JavaScript class in the filename classes.js and instantiated in index.js. There are two methods available for mathematical operations in the Calculator class namely
Clone the repository in your local machine. Create another branch with this format your_last_name-your_firtname_develop
After cloning, create two additional methods for the Calculator class for the remaining two math operations. That will be for Multiplication and Division.
Modify the UI and create 0 up 9 button keys which when pressed will be the input for the desired math operation. The input should be displayed in the text field (the calculator screen)
Bind the +, -, *, /, c or C and = or "Enter" keys to the appropriate operation. <Pressing Enter should give your the results>. Example when button "5", "+", "6", "=" were pressed in that particular order, the result should be 11 (shown in the text field). And pressing "C" or "c" will clear the memory.
Create a custom Clock class that will implement a method (or methods) to format the clock into 12-hr format and 24-hr format. You will need to provide the additional UI for toggling the clock format.
Push your your_last_name-your_firtname_develop branch and create a pull request to the useracceptance branch.