george-zakharov / calculator

This is a simple calculator on PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Calculator project

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:
    • $firstOperand for first field entry,
    • $operator for second field entry,
    • $secondOperand for 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 $result property,
    • 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.

About

This is a simple calculator on PHP


Languages

Language:PHP 96.9%Language:CSS 3.1%