Shane Calculator

About the Project

The objective of this project was to design a functioning calculator app, making use of the GUI elements provided by the swing package from the javax libraries. I wanted the calculator to function the way most basic calculators do. This calculator allows the user to click on buttons to perform basic operations - add, subtract, multiply, and divide - and displays the results to the user. Users can also use the previous results as an entry to a new equation by clicking on one ofn the operation buttons.

My Contribution

I created this project by myself and it was the first Java project I did outside of a class setting. I had some help from watching some YouTube videos but I didn’t copy and paste the code they used, just referenced certain parts. I wanted to write it the way I imagined so the size of each GUI element - frame, buttons, and panels - were specified by me. The positons of each button and panels were also adjusted to my liking, and the colors were also chosen by me. It’s currently a work in progress, though I’m not too sure if I will continue it. I may want to scrap this project and create a new calculator app, probably utilizing a different language like JavaScript.

The knowledge I have gained

Through this experience I learned a lot more features that Java provides as well as expanded my knowledge of certain features. One thing I learned was the basics of creating GUIs which was how to generate a frame, buttons, and panels and manipulate them to create an interactive window for the user. I learned about the extends keyword which allows you to create your own class that inherits the attributes from the extended class which is called the parent class.

If you want to take a look at the source code, you can click on this Link.