1 00:00:13,610 --> 00:00:19,960 Hello and welcome to the golden programming language course in the previous session, we talked about 2 00:00:19,970 --> 00:00:21,920 the declaration of this time. 3 00:00:22,280 --> 00:00:26,420 And in this session, we want to talk about the other AUSTRAC's concept. 4 00:00:30,600 --> 00:00:38,640 Creating instances of strike twice, we can create an instance from this, right in several different 5 00:00:38,640 --> 00:00:39,090 ways. 6 00:00:40,080 --> 00:00:48,450 Divide Akiva to create a striking stance, declaring and initializing a strike instance, using a strike, 7 00:00:48,450 --> 00:00:57,690 literally declaring and initializing a strike instance, using named fields, declaring an initializing 8 00:00:57,700 --> 00:01:04,950 airstrike instance on initialise fields are set to their corresponding zero value Astrud instantiation 9 00:01:04,950 --> 00:01:10,910 using nuclear war and strike instantiation using Palminteri axis operator. 10 00:01:12,060 --> 00:01:18,300 Now go to Vasco to illustrate how to create instances of strike types. 11 00:01:21,260 --> 00:01:25,820 First, they divide keyboard to create a destruct instance. 12 00:01:28,220 --> 00:01:33,320 First, we create this right type like address time. 13 00:01:34,910 --> 00:01:37,330 I address this. 14 00:01:39,930 --> 00:01:45,300 And said that feels like it's the type of it is a strange. 15 00:01:48,530 --> 00:01:54,890 Cty Typekit estranged and zip code. 16 00:01:57,050 --> 00:02:03,800 Too tight, is it before the quote and save the policy, we define and address this. 17 00:02:05,210 --> 00:02:14,450 Now go to the main function and create instance from the address is struck first by that keyword, that 18 00:02:15,530 --> 00:02:20,150 name like a name of a strong address. 19 00:02:21,510 --> 00:02:29,250 First, we declare the variable of this time, and all this fields are initialized with have zero value 20 00:02:29,940 --> 00:02:42,570 now displayed this struct, for example, FP a reform that they call safe deposit and execute the code 21 00:02:42,660 --> 00:02:45,660 first go to the project folder. 22 00:02:48,940 --> 00:02:50,200 And it's wrong that. 23 00:02:51,150 --> 00:02:51,810 Is wrong 24 00:02:54,750 --> 00:03:01,440 now we can see the output we create is strong and display it because we don't initialize it, doesn't 25 00:03:01,440 --> 00:03:03,090 have any values. 26 00:03:03,540 --> 00:03:10,980 Go to the next deep learning and initializing estranged instance using astronaut literally. 27 00:03:12,510 --> 00:03:15,240 Go to the code, remove the previous cold, 28 00:03:19,500 --> 00:03:29,970 for the example, create this strong variable like a form a long he equals name, office type, address 29 00:03:31,080 --> 00:03:42,390 shall broadcast and initialize the value, for example, for the state city Texas and full city city 30 00:03:42,390 --> 00:03:43,560 dollars value. 31 00:03:44,850 --> 00:03:49,740 And for the zip code, we set one two three four five. 32 00:03:49,950 --> 00:03:54,900 Go to the next line and display this one by the following code fifty. 33 00:03:56,390 --> 00:04:06,360 It's this warm caller, and they want reform, they quote, save the project and execution. 34 00:04:07,110 --> 00:04:07,680 They call. 35 00:04:09,960 --> 00:04:11,760 Now we can see the output. 36 00:04:11,790 --> 00:04:19,890 We could define and initialize its fields by using a strong laser to go to the next way, declaring 37 00:04:19,890 --> 00:04:28,380 and initializing a strike instance using naming fields first clear the Lasko, for the example, create 38 00:04:28,380 --> 00:04:37,890 a strong variable like a two a two crawling equals address, clearly. 39 00:04:39,540 --> 00:04:47,400 Now sit name or field and assign value to it like a state like California. 40 00:04:52,700 --> 00:04:55,870 And said full name city 41 00:04:59,690 --> 00:05:05,450 and city value, follow the example the San Diego. 42 00:05:07,080 --> 00:05:19,410 And zip code sits value six seven, eight nine zero and go to the next line and display this right by 43 00:05:19,410 --> 00:05:34,260 the following pool the address to column A to reformat article, save the project and execute the program. 44 00:05:36,980 --> 00:05:39,110 Now we can see the output. 45 00:05:39,470 --> 00:05:43,430 We could initialize a strike instance by field name. 46 00:05:43,970 --> 00:05:45,380 Go to the next we. 47 00:05:46,460 --> 00:05:52,880 Declaring an initializing a striking instance on initialise views are set to their corresponding zero 48 00:05:52,880 --> 00:06:00,800 value, for the example, create a striped variable like a tree and initialize its clear Lasko. 49 00:06:01,280 --> 00:06:16,010 A tree calling equals Atreus and set estate and value takes us to the next line and display this drive 50 00:06:16,190 --> 00:06:17,450 by this code. 51 00:06:17,510 --> 00:06:30,110 AFP and address three colour and a tree before reformatted could save the project and execute the program. 52 00:06:32,200 --> 00:06:38,490 Now we can see the output because we don't initialize any value for the other fields of addresses, 53 00:06:38,490 --> 00:06:43,450 strong zero value assigned to then now go to the next. 54 00:06:44,200 --> 00:06:52,780 That's right, instantiation using new you want an instance of estrogen can also be created with the 55 00:06:52,780 --> 00:06:53,710 new keyboard. 56 00:06:54,550 --> 00:06:58,360 It's been possible to assign data values to the data fields. 57 00:06:58,360 --> 00:07:07,600 Using dot notation creates struct variable like A4 by new keyboard and past name of as strong as typed. 58 00:07:08,380 --> 00:07:10,180 First clear the last code. 59 00:07:11,650 --> 00:07:19,810 A four column equals new and set the name of a address. 60 00:07:20,380 --> 00:07:27,520 Now, for assigned values to its right field, we can access to them by dot notation, first right name 61 00:07:27,520 --> 00:07:32,620 of business A4 and then set dots and access to its right fields. 62 00:07:32,920 --> 00:07:42,130 For example, a four dots state and then initialize the field by equals two equals. 63 00:07:42,790 --> 00:07:46,200 For the example, illinois's you're 64 00:07:49,870 --> 00:07:50,680 a fool. 65 00:07:50,980 --> 00:07:55,510 Broad City equals Chicago. 66 00:07:58,250 --> 00:07:59,660 You go to the next line. 67 00:08:00,080 --> 00:08:07,820 A full zip code equals, for the example, two four, six eight and. 68 00:08:08,970 --> 00:08:20,250 Go to the next line and display to create a strong variable by the following code FP address four columns 69 00:08:21,660 --> 00:08:24,110 a four g format. 70 00:08:24,210 --> 00:08:27,630 The Code save the project and execute the program. 71 00:08:29,100 --> 00:08:31,200 Now we can see the output. 72 00:08:31,650 --> 00:08:38,370 We could define this right instance by new keyboard and initialize its trunk built by dot notation. 73 00:08:38,910 --> 00:08:47,460 Go to the next three struct instantiation using -- transmis operator creates an instance of airstrikes 74 00:08:47,640 --> 00:08:54,360 by using a pointer answers operator is denote the by ampersand symbol first to the last call. 75 00:08:59,210 --> 00:09:08,480 And create a variable like a fine that a fine equals and for some. 76 00:09:09,940 --> 00:09:16,000 Name of this address now set this site filled by notation. 77 00:09:16,210 --> 00:09:17,440 Go to the next line. 78 00:09:17,860 --> 00:09:24,220 A five dots state equals, for the example, New York 79 00:09:26,920 --> 00:09:29,170 go to the next line a five. 80 00:09:29,170 --> 00:09:38,890 That city equals New York City and set the zip code. 81 00:09:39,250 --> 00:09:46,420 They find that ZIP code equals one three five seven nine. 82 00:09:46,450 --> 00:09:49,390 Go to the next line and display this striking instance. 83 00:09:49,390 --> 00:09:55,940 Created FP Address five column. 84 00:09:56,710 --> 00:10:04,000 Sit right here that a fine reformat the code, saved the project and executed the program. 85 00:10:06,220 --> 00:10:07,780 We can see the output. 86 00:10:07,810 --> 00:10:11,950 We could define an historic instance by using a point, an address. 87 00:10:13,120 --> 00:10:13,970 Indecision. 88 00:10:13,990 --> 00:10:21,670 We could create instances of this, sometimes in several ways in order not to prolong the time of decision. 89 00:10:21,850 --> 00:10:25,840 We will finish it and we will continue the content in the next session. 90 00:10:26,080 --> 00:10:26,490 Goodbye.