Lab 18 Reflection
For lab 18, it was the first time we are introducing arithmetic operations. The lab was basically creating a calculator that could perform addition, subtraction, multiplication, division, and modulation. To make it so the user can input any numbers they want, I had to create input bars and assign them as a variable in order to carry out the operation. Functions had to be created for each operation in order for the code to execute correctly.
Again I used the format from the previous labs except this time there had to be more input bars and buttons to accompany the increase in operations. Creating a functional calculator was difficult, but for me it was more difficult figuring out the best method to show the results. I settled for using a similar method as lab16 which was setting the buttons so when clicked it changes the text of a paragraph, in this case it would change it to the result of the operation. This lab was good practice in using arithmetic operations and coding that will lay a foundation in more complex arithmetic code.
Again I used the format from the previous labs except this time there had to be more input bars and buttons to accompany the increase in operations. Creating a functional calculator was difficult, but for me it was more difficult figuring out the best method to show the results. I settled for using a similar method as lab16 which was setting the buttons so when clicked it changes the text of a paragraph, in this case it would change it to the result of the operation. This lab was good practice in using arithmetic operations and coding that will lay a foundation in more complex arithmetic code.
Comments
Post a Comment