Skip to content

jgvogt/string-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

string-calculator

A simple calculator that adds strings

Table of Contents

Dependencies

What you need:

Running the Tests

Right Click Project -> Run As -> JUnit Test

Running the Application

Right Click Project -> Run As -> Java Application

  • Enter Input into the Spring Tool Suite Console See Below:
  • Please enter numbers to add: 1,2

Exercises

Write JUnit Tests that will support the following requirements:

  1. An empty string returns zero
  2. A single number returns the value
  3. Two numbers, comma delimited, returns the sum
  4. Two numbers, newline delimited, returns the sum
  5. Three numbers, delimited either way, returns the sum
  6. Negative numbers throw a NegativeNumberException
  7. Numbers greater than 1000 are ignored

About

A simple calculator that adds strings

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages