Learn Courses My Dashboard

14 Day Challenge - Challenge 8

Hi, this is stupid question but as I am completely new to all this stuff I will follow with “better to ask the way than to go astray”. I find myself stuck at challenge number 8 as trying to figure it out how to make properties that have private access. Shall I look for it outside of the course?

Second thing, am I missing solutions to challenges 7+ or it is not there?

Hi @Bart12

Welcome to the community.

I have move your post to its own thread since your question is not related to the original question that was asked some time ago.

The challenge 8 says, in part:

  • Declare 4 properties called make , model , year and details

and then later on says

  • Make all 4 properties have the private access level

which means that by doing so means they are not visible outside of the struct.
In simple terms it means adding the key word private in front of the declaration.

For example if you have

let make: String = "Toyota"

then insert private before let..... like this:

private let make: String = "Toyota"

The challenge 7 solution is in the Resources folder which is accessible from the Introduction Module of the course by tapping on the heading "Resources’ which opens up a DropBox folder which has a folder foe each lesson. Drill down on those folders and you will find what you need.

From the bottom of my heart - thank you thank you and thank you young man