Before we start, did you try solving the workbook yourself?
If not, please click the link in the resources folder and follow the instructions for this workbook.
The instructions for this workbook are I'll learn the part, so make sure to go there.
First, we have to create an array called seats.
That store is five students, so we already know this array is going to be storing elements of type
string.
I will call the array seats and it's going to store the following string values.
Harry Neville, Ron, her Mini and Seamus.
And there you go.
Okay, So that was task number one.
Task two is to replace each placeholder by indexing values from the array.
First, we can break the string right here.
And here we're going to print the element at index zero.
Harry.
Here we will print the element and index one.
Neville.
Index to would be Ron.
Index three is her money and index for would be Schamus.
You can remove the following.
All right.
Now we can just visualize the run time and compare our result to what is on learn the parts.
So let's just add a bunch of breakpoints.
And we will continue our way through them.
Using the continue button.
All right.
Time to take your fifth year exams, continue to the next breakpoint.
So here you can actually visualize the array and the variables pane.
We can see it's an array.
The element that index zero is hairy.
So this is going to print.
Harry, you will take seat zero.
The element that index one you can see as Neville So here it's going to print.
Neville You will take your seat at one.
And then it's going to keep going.
Index two is run.
Index three is her money and index four is Seamus.
And because this is the last breakpoint, I will step over this line because I don't want to resume
execution just yet.
I just want to execute this line.
And by just stepping over this line, it doesn't terminate the runtime.
It just runs this line.
So now you can visualize the array and you can compare it to what you have.
That way you gain a better perspective comparing this result to what's on during the part.
Everything looks perfect.