So this lecture is really, an opportunity for us to walk through the big ideas, that you should have learned over the course of this Coursera course, to make sure, you've got the big concepts before you take the final exam. So these are not in-lecture quizzes, because these are serious. They're not intended to just be funny, well, as I've said before like I think is funny. So, really these are questions for you to reflect on, how well you think you understand a set of topics that I'm going to provide to you over the course of this Powerpoint show. So, for all of these questions, you should think about on a scale of none to excellent, how well you understand that particular topic. For example, for this first one, do you understand the difference between what variables and fields are, for and what methods are for? So this comes back to the core idea, behind object oriented programming. Where we store data, state information in fields and then we provide behavior, from classes by implementing methods for those classes. So that's sort of the core idea here, the difference between the data and the behavior and remember encapsulation, puts both the data and the behavior, into a single thing, a capsule, the class that you can then use. Understanding that we need to declare and initialize variables before we use them. We've been doing this all along, right, we declare variables, to reserve that space in memory and we provide a data type so that the compiler knows, how much space to set aside and what operations will be valid, on those particular variables. And we need to initialize them certainly, give them a value, before we use them, whether that means assign zero to a score that the player's going to have, or create a new object for a texture to defield, for example. But we need to somehow, initialize the value of that variable, before we actually try to use it. So here's a core idea behind the type system in C#. We have value types, that we talked about very early on, way back in Module 3. And those are the predefined types in general, don't include string, but the predefined types in general, that for the space and memory, that's reserved for that variable, it holds the value of that variable. As opposed to, reference types, that hold a reference to an object somewhere else in memory. Such that the value of a reference type variable, is not the actual object, it's a reference to the object. And if you want to think of that as the memory address of the object, that's fine because that's close enough, for this particular course. Another core idea behind object oriented, the object oriented paradigm, is the different between the class and the object. So as we know, because we've been using classes and objects since module four. As we know the class is the template, that expresses what data will be stored in a particular object, that is instantiated for that class and the behaviors are the methods that an object of that class, exposes. So the class is the template or the cookie cutter, and the objects are the things we produce, the cookies. So how to implement and call methods? Is again, you, I mean, our very first C# program, you were calling the console right line method. So calling methods, we understand that if it's an instance method, which is sort of what we use most commonly, we have the name of an object, variable, a reference type variable, dot and the method name, and then between parentheses we provide whatever arguments are required. For those less common but still used a lot methods, static methods, we put the console, sorry the console [LAUGH] we put the class name, followed by the dot, followed by the method name, followed by, between parenthesis, whatever arguments we need to provide. So that's calling the different kinds of methods and we also know, that methods can return either void, or something like a card, when we we're taking the top card from a deck. And so, in most cases, we're going to want to store that information that gets returned somehow, even if we directly pass it, as an argument to a new method. So for example in the blackjack game, where you would call the add card method on the blackjack hand object, and one of your arguments could be deck dot take top card. That means we weren't throwing away the card, that got returned from that method, we were just passing it along. And so when we call methods that return something other than void, we have a decision to make, about whether or not to store or use that information that gets returned, and usually the answer is yes. Implementing methods is something that we did in module 11, when we implemented the role method for the dice class, and when we implemented the draw and update methods for our rubber chicken class. So how do we use these predefined types that are available to us in C#? Well, we've been doing this for a long time, right? So these are the value types, I guess that's a little strong, right? So let's say, the predefined types in C# in the XNA framework, because you should also understand how to use a texture 2d, for example, or a rectangle, or a vector 2. So those are predefined, in terms of the framework in which we been working, even if they're not predefined by the C# programming language. So you should understand how you declare variables of these types, if they happen to have operations like rectangles do methods, you should be able to use those methods as well. We spent a little bit of time talking about string processing, and how we could use index of and substring, and we didn't actually use last index of, but that's commonly used as well. And you should make sure you remember, how you can use those string processing operations, to do interesting things, like extract the values from a comma separated value string, for example. We talked about selection, how our programs can make decisions, and how those decisions are either based on Boolean expressions, for if statements, or the value of a particular variable or an expression, for switch statements. And you should understand that, you should understand both that, those, statements are for making decisions and how you can actually use those statements, to make decisions. So remember, we have the sequence control structure, where we just do one thing after another. We have the selection control structure, where we can make decisions. And we have the iteration control structure, where we loop or iterate over the loop body, a certain number of times for four and for-each loops, or while some condition is true, for while loops. You should know how to do console input and output. Console output was console write line; console input was console read line. And remember, sometimes we will read in information from the user, that we need to convert to a different data type, and that's when we use things like, int dot parse or float dot parse, and so on. We talked about arrays, as a good way to store, a set of elements, that are all of the same data type. And so you should understand, how we declare arrays, how we use arrays, how we can use the index to access a particular element of an array. And, how we commonly use for loops and for each loops, to process in some way, each element of an array. Similarly, you should understand how collection classes work, and really, just the list class. I won't throw one of the other collection classes at you, on the final exam or anything, just the list class is fine. But understand, the key difference between arrays and lists, are that the lists can dynamically grow and shrink while arrays can't and other than that, they have very similar capabilities. We tend to use collection classes, most in our C# programs but because almost every modern programming language has arrays, we covered both of them. And even though I interspersed it throughout the course, we covered XNA as well. So you should understand the kinds of things we do in the XNA load content method, and how the update and draw methods relate to each other, in the context of the game loop. So we update and then draw, and update and then draw, and so on. And that you should only do appropriate things in the appropriate methods, you should never draw anything in the update method, you should never try to get the mouse state, while you're in the draw method, those kinds of things. We also added some functionality into the constructor, usually setting the window resolution for our game and occasionally, making the mouse visible as well. We also, early on, we just used draw rectangles to draw stuff, and then later, we started using source rectangles as well, so that we could use sprite strips to do things like, highlight or un-highlight a button or play an explosion animation, by moving the source rectangle across the sprite strip as appropriate. You should understand how to use both, draw and source rectangles, when you draw things in XNA. We also, at the very end of the course, we learn how we can also draw strings. So you should understand how we use a sprite font, to actually draw a string, and the fact that we call the draw string method, rather then the draw method, on a sprite batch object, to do it. And then we actually let the player interact with the game. So we learned how we could get mouse input, by capturing the current state of the mouse, calling the mouse, get state method, and then what we can do with the mouse. How we could process the buttons on the mouse or use the x and y to drag things around on the screen and so on. Even do things like highlight the quit button, when we were using the quit button too, because we could use the location of the mouse, to determine when it was over that button, for example, same thing with the required project, where you would highlight the number tiles when the mouse was over them. That was based on knowing, where the mouse was, relative to the draw rectangle for a particular number tile. So you should understand how we can do that input with a mouse. Similarly you should understand, how we did the gamepad input, it's okay if you don't have a 360 controller, I won't be asking any questions that would require you to have done sort of deep work with a 360 controller, but there's some general ideas about using a game pad particularly, versus a mouse that would apply. For example, we don't have, our gamepad is not a pointing device like the mouse, so we don't get an x and a y for anything related to the gamepad. So you should think about how we move things around with the gamepad, versus moving things around by making them follow the mouse. And of course, you know, there's lots of interesting things to do with gamepads as well, but like I said as long as you get the general ideas, you'll be in fine shape. And last but not least, we recently covered how use the keyboard. How you can get input from the keyboard, by getting the current state of the keyboard and some of the useful methods like Iskeydown, that we can use, to actually process that keyboard input. Now, this is an eight week course and we just blasted through all the big idea,s in a fairly short period of time here, but those are the core things that you should take out of the course. And you'll have access to the archived materials and everything for a long time to come. I'll talk about that in a different lecture, but you should understand those things that have been included. And if you do, if you've managed to say you know, dor e for most of your answers to these self-evaluation questions, then you probably will have no significant trouble with the final exam.