Skip to content

robbiekouwenberg/TddCalculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

TddCalculator

The Tdd Calculator is a exercise to create a calculator class using the following specs

  • the calculator should have a add method that adds the result to the current total returns the total
  • the calculator should have a subtract method that subtracts the result from the current total returns the total
  • the calculator should have a multiply method that multiplies the current total and returns the total
  • the calculator should have a divide method that divides the current total and returns the total
  • the calculator should throw a exception with the text 'cannot divide by zero' when a divide by zero exception occurs
  • the calculator should have a calculate function that returns a formatted string with all calculations and the endresult

example of formatted text

         1
        +4
----------
sub      5
        -2
----------
sub      3
        *3
----------
sub      9
        /2
----------
sub    4,5
        +1
----------
total  5,5

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages