Git Product home page Git Product logo

arithmeticevaluator's Introduction

Introduction:

Simple interpreter that, when given an arithmetic expression as a string, can return the value.

Packages

program

Responsability

  • Is only useful to show an example of how the evaluator works

Dependences

  • expression_manager

expression_manager

Responsabilities

  • Parse the expression
  • Validate the expression
  • Create all the elements of the expression
  • Add the elements to a binaryTree

Client

  • Program

Dependences

  • element
  • binary_tree

element

Responsabilities- Provide objects that can instance all the elements of the operation

  • Provide a global point of acces to the operators.
  • Construct operators
  • Construct variables

Client

  • Expression

user_messages

Responsabilities

  • Centralize all the messages that the final user could see.
  • Centralize all the exceptions of the evaluator

Client

  • All Packages

binary_tree

Responsabilities

  • Provide usefull clases to make a BinaryTree
  • Provide algorithms to pass over the BinaryTree
  • Order IElements in BynaryTrees in base on their priority

Client:

  • expression_manager

Next Steps

  • Create an OperatorFactory thath given the symbol return the correct Operator
  • Create an user_interface
  • The intelligence to know what type of element is and create this could be in the package element

Sequence Diagram

sequenceDiagram
    program->>+expression_manager: Expression as String
    expression_manager->>element: Parsed element as String
    element --> element: Convert String to IElement
    element ->> expression_manager: IElement as Object
    expression_manager->> binary_tree: IElement
    binary_tree --> binary_tree: priorize IElement
    binary_tree ->> expression_manager: priorized BinaryTree
    expression_manager ->> program: Result as a Double   

arithmeticevaluator's People

Contributors

lucasbiagettia avatar

Stargazers

 avatar Arian Racca avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.