Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //MARK: Product Creation
- enum Size {
- case small
- case medium
- case large
- }
- enum Color {
- case red
- case green
- case blue
- }
- struct Product {
- var name: String
- var color: Color
- var size: Size
- }
- extension Product : CustomStringConvertible {
- var description: String {
- return "\(size) \(color) \(name)"
- }
- }
Add Comment
Please, Sign In to add comment