Resources
Edited Transcript
Hello, and welcome to the week 10 Announcements video for CC 410 in spring 2022. So this week next week, you’ll be working on milestone seven in the restaurant project, which is all about including external libraries and getting ready for complete release, we’re also going to be adding the GUI panels that we need to actually modify combos in our project.
So milestone seven, this is the biggest most complicated milestone in the class. Last milestone is a pretty close second, but this one, most students have reported that this is the most difficult milestone, it really comes down to two parts. The first part is adding all of the GUI to manage combos. It’s really meant to reuse your existing panels. And so if you look at the example project, it will show you quite a bit about how to use this in your code. Hopefully that makes sense. But make sure you think about how you can reuse your existing GUI panels, and just include things like a drop down to switch between the different items in the combo. The second part of this milestone is adding the checkout functionality. And so this actually uses an external library to represent a cash register, you can pay by cash or credit card, you’ll need to be able to make change if you pay by cash. And then the project should also use that library to print a receipt at the end of the transaction.
So some hints for this milestone, as I mentioned earlier, for the combo GUI, try and reuse your existing panels, you may have to change them a bit. For example, you may want to make the side panel so that it can instantiate without a side actually implemented. That way, you can choose none in that drop down and it will blank out that area of the combo. So you just have to think a little bit about the layers and the abstraction that you have to make your combo work. But again, look at the sample projects and how we build that combo GUI there. And it should make sense for how you can break that out into the full project itself. When you get to the making change part, making change is difficult. So think about it, you have to keep track of all of the different denominations of cash, and how you’re going to report that to the user and also how you have to interface that with the library. So make sure you think about that the making change, you do also have to deal with limited quantities in the drawer. But I’ll give you a big hint. Don’t worry about that at first assume the drawer has unlimited cash and get that working first, and then worry about the case where you run out of things like pennies, or nickels or something and how you would handle that by making change with other denominations. So get it working first, then try and work on that edge case, it’s not worth very many points. But it’s really important to have it for completeness. So think about it that way. Also, remember, for the receipt printer, it has a very limited length, you can only print 40 characters on line. So you’ll have to think about how you’re going to truncate or deal with that. You can use things like ASCII art to show a combo. Think about receipts you get in your daily life and how those are formatted. And that will give you some ideas there. I highly highly recommend using the adapter pattern with this library. So that would mean you will write a small wrapper class around the classes that are provided in the library. And then for your unit tests, you can do unit tests with your adapter library. So for example, for the making change process, you might have a method in your adapter class that takes in the denominations of cash from the user and the amount that the user needs to pay. And then it will compute the denominations that need to be given for change. And then you’ll have a separate method that will take in those denominations of change and the current contents of the of the actual cash register and make sure that they fit or make any adjustments to the change to be given to match the different denominations that are in the register. And then you’ll have another method that is not tested that actually implements the transaction itself. So think about how you can use the adapter pattern, especially when you need to write your unit tests. And the other big hint is the library that you’re using is completely open source. It’s something that I wrote and it has a complete suite of unit tests. So don’t be afraid to go through and read the unit tests that are included in that library, it might give you some ideas of ways that you can write your unit tests to work with the library itself.
So other than that after this week, and next week, when you get milestone seven turned in, we’re going to switch over to working with web interfaces, that is much much smaller milestones, there are about a third the size of the milestone that you’re working on this week, maybe even smaller. And the examples are much more directly applicable to the whole milestone. So the goal is those next few milestones are a lot smaller, which should give you a lot more time to work on your final project. So now is the time to rescheduling your third final project meeting and starting to really think about how you’re going to sit down and implement your final project, building the class libraries and the GUIs for it. So now’s the time to start thinking about that we’ve got about six weeks left in the in the class, so we need to get that done as soon as we can. So other than that, hopefully you have fun with this milestone this week. This is where everything comes together and you actually build a fully working GUI for the entire process of creating orders and combos and doing the checkout process and printing a receipt At this point you’ll have a fully working project and then we’re going to switch gears a little bit and do some web interfacing as well as always if you have any questions let me know otherwise good luck this week and I will talk to you again next week