Find Jobs
Hire Freelancers

scala super small assignment (5 hours estimate)

€8-30 EUR

Cancelled
Posted about 6 years ago

€8-30 EUR

Paid on delivery
Aggregate Service Aggregate service is a simple REST service implemented with Spray which provides sum, mean and max functionality for different numeric types. The service accepts only POST requests with a JSON payload as follows: Request: json { "function": "sum", "values": "12.0, 13.00, 23.42", "valueType": "double" } Response: json { "result": "48.42" } How to run the server: sbt run => Starts the server at localhost:9090 How to change the default host or port: This can be done by changing the default values for the host and port in the [login to view URL] file. Assignment In the given sbt project the code responsible to start the server, receive messages and send the response back, together with marshalling and unmarshalling of messages is written in Scala and located in the [login to view URL] package. The basic implementation of aggregate functions is written in Java and located at [login to view URL] package. At the moment only the sum function is implemented. We would like you to: Convert all Java code to Scala. Implement the remaining aggregate functions for the given types. Add support for BigDecimal type. Add the tests you see fit to show the functionality works as intended, also in Scala, for all aggregate functionality. We encourage you to make changes to the aggregate functionality to improve the quality/readability of the code. We don't expect you to make changes in the server code (except for adding support for the BigDecimal type in the doAggregate function of [login to view URL]), but feel free to do so if necessary or when you see room for improvement.
Project ID: 16750010

About the project

Remote project
Active 6 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs

About the client

Flag of FINLAND
Stockholm, Finland
0.0
0
Member since May 29, 2014

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.