Skip to content

Albond87/Responsive-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Responsive Calculator

A basic calculator application written in Java and using JavaFX that enables and disables buttons in such a way that ensures that only syntactically valid expressions can be passed to the underlying Calculator class to be evaluated.

The Calculator class is based on something I had already written for university work which I adapted for this. The syntax accepted by the evaluator is as follows (in BNF) (the spaces are important):

  • expr ::= (expr) | expr + expr | expr - expr | expr * expr | expr / expr | num
  • num ::= any number, including negatives and numbers with a decimal point in

The evaluator accounts for order of precedence, while reading expressions left to right.

About

Calculator application that enables and disables buttons to make syntax errors impossible

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages