1 00:00:00,180 --> 00:00:03,870 Before we start, did you try solving the workbook yourself? 2 00:00:03,900 --> 00:00:09,660 If not, please click the link in the resources folder and follow the instructions for this workbook. 3 00:00:10,720 --> 00:00:14,860 The instructions for this workbook are I'll learn the part, so make sure to go there. 4 00:00:14,950 --> 00:00:17,020 First, we have to create an array called seats. 5 00:00:17,020 --> 00:00:23,170 That store is five students, so we already know this array is going to be storing elements of type 6 00:00:23,170 --> 00:00:23,980 string. 7 00:00:24,010 --> 00:00:28,830 I will call the array seats and it's going to store the following string values. 8 00:00:28,840 --> 00:00:31,750 Harry Neville, Ron, her Mini and Seamus. 9 00:00:35,170 --> 00:00:35,950 And there you go. 10 00:00:37,410 --> 00:00:39,510 Okay, So that was task number one. 11 00:00:39,960 --> 00:00:44,310 Task two is to replace each placeholder by indexing values from the array. 12 00:00:44,310 --> 00:00:46,950 First, we can break the string right here. 13 00:00:48,430 --> 00:00:52,210 And here we're going to print the element at index zero. 14 00:00:53,300 --> 00:00:53,990 Harry. 15 00:00:54,740 --> 00:00:57,560 Here we will print the element and index one. 16 00:00:57,950 --> 00:00:58,700 Neville. 17 00:01:00,170 --> 00:01:03,230 Index to would be Ron. 18 00:01:07,840 --> 00:01:13,390 Index three is her money and index for would be Schamus. 19 00:01:14,160 --> 00:01:15,780 You can remove the following. 20 00:01:24,520 --> 00:01:24,880 All right. 21 00:01:24,880 --> 00:01:30,750 Now we can just visualize the run time and compare our result to what is on learn the parts. 22 00:01:30,760 --> 00:01:34,330 So let's just add a bunch of breakpoints. 23 00:01:36,450 --> 00:01:38,790 And we will continue our way through them. 24 00:01:39,810 --> 00:01:41,280 Using the continue button. 25 00:01:41,730 --> 00:01:42,150 All right. 26 00:01:42,150 --> 00:01:46,140 Time to take your fifth year exams, continue to the next breakpoint. 27 00:01:46,140 --> 00:01:50,420 So here you can actually visualize the array and the variables pane. 28 00:01:50,430 --> 00:01:52,140 We can see it's an array. 29 00:01:52,170 --> 00:01:54,750 The element that index zero is hairy. 30 00:01:54,750 --> 00:01:55,860 So this is going to print. 31 00:01:55,890 --> 00:01:57,690 Harry, you will take seat zero. 32 00:01:58,980 --> 00:02:03,360 The element that index one you can see as Neville So here it's going to print. 33 00:02:03,390 --> 00:02:06,030 Neville You will take your seat at one. 34 00:02:07,760 --> 00:02:09,110 And then it's going to keep going. 35 00:02:09,139 --> 00:02:10,370 Index two is run. 36 00:02:10,370 --> 00:02:13,700 Index three is her money and index four is Seamus. 37 00:02:15,150 --> 00:02:19,980 And because this is the last breakpoint, I will step over this line because I don't want to resume 38 00:02:19,980 --> 00:02:21,280 execution just yet. 39 00:02:21,300 --> 00:02:23,160 I just want to execute this line. 40 00:02:23,250 --> 00:02:26,950 And by just stepping over this line, it doesn't terminate the runtime. 41 00:02:26,970 --> 00:02:28,290 It just runs this line. 42 00:02:28,290 --> 00:02:32,440 So now you can visualize the array and you can compare it to what you have. 43 00:02:32,460 --> 00:02:37,620 That way you gain a better perspective comparing this result to what's on during the part. 44 00:02:37,710 --> 00:02:39,780 Everything looks perfect.