ltenconi / calculator-api

A simple calculator web service that caches the results of its computations.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

calculator-api

Coding exercise:

Using Java, implement a simple calculator web service that caches the results of its computations, with endpoints in a format similar to the following:

/add/{a}/{b}/{c} /subtract/{a}/{b}/{c} /multiply/{a}/{b}/{c} /divide/{a}/{b}

For the operations of addition, subtraction, and multiplication, the calculator endpoints should support an input of up to three numbers in the same call.

Each endpoint should support the GET method, and it should return the result in JSON format. If there is more than one call for the same operation on the same numbers, then the result should be returned from the cache rather than being recomputed.

About

A simple calculator web service that caches the results of its computations.


Languages

Language:Java 100.0%