But mostly, there's a lot of new things in unit five. Really, these have to deal with the fact that we're going to have to manage way more of the details around our classes and objects and methods than we did in block-base languages where most of that was handled for us. So of all of the pages in unit five, they're all important, that's absolutely true, but there are some that I would say are our bread and butter when we're talking about writing classes, designing classes, implementing classes, and that is going to be a big part of the free response portion of the exam. Since we'll need to be able to not only do that but also then a lot of times is solving their other problems that they have or they'll still be involved in reading classes. So knowing how to write classes and being able to read them and the detail we're going to learn in this unit is really critical. So let's talk about the different pages. The first page is really an overview and it's going to talk about the anatomy of a class, and really there's three parts we want to point out. One is there's methods like verse that we wrote that we will create. They're not really methods although it's pretty much okay. The kids call them methods but they're called constructors. These are special series of instructions that look a lot like a method that allows us to say actually go and make my object in memories, make memory in the computer to save the information I need about this particular object of a class that I'm going write and maybe it person class. Then the last thing is that there's data that we know about an object and this actually does have a similar thing in Scratch or Snap but we hardly ever looked at it and that's like if you go and click on the sprite and you can see various pieces of information about it maybe how big it is, what its name is, its current location, what direction it's facing, all that stuff. In 5.2, we're going to go into details starting off in constructing. So the very first thing you need to be able to do, you make an object of the classes you have to construct it and we've done that before with new, remember that? But now we're going to actually write the code that causes that to happen when you call new person. They'll get executed. Soon have that shown here but the goal of all constructors, really important. The goal of all constructors is to initialize object instance variables, and so that's all the data that we'd have about one. The thing is, it's unlike initializing a particular like int x equal 10, there's a lot of things. There can be more than one thing that needs to be initialized for an object because they're more complicated. This person, for example, you can see at the top has three things that we keep track about them, their name, their email, and their phone number and then when I construct that, I want to be able to initialize all of them potentially, that's it. This isn't going to bring up some vocabulary confusion. So variable is a word that we've used a lot, and variables, if you recall have two different types, they can either be declared type primitive which we know are all the lowercase things like int, double, boolean or they can be a class type like string capital S or person capital P. Now, might've been able to class over before but object whenever we declare a variable of class that we often call it an object. What is that? Well, object is a special type of variable. All variables are not objects, but all objects could also be called a variable. It's just a more specific terms, so the appropriate Venn diagram was this. So we declare lots of things that can be variables but sometimes we tend to call this variables objects when there of class type to be more specific. 5.3 is documentation with comments. This is a very fairly lightweight chapter or page but it's really important. We've done comments before in block-based languages. That's where you can right-click and say leave a comment. We tend to leave it for the entire method but you could have it on any individual instruction. In Java, we have three kinds of comments that students normally need to know for the AP exam. The first two are really what we're going to do 98 percent of the time especially in this class and the only reason they're different here is because of the fact we're now in a textual language. If you have a comment, that is just going to be on a single line in the file then that's it, otherwise, you would have a multi-line comment. Now, there's one other thing that is covered in this chapter which will be important when we start working with kids during their free-response questions. They won't have to write these pre and post-conditions but they're going to need to read them and that'll help them in doing their free-response questions. So what are preconditions and post conditions? They are things that are attached to a particular method and basically preconditions are about the assumptions that you can make when you're writing the method that certain things will be true like maybe you want to write a method and you want to about the person class and you want to assume that the age, that they try to enter is going to be a positive thing because age of a person shouldn't be negative. Post-conditions are about the things that when a person calls this method, you will guarantee them at the end that this is true. So that could be that you won't let age to be negative or it could be that all sorts of things, that the PID starts with the letter A, student's ID number starts with the letter A, etc. So there'll be more about this but that's the basics. Is there are just going to be assumptions and guarantees and that we're generally going to be an AP land, things that we read so that will help us with our free-response questions. Accessor and mutator methods. We're back into the bread and butter. Basically, accessor and mutator methods are given special names because they're all about the instance variables. So remember instance variables of the data that we know about a particular class. So for a person, we have name, email, phone number. What they do both is they protect the way we access that data and the way we can change that data. Accessors are also called Getter Methods and they give you the value back of one of the instance variables. So give me the name usually called getName or getEmail or getphoneNumber. That's why they're called Getter Methods, but actually there's also is a formal word for them. Mutators are the ones that we use for changing the values in those variables and they're usually called set like setName, setEmail, setphoneNumber and one of the reasons we're going to need to have this is to allow us to enforce some of those post-conditions, for example, that maybe the phone number is going to be in the right format. In the US would be three plus three plus four digits. The other reason that this matters and we'll get into details. One of the things that Java classes provide us is this ability to encapsulate data about a particular object all into one place and to manage the access and changing of it. The rest of the pages in this unit are really about details. It wouldn't make a whole lot of sense to go into them right now, so I'll save that for later. Except that actually there's a really cool one at the very end, 5.10 is on ethical and social implications of computing systems. Now, what is covered on this particular page in CS awesome is just an example of something that you can have students to learn about ethical and social implications of computing is not the required topic but this is a really hot one right now that a lot of kids are interested in, artificial intelligence and machine learning and in particular this great video here about a person that, I believe at MIT, I could be wrong who studied bias in machine learning algorithms and particularly if you weren't aware facial recognition algorithms don't work on non-white faces or really haven't worked but I think right now actually as of winter 2019, I think they still don't pretty much.