Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2015
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. enum Coffee {
  2. case Americano, Esepresso, CaffeLatte, CaffeMocha
  3. func recipe() {
  4. switch self {
  5. case Americano:
  6. println("에스프레소 1 + 뜨거운 물 3")
  7. case Esepresso:
  8. println("에스프레소 1")
  9. case CaffeLatte:
  10. println("에스프레소 1 + 우유 3")
  11. case CaffeMocha:
  12. println("에스프레소 1 + 우유 3 + 초코소스 1")
  13. default:
  14. println("만드는 방법을 추가해주세요.")
  15. }
  16. }
  17. }
  18.  
  19. let order = Coffee.CaffeLatte
  20. order.recipe()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement