 So I'm going to give you guys a little bit of an exercise. Here is the mathematical formula for calculating out the area of a pentagon. Simple enough, I have five sides. So apply a square times 1 divided by 4, square root of 5, 5 plus 2 times square root of 5. All right. Well, we're luckily not a math class. And that's actually the beautiful thing about programming is we don't technically need to know the math. Now, don't get me wrong, that's we need to know the math. I'm going to just write that down there, right there, because we do, in fact, need to know the math. But one of the things that we can do is we can actually start to tackle this problem a little easier. Since we know the mathematical equation to it and we know how to get a variable, this problem doesn't seem too daunting. One of the things we can do, especially in programming, is we can start to, what I like to do is break it down into smaller chunks. And the reason why is because right now it does look daunting. I can't do this off the top of my head. Even if I set x equals 5, it looks confusing in my opinion. But what I can do is I can start to take the smaller mathematical equations, such as, say, this guy, and then maybe this guy, and then maybe this guy. And that starts to allow me to tackle it a little easier. So that first one, that first portion, I'll keep it going with blue. First thing I see here is 2 times the square root of 5. So how do I tackle this? Well, again, the first thing I'm going to probably want to do is create some kind of variable. So we'll call this double. And for my sake, I'll call it inner 1. Inner 1. Now, we say 2 times the square root of 5. Well, 2 times. That's easy. That's simply 2 asterisk. But how do I do this square root of 5? How do I do that? We just talked about the math class. And one of the other luxuries of the math class is just like I said, someone figured out how to do these math equations a long time ago. So they built them for us. And we appreciate them for that. We have one for calculating out the square root SQRT. And so exactly what that looks like happens. 2 times the square root of 5. That's now being stored inside of this double called inner 1. So now we go and we tackle the second portion. This is actually not that daunting, because what we can do now is we can use the fact that we broke this down into a smaller math equation to kind of make this actually really easy. We can actually kind of break it down into another double. I'm going to call this one inner 2. And as you can kind of guess, it would be 5 plus. Instead of doing the math, we can replace that math with inner 1. And as you can see, boom, we get that broken down a little easier. So we keep on going. Now we look at this and we go, oh, well, what's that next step? Now just to kind of breeze through it a little bit, I'm going to include the square root in this one, just so we can get a little confused. Not confused, but a little further. We can go double. And I'm going to call this SQRT. And I do that on purpose. It's one to show you that this square root and this square root are not the same. They are not the same. So what we can do here is, as you can see, we can say math.sqrt, and we have a giant parentheses. Again, just like I say in programming, you should focus on putting in your parentheses. It's getting set up before you try to do your stuff. So now what do I put inside here? Well, again, I still see a 5. I got to do another 5 asterisk and this green section. Well, luckily, guess what we've already done with the green section, this thing right here. We just put it in here, inner 2. So we've now tackled out at least the smallest portion or the big chunk of this equation. So give me just one second, speed ahead if you would like, because we have to continue tackling out this problem. I've got square root lined up, but I just want to move us down a bit. So we're right about here now. So what can we do now? Well, one of the things that we can do is we now can tackle out the rest of the equation. So we can look at this and go, all right, well, the rest of the equation is, and I'm going to even call it a, since we call it a right there, we go double a equals 1.0. Let me fix that for us. 1.0 divided by 4.0. Remember, that's because we're doing, if we don't do this, we have integer division going on, and that becomes a 0. I don't want that. I want this. So that's going to give me that 0.25 asterisk. Look what we've already made right here. sqrt times asterisk math.pow a, 2. Now, I know I didn't talk about math.pow, but it's another method that's been pre-built for us. This math.pow method, as you can probably guess, raises whatever we say to whatever power we say. So if I wanted to be raised to the power of 3, I can, or the 4, whatever I want it to be. Our sake, because of what we have in our equation, our algorithm says squared, we raise it to the power of 2. And so now, I don't care what a is. I don't care what the mathematical answer is. I've extracted it out into it's just its algorithm. So let's take a look at this in practice. We start, again, at the very beginning. And so one of the things I'm just going to do is I'm going to go ahead and just say a, lower a, the side a, equals, and we'll just say 5. Simple enough. Now, the next thing we said was we went in and we made an inner 1. Inner 1 was the blue section. And as you can see, 2 math.sqrt5, because the algorithm, again, were right here. So I boom. So now, once I've made that, I said that we can make now an inner 2 double inner 2. That takes that inner 1 and adds 5 to inner 1. We then said that I made a double sqrt. I called it sqrt, not because we're using math. Well, because it's the square root portion of our algorithm. However, it has no faculty. It has no connection to the fact that we are using math.sqrt. These are two separate things entirely. 5 times inner 2. Inner 2. Now that I did that, now that I've got that squared away, what I can come in here and do is now do the rest of the mathematical equation for myself. So double a. Remember, Java is case sensitive. So lower case a equals 5. Double of a Java a, capital A, is going to equal 1.0 divided by 4.0 times sqrt, the sqrt we just created right here, times math.pow, the lower case a, the lower case a, raised to the power of 2. And so let's just take a look at this in action, system.out.frontline, the area of a pentagon with sides equal to, I just want to make sure everyone can see what we're doing here, with sides equal to plus lower case a, is capital A, capital A. If you want, take this, copy and paste. Well, type it out on your own Notepad Plus Plus, your own text editor. See how it looks. I can see you guys are getting a little cut off here. So here we are, view word wrap. There we go. That's what I was looking for. So you guys should be able to see all of this now. So let's, again, put this into practice. Now that I've built this out, like always, what do we do? We compile it up, test.java. We see an error. What do we have to do? Well, if we follow that error, notice where it's talking, sqrt8. I forgot to put it. I didn't hold the shift down hard enough when I was typing this out, so I have to fix that. I compile it again. And now we fire off the test. And the area of a pentagon with sides equal to 5.0 is 43.019, yeah, big number. So there we have it, the area of a pentagon in program.