Learn Courses My Dashboard

Module2 challenge7 pizzas

Dear CWC , or Chris:)

I do not understand what you are asking me to do in this challenge. I know how to do it and I could just look in to solution , butI just want to check with you cause I like to do things myself.
You asked to create class as a model? I would, use struct. and then I would create a class in the viewmodel with the three struct oneliners ( i love them). So far so good, recently I started really to enjoy coding thanks to you. greetings, Ewa

If you read the instructions as “Declare a class named Pizza and add the properties listed below” it might make more sense to you.

The reason that you declare a class will become more evident later on in the course.

The next part of the challenge is to create a ViewModel which contains an array of 3 instances of that class.

Then create a SwiftUI view in which you display the contents of the array in a List.

1 Like

Thank you I just went anyway and did it with a struct but I will change it now.

I changed things and now it make sense, sorry and thank you :slight_smile: