Thursday, January 19, 2017

Project 1 Calculator Reflection Journal


          For project 1, I had to create a calculator that adds, subtracts, multiplies and divides numbers. For the HTML part, I used the span and div html tags and put a class for each separate part. For example all the keys had the same class name while the operators have a different class name but is the same for each operator. Then I applied an external CSS style sheet which has box shadow, float, margins, padding, colors and background colors, hover, borders and more. Finally it's the challenging part of this project which was the JavaScript. I overcame this problem through the power of research. I had to use a for loop which repeats the action of clicking a key and putting it onto the display box and evaluating it when the equal button is pressed. The problem with the calculator is that it doesn't have a limit restriction so if you keep on putting in numbers, it goes off of the calculator. I also had to use booleans and replace the x sign with an asterisk so it would actually multiply through the computers language. This project was very challenging but I'm glad I was able to overcome it. The skills I've learned will be useful in the future because I can use it to create calculators for clients. After finishing the project I had to make a poster which shows the calculator and the HTML, CSS and JavaScript code with it and an explanation of the project. 

No comments:

Post a Comment