Skip to content

drnow4u/java-calculator-examples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Not So Simple Java Calculator

Forked from mikailsheikh/cogitolearning-examples

This project is example calculator implementation with:

  • Lexer - to split string expression into tokens
  • Parser - to build AST from tokens sequence
  • Abstract Syntax Tree - to represent string expression as tree
  • Reverse Polish Notation - to calculate expression value

Design patterns

  • Iterator
  • Visitor
  • Composite
  • Singleton
  • Records in Java 16
  • Sealed Classes in Java 17
  • Pattern Matching in Java 17 (preview)
  • Guarded Pattern in Java 17 (preview)

Change added

  • Maven
  • JUnit5
  • Lombok
  • Decouple AST from calculation algorithm
  • Reverse Polish Notation as calculation algorithm
  • Fix code check style with Sonar, CodeMR, CheckStyle-IDEA and FindBugs-IDEA
  • Migration to Java 8
  • Migrate to Java 17

About

All the examples for the tutorials on the Cogito Learning website.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%