- The HTML file contains just the basic buttons and the container of my whole calculator.
- html_file
- I used Grid to design the whole layout
- As the Grid is now widely used among so many different web designs, the grid makes things look more aesthetic.
- CSS Grid is one of the main things in CSS nowadays and this project is the best way to improve my grid skills.
- I used a light background for the body to make it look more pleasing.
-
I used an Object-oriented approach to build this project.
-
The main object is the calculator
-
it takes two parameters which are
previousnumber( the number that was entered before) andcurrent number(the number that is being entered now ) -
The object
calculatorhas certain methodsdel()To delete the last digit of the current inputclear()To clear out thepreviousas well ascurrentinput and theoperatorcalc()To calculate the resultcurrentoperator()that watches for the operator and once an operator is selected thecurrentinputbecomes thepreviousinputand the calculation goes onappendInputresponsible for adding the numbers to thecurrentandpreviousinputupdateDisplay()is responsible for updating the display on the screen mainly on the calculator
- CSS GRID
- Object-oriented programing
- JS functionality
- Best practices
