We already have two methods in our code that change the wallpaper on the desktop:
def executeChangingWallpaper(picture: String): Unit
def executeDefaultWallpaper(): Unit
The first method can be called only with a correct image file. We have written a function to check the file format, but we did not have time to handle scenarios with bad input.
Refine the function using the getOrElse method and executeDefaultWallpaper. Note that the executeDefaultWallpaper method should not be called if the passed wallpaper is correct.