Find Jobs
Hire Freelancers

Basics of Scala: 10 simple tasks

$10-30 USD

In Progress
Posted almost 5 years ago

$10-30 USD

Paid on delivery
Elements of Functional Programming – SCALA The solution should contain instructions to write out results. 1. Create a 7-element list containing the names of the days of the week. Write it using: a. Loop of type for b. The for loop, listing only days with names beginning with "P" c. Foreach method d. While loop e. Recursive function f. Recursive function by writing elements of the list from the end g. Foldl and foldr method h. Foldl methods by writing only days with names beginning with "P" 2. Create a map with product names and prices. On its basis, generate another map with a 10% price reduction. Use the collection mapping mechanism. 3. Define a function accepting a tuple with three values of different types and writing them out 4. Present the Option operation on any example (e.g., a map in which we search for values by key) 5. Use Pattern Matching in a function that accepts a String parameter. For strings corresponding to the names of the days of the week, the function is to return "Work" and "Weekend" (respectively for working and non-working days), for the rest: "There is no such a day". 6. Define the KontoBankowe class with the methods of payment and withdrawal and property Account status - the property is to be read-only. The class should provide a constructor accepting the initial state of the account and another one, setting the initial account balance at 0. 7. Define the class Person with properties: name and surname. Create several instances of this class. Define a function that accepts the object of the person class and selects and returns the string containing the person's greeting by using Pattern Matching. Define 2-3 different greetings for specific people (with given names or surnames) and one default greeting. 8. Write a function that removes zero from the list of integer values (i.e. returning a new list containing values from the original list except for '0') 9. Define a function that accepts a list of integers and returns the list generated based on it, in which all numbers have been increased by 1. Use the collection mapping mechanism. 10. Create a function that accepts a list of real numbers and returns a list created on its basis containing the absolute values of elements from the original list within the range <-5,12>
Project ID: 19945757

About the project

1 proposal
Remote project
Active 5 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
1 freelancer is bidding on average $80 USD for this job
User Avatar
Hi I'm an expert in scala programming. I'm sure that I can easily do this project. We can have a chat about it. Thanks..
$80 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of POLAND
Warszawa, Poland
5.0
4
Payment method verified
Member since Jan 27, 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.