1 00:00:00,240 --> 00:00:05,910 Let's cover part one task, one was that the necessary fields for the item class and looking back at 2 00:00:05,910 --> 00:00:07,890 the requirements, there are only two. 3 00:00:08,550 --> 00:00:10,890 The fields are private string name. 4 00:00:12,870 --> 00:00:14,490 Private double price. 5 00:00:18,150 --> 00:00:22,020 Now we want to apply the big three steps, the first step is to create a constructor. 6 00:00:22,500 --> 00:00:28,860 It's going to receive two parameters string name and double price, and one, the constructor runs. 7 00:00:28,860 --> 00:00:31,890 We have to set every field in the object equal to a parameter. 8 00:00:32,070 --> 00:00:35,310 This dynamic will name the stock price equals price. 9 00:00:38,420 --> 00:00:41,090 OK, now we want to autocomplete the getters and setters. 10 00:00:53,310 --> 00:00:56,970 And the next task is that a tutoring method, public string. 11 00:00:59,230 --> 00:01:02,590 Two string and just copy the format from the article. 12 00:01:20,680 --> 00:01:24,730 Let's not forget the copy constructor in case we ever need to create copies of an object. 13 00:01:37,040 --> 00:01:41,720 All right, we're done creating the item class, I know this is pretty standard stuff, but we should 14 00:01:41,720 --> 00:01:47,120 always test our code in case we missed something so inside mean I'm going to print three objects of 15 00:01:47,120 --> 00:01:48,140 the item class. 16 00:02:41,040 --> 00:02:42,300 Go ahead and run the code. 17 00:02:51,220 --> 00:02:52,810 And we get the expected output. 18 00:02:56,830 --> 00:02:59,170 For the sake of practice, I'm not a breakpoint. 19 00:03:04,240 --> 00:03:05,410 Launch the debugger. 20 00:03:08,680 --> 00:03:13,440 And let's assume you want to step inside the constructor while it's inside of another function, then 21 00:03:13,450 --> 00:03:15,640 why you would do is step into front line. 22 00:03:20,580 --> 00:03:27,720 Then step out of it, keep repeating the step in and step out process until the next step into leads 23 00:03:27,720 --> 00:03:29,850 us to the constructor for the first object. 24 00:03:31,760 --> 00:03:33,050 Here we see the parameters. 25 00:03:36,320 --> 00:03:39,590 And this points the current object we just created. 26 00:03:43,090 --> 00:03:45,910 And it updates every field in the object with a parameter. 27 00:03:47,990 --> 00:03:51,890 It's going to do the same thing for the spinach and for the coriander objects.