Conclusion

You’ve learned a lot about classes in this lesson:

  • You defined a MuseumObject type with properties and instantiated some objects.
  • You implemented a showImage method, using the isPublicDomain property to determine whether to use MuseumComposable or WebViewComposable.
  • With one art object in the public domain and one not in the public domain, you called showImage().
  • You demonstrated how classes are reference types by creating a new object that points to a MuseumObject object and changing the title.
  • Finally, you hid a property by making it private.
See forum comments
Download course materials from Github
Previous: Demo Next: Classes & Objects Quiz