Calculator project
October 2, 2016 ยท View on GitHub
This form takes the users input data and do math operations.
File structure
index.php
This is the entry point of the application. It consists of html layout with math form inside.
core/MathOperations.php
Provides math operations with data.
- Parameters:
$firstOperandfor first field entry,$operatorfor second field entry,$secondOperandfor third filed entry.
- Main methods are:
__construct()for setting values for properties of the class from POST request,setResultOfTheMathOperation()to set result of the math operations to$resultproperty,addition()for addition operation,subtraction()for subtraction operation,multiplication()for multiplication operation,division()for division operation.
css/bootstrap.min.css
Bootstrap file for html layout.
css/font-awesome.min.css
Font Awesome file for html layout.
css/main.css
Main stylesheet for custom style.
js/bootstrap.min.js
Bootstrap file for dynamic html layout.
js/jquery-3.1.0.min.js
JQuery file for dynamic layout and AJAX support.