We have again, not just a free response question, but we have that first and the students will be asked to go head and solve it. But then after that, there are three sample student solutions. These are in fact provided by the placement with the scoring rubric to help people understand how their scoring things. But here in CS Awesome, on each of those pages, we're going to be showing the students the rubric, showing students the sample student code, and asking them a series of questions and asking them, did they get each point? We hope that by being able to know what those rubrics are asking for, students can see that they can get partial credit for all sorts of things, even if they feel like they can't do the whole thing. The other thing to notice about this, and this may have changed by the time you see this because I'm hoping to work on it, this is one of the older style questions. It was an interface question. Interfaces are no longer covered on APCSA. Let me say that again. No interfaces on APCSA. However, this one can easily just be done as a subclass question. We might also be rewriting that as well. What is the question? I'm going to pull out just some parts from CS Awesome, not the entire description, to give you a high-level field. The idea previously wasn't interface menu item. Think of that. That's going to be our superclass. We're going to have these sub classes that could extend sandwich, salad, drink, and then a trio. Let me just say the trio idea is that if you buy sandwiches, salad and drink together, the trio would keep one of each of those instance variables, and that the price of the trio is the price of the two most expensive items though you get the cheapest item for free, essentially. So the one thing to know about the interface was just, that's the way it is. But in the future if this was a subclass problem, I would have to tell you this, that each of our subclasses is going to need a getName and a getPrice. Now one of the things that I hate about this is that again, well, I'm just looking at a part of it and already I'm wondering like what do I have to do? Do I need to make sandwich class, the salad class, the drink class, the trio? I'm going to have to make the trio class. But then I'm going to tell me that for a really long time. In fact, this spread over three pages, is what the actual advanced placement free-response looked like. Lots of reading, lots and lots and lots of reading before we get around to what it is that we want to do, which is they are in the middle of the second page on the right. Write the trio class that implements blah, blah, blah. So teach your kids definitely to go forward and find that ask, so that they can have that in mind and know what to pay more attention to or less attention to in all of the other content. Now that said, that's in the old-style format. This is not the same problem at all. This is the one we did step tracker away back in, I think Unit five. This is the new format that they're going to have. Significantly less wording. I hope they can manage to keep that to a minimum. But there's a basic description at the top, and then there's a table that should show every method that you need to write. You might not need to write all of them. But if you need to write a method, it's going to be shown in that table. Secondly, shows in detail how those work. If you remember back in Unit five, I'm telling students that go through that table and have a trace table to the side and all that thing. Might even actually go and change, and try to write that old question in this new format and get that up on CS Awesome, you could watch for it. I'm hoping that's something that we can do. Not that we know for certain exactly what their format is going to be, but has it that the table is definitely a thing. If you remember back to Unit five, I said, when there's so much texts going on, even in the new format, there's so many things there and they don't tell you exactly what you need. They just say write the trio method. It's really important that students go in and look and figure out what methods they need. I think this is going to be easier in the future because of that table. Basically you would tell students that you need to write every method on this table, that's done somewhere on the table. In this particular case, I'll preview for you that we need to write a constructor with three parameters, a method called getName and a method called getPrice. Did they tell us that we needed these instance variables? Maybe they didn't. We have to figure them out. But that basically a trio, again, is made up of sandwiches, salad and a drink. So those are my three instance variables. By the way, that's not the only way we can choose to implement this. There is an alternate that is listed in the teacher solution for this. You could, in fact, go ahead and cram all those. Let me encourage you to look at it if you're interested. It only requires two instance variables, but this is by far the most popular one. So remember my design table? The thing is, there's so much texts. We don't want students get lost. We want them to understand which instance variables need to get touched in every method. In this case, it's simple. I went and I added this highlighting. But of all that text, I was like, where's it? Where is it? Tell me. The price of the trio is the sum of the two highest menu items on the trio. So I know that I'm going to need to write a getPrice method and it's going to need to access all three of my items because they each have a price, and I'm going to have a getName one. If name of the trio consists of the names of these separated by a slash and then by the word trio. Down there in that, cheese in red, cheeseburger, spinach salad and orange soda trio. Trio at the end. That's buried in there, there's an example, but it turns out that's really easy thing for students to forget. They get so focused on the three parts. They forget the trio at the end. That's going to be our getName. So if I'm not going to work through filling in the table line by line. But basically they said these are the only three I need to write. So my instance variables, sandwich, salad, and the drink are only going to be mutated or set in the constructor. Then all of these things, getName, it needs the sandwich, the salad, and the drink because it has the name of it, and getPrice, it also needs to access the sandwiches, the salad and the drink because each of those things has a name and a price. So I'm going to need to use those instance variables, all three of them in both methods. This table is useful, I think, because it allows me as a student to make sure that I didn't forget to write some part of the method once I got busy writing it if I do the planning upfront. Your mileage may vary. Let me know if your students find this interesting or helpful and they probably don't find it interesting. By they definitely, maybe they'll find it helpful. Here's some screenshots of the solution that is provided. It's out there, again, provided by the college board. The idea that there would be three instance variables, which obviously I didn't look at this before I wrote mine because they call it sandwich, salad and drink with lowercase. To me, like that's just a great way to confuse students. So that's why I called mine if you remember, the sandwich, the salad, and the drink. Anyway, that's by the way. We've got our constructor, which takes three values and implements, sorry, and sets, mutates, sorry, sets each of our instance variables. Let me go back up to the top and notice that we actually have to say trio implements menu item and that are instance variables need to be private. Can't forget to write private. It's horrible such an easy point. Our name one, that's this funky concatenating a bunch of words together. Don't forget the word trio at the end, our getName. I'm going to apologize. That's in there twice. Let's look at getPrice. getPrice is the only one that's really got any logic in it. Basically you wouldn't actually even have to declare three local variables. You could just use get sandwiched getPrice everywhere. But there's an if statement and there's three parts to it. If the sandwich price is is the cheapest. So sandwich price is less than or equal to salad price and sandwich price is less than equal to drink price. Then we want to choose salad and drink, add those together, and that's because sandwich was the cheapest. You'll see there's this if else if else. I'll point out here, these guys used an else because it is mutually exclusive. It's either the sandwich was smallest or in the else if, if salad was the smallest. If neither of those, then we know that drink must be the smallest. That said, if students do all three checks, they don't actually get any points off. That works correctly. They're not checking for most efficient or best design, because you can say we're best designers. Although this one isn't too hard to argue, but there you are. So at the bottom of the first page, students are asked to declare the trio class. Now that said, already given are comments that hint in some cases at things that the students might not get writing a constructor. I think they told them they needed a three-parameter constructor, but writing getName and what it should return. They put that right there, so that the students themselves wouldn't need to be looking back at the description. So this is a little bit of a scaffolded behavior. So maybe if you wanted your students have to try to do this before you scroll down here, have them write what would be the comments. What things are you going to write? What's the name of the method? What's its return type is going to be, and what basically does it do?