Skip to content

zeleebobo/Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Math calculator

Calculator evaluates expression by converting Infix notation to Postfix.

Calculator has several types of expression elements:

  • number (float with point)
  • constant (PI, E)
  • operator (+, -, *, /)
  • function (sin, cos)

Usage

  1. Enter your expression to console
  2. Get result

Attention: Current realization of parser can parse only elements between which exists whitespace.

Example:

cos ( 1.5 + 1.5 ) / 3

Extension

Adding new expression elements

  1. Choose what type of element you want to add
  2. Inherit new element class from base element
  3. Define class attribute StringDefinitionAttribute with string value of element
  4. Add implementation logic of your element
  5. ???
  6. Profit

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages