16:53:37 Hey, welcome back. So today we're gonna be programming what we flowchart last time. So just to recap on how we're gonna do this is we're gonna start. 16:53:52 We're gonna import our libraries, declare our variables. Write the program and then we're going to stop. 16:54:00 So then. We start in port scanner. We declare our variables. And this is the program. 16:54:13 And then we stopped. Alright, so now. Working write this in code. So I already have a skeleton. 16:54:25 Of the flow chart. 16:54:28 So when we import our labor, we import libraries on the top, top of class. So here's our Java, Util scanner. 16:54:39 This is where we start our program. And this is where we initialize. Our variables. The first one I want to initialize is our how we're gonna Yeah, user input, right? 16:54:56 Let's do scanner. 16:54:59 System. Okay. So now we have a scanner and KVT is gonna. Allow us to. 16:55:11 Okay. Spelling in grammar. Any of that? 16:55:21 Okay. So now we're gonna have our scanner KVD is gonna allow us to read whatever the user inputs on the keyboard, right? 16:55:36 We named our scanner, right, import name scanner. And then we declare our variables, right? 16:55:44 So scanners of variable. What's an object? But yes. 16:55:52 Just go here. 16:55:55 So then we had. Some of our variables were user input. So string, right, string. UI for shorter and it's gonna be an empty string. 16:56:11 And length of name. Just now call this length. 16:56:19 Okay. We don't use bullion as in first half so we're gonna not use it this time. 16:56:27 And, P. So now we have string, user input, the length and. So these are all the variables. 16:56:41 Be using, so now we start our program. So now we move on here, right? 16:56:49 So the first thing we ask is what is your name, right? So we'll do a system. 16:56:57 What is your name? Should mark and close parentheses to my code 16:57:08 So whatever the user inputs in this line. We need to save it in user input. You I equals. 16:57:18 We're gonna use our keyboard object, our scanner object. KBD. We're gonna say the next line. 16:57:26 So whatever the user types in the line, we're gonna record it in user input. 16:57:33 And now this is a process box. So we're gonna set the length. To the user input length. 16:57:42 String method. So it's going to be length equals UI dot. Length. And since UI is a string method, we're gonna use this. 16:57:56 It's a string we're gonna use the string method. So now we do this system off print statement and we're gonna say pick a number from 0. 16:58:04 Minus the length of from 0 to the length of your name minus one. So we're gonna do system dot out, print line. 16:58:15 Pick a number. 16:58:19 From 0 to 16:58:23 . Sign Thanks minus one. 16:58:30 So sign and I want my little period right there and send my So. We go to this one. The store so we're gonna store whatever value they pick. 16:58:47 We're gonna store it in so we're gonna say. And our keyboard. Object next integer. 16:58:56 Alright, so now we Go to this if statement. So our if statement has true or false. And to make it more visually appealing I'm gonna create a else statement for this. 16:59:10 So we're gonna say if. Whatever condition goes in here inside the parentheses. So we still gonna figure this one out. 16:59:19 We're gonna have to keep this line of code, right? Whatever is within the. Currently, right? 16:59:25 So this is our true. 16:59:28 What else? We're gonna execute whatever is inside. These parentheses. And this is our. 16:59:39 . Falls Okay, so our true branch. You say we're gonna say system upprint letters in the second half. 16:59:50 So, system, dot, dot, print line. And we're gonna get a little bit, 16:59:59 Now we're gonna do this and we're gonna do plus sign here and we're gonna say Use your input dot character. 17:00:10 At and so whatever index they picked. Is. 17:00:18 And the second step, right? 17:00:23 Okay. 17:00:29 Okay. Okay, The same line is just, will look over it right now. So this is our true, Our false statement, we're gonna say the same thing, but. 17:00:45 It's in the first half, right? So we could just copy paste this. 17:00:53 Tasted. They came out a little bit. Good. Is in the first half. 17:01:06 So it's the same statement, just first half second half. And then if we follow our flowchart, we stop. 17:01:16 And here's our stop. 17:01:21 So now if we wanna look at the whole code. We are. 17:01:29 You know, we impart our library, we start. We create our scanner object. We initialize our variables and then we run our program. 17:01:42 And then we stop, right? And then within our program, we're gonna ask, what is your name? 17:01:47 We're gonna start that input in user input. 17:01:52 We're gonna get the length of the name. We're gonna ask pick a number from 0 to the length of their name minus one. 17:02:01 And then we're gonna get that input and save it into N, right? With this. 17:02:07 Oh, and we forgot our if condition. So our if condition was. Okay. User. 17:02:19 User input character at. And whatever going next week at is greater than. The character M because M is the 13 character of the alphabet. 17:02:36 And anything above that. Is in the second. But in the case of it's M. Then it would be in the first half. 17:02:50 So now we're gonna save this file. So hit save. Working a use our terminal here, so let's see. 17:03:00 And okay. So we see our flowchart, which is here in our desktop. Now we're gonna compile it. 17:03:10 Java C. Slow chart. Gotcha. So. 17:03:19 Compiled because we have our little Java. File that class file here. 17:03:28 So now we go Java. So chart. And it is case sensitive, so you do need the capital F. 17:03:39 And then we execute our product. So we're gonna use the same name we use for the flow chart, so Edwin. 17:03:49 And we pick number 2, right? So the letter W, which is. 0 is 0, T is one, W. 17:04:01 In the second half of the alphabet. So if we want to run this program again. We have 2. 17:04:09 Run it again because there's no loops. So we're gonna put Teddy. 17:04:17 Hey, a number so we're gonna pick index number One. Right. 17:04:24 The letter E is in the first half. The awful bit So that's pretty much how you go from flowchart. 17:04:34 To program. And a little bit of terminal command. Action down here. So. 17:04:44 Thank you for watching.