In this project, you will write code to help shopper choose the correct line to get in when checking out at the supermarket.!
Part 0, 0 points:
Create a new file in a folder as described by the submission instructions below.
Part 1, 0 points:
Download the following files which your code will use. You should not modify these files. You do not need to submit them as part of your code (but if you do, it's no big deal, I'll just ignore them). Part 2, 0 points:
Create a new class, CheckoutCoordinator
. With that class, you'll need:- A constructor (NewCheckoutCoordinator) that takes a CheckoutLines object as a parameter.
- An AddCustomer method that takes a Customer object and puts it in one of the lines in the CheckoutLines object that was passed in during the constructor.
Part 3, 100 points:
I will test your code with my tester file. (I reserve the right to update this file if I find errors.) You can run those with your file like this: $ go run baseClasses.go project11.go goCodeTester.go
That will base your score on two "fairness" factors:- The ratio of the minimum amount of grocery values scanned in one of the lines to the maximum amount.
- The ratio of the average idle time of the register at the end of the line to the maximum idle time.
You want both of those as close to 1 as possible. I measure them in multiple tests to determine your score. Submitting your Project: Put all your code in one file named project11.go
in a folder named <TeamName>Project11, where <TeamName> has all team members' (last) names separated by 'And' in PascalCase. For example, if I had worked with Eve Stock, my folder name would be BurkeAndStockProject11. The code file should be located directly in that folder. Since Go is a compiled language, if you want me to grade it before you're done, add stub functions for all the unfinished parts so it can compile with my testing code. Make sure your file does not have a main
function! Zip the folder up (don't change the name of the zipped file) and upload the zip file to the assignment in Canvas.