Week 9

 


For this program we are creating a calculator. These methods are initializing the buttons for the calculator. We also set the size of the calculator window. We use the action listener to "listen" to the buttons. Then we add the buttons in the order we want. 

We setting the buttons so they refresh on press of an operator. 

switch case to do the actual operations and print the result. Then sets the delete and clear button so it works.


1+1=2

Citations:

Java calculator app 🖩 - youtube. (n.d.). Retrieved April 9, 2022, from https://www.youtube.com/watch?v=dfhmTyRTCSQ 

Comments

Popular posts from this blog

Week 9

Week 10

Week 11