3. Which among the following shows a valid use of the Direction enumeration as a parameter to the moveCharacter function? Select al that apply. enum Direction { case north, south, west, east } func...


3.



Which among the following shows a valid use of the Direction enumeration as a parameter to the moveCharacter function? Select al that apply.


enum Direction {
  case north, south, west, east
}


func moveCharacter(x: Int, y: Int, facing: Direction) {
// code here
}






moveCharacter(x: 0, y: 0, facing: .southwest)




moveCharacter(x: 0, y: 0, facing: Direction.north)




moveCharacter(x: 0, y: 0, facing: .south)




moveCharacter(x: 0, y: 0, facing: Direction.northeast)




Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here