Duty schedule

Report a typo

Scally starts a program that will maintain the duty schedule for her team. The program gets the day of the week and prints out who is on duty on this day and how many day-offs a person will get. Finish the program that Scally started.

Sample Input 1:

Monday

Sample Output 1:

On Monday Alice on duty, will get 1.0 day-offs
Write a program in Scala 3
object DutySchedule extends App {

val dutySchedule = Map(
"Monday" -> ("Alice", 1.0),
"Tuesday" ??? ("Bob", 1.0),
"Wednesday" ??? ("Scally", 1.0),
"Thursday" ??? ("Alice", 1.0),
"Friday" ??? ("Bob", 1.5),
"Saturday" ??? ("Scally" ??? 2.0),
"Sunday" ??? ("Scally" ??? 2.0)
)

val day = scala.io.StdIn.readLine()
val tuple = dutySchedule(???)
println(s"On $day ${???} on duty, will get ${???} day-offs")
}
___

Create a free account to access the full topic