Skip to content

george-zakharov/calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

Stars

Watchers

Forks

Packages

No packages published