For my Recursion Mini Lab, I built a calculator with simple, as well as advanced, functions. I built the calculator using an MVC format, as can be seen via the explanations below. The user can enter numbers into the fields to perform addition, subtraction, multiplication, division, Fibonacci, factorial, square root, power, etc.
OperationModel.java is responsible for the logistics of the calculator, such as the default value of "null", the user-input fields, etc.
Calculator.html sets up the user-input fields, creates the "Submit" button, implements styling/text, etc.
Inheritance
For my Inheritance Mini Lab, I created a simple program that prints out a sentence based on user-inputted properties via the use of Inheritance.
Car.java is the Super Class, as it contains the main attributes of the Car object.
SportsCar.java & Truck.java are both Sub Classes of the Car.java class, as they include additional properties that branch off of the main properties in the Super Class. These classes also contains toString() methods to print out sentences.
The above three classes are the Model portion of the MVC framework.
AdityaInheritance.html sets up the View portion of the MVC framework. It sets up the text fields, the text explaining the instructions, etc.
MainController.java acts as the controller for the application, taking care of the mappings, as well as the default entries for the sentence.
Sorts
For my Sorts Mini Lab, I created an application that uses three different types of sorting methods (Insertion, Bubble, Selection) in order to sort three different types of entered data, which include Integers, Strings, & POJO Objects.
Sort.java is the Model of this program, as it contains the logic for every combination of Sort Type/Data Type.
AdityaSorts.html takes care of the View portion of this program, as it set up the front-end, like the Radio Buttons, user-input fields, text for an explanation of each type of sort, etc.
MainController.java is responsible for controlling the mapping of the application, as well as implementing the default values to be sorted.
LinkedList
For my LinkedList Mini Lab, I created an program that allows users to input a certain number of elements into an Array. The program then displays the Array in an unsorted, as well as a sorted, format.
LinkedList.java sets up the logic regarding the head/tail functionality of the LinkedList, & adds default values to the unsorted Array.
Node.java is responsible for simply setting the user-inputted value into the Array.
The above classes account for the Model portion of the MVC framework.
The LinkedList.html file accounts for the View portion of the MVC framework, & sets up the front-end with user-input text fields, text for explaining the program, the Arrays, etc.
The MainController is responsible for the mapping of the program, as well as the default values in the Arrays.
Recursion
For my Recursion Mini Lab, I built a calculator with simple, as well as advanced, functions. I built the calculator using an MVC format, as can be seen via the explanations below. The user can enter numbers into the fields to perform addition, subtraction, multiplication, division, Fibonacci, factorial, square root, power, etc.
Inheritance
For my Inheritance Mini Lab, I created a simple program that prints out a sentence based on user-inputted properties via the use of Inheritance.
Sorts
For my Sorts Mini Lab, I created an application that uses three different types of sorting methods (Insertion, Bubble, Selection) in order to sort three different types of entered data, which include Integers, Strings, & POJO Objects.
LinkedList
For my LinkedList Mini Lab, I created an program that allows users to input a certain number of elements into an Array. The program then displays the Array in an unsorted, as well as a sorted, format.