Guest User

Untitled

a guest
Sep 18th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. //MARK: Product Creation
  2. enum Size {
  3. case small
  4. case medium
  5. case large
  6. }
  7.  
  8. enum Color {
  9. case red
  10. case green
  11. case blue
  12. }
  13.  
  14. struct Product {
  15.  
  16. var name: String
  17. var color: Color
  18. var size: Size
  19.  
  20. }
  21.  
  22. extension Product : CustomStringConvertible {
  23. var description: String {
  24. return "\(size) \(color) \(name)"
  25. }
  26. }
Add Comment
Please, Sign In to add comment