ANONYMOUS wrote:
> 1. For StudentStats.java
>
> The relevant test mentions:
>
> // Can be done in 3 calls, but allow some leeway
> stats.assertLessThanEqual(list.getCountGetPage(), 5, "too many calls to getPage()");
>
> And they use this given id list: "20948760", "20948758", "20948756", "20948755", "20948754", "20948751"
>
> We receive a MockStudentList list of PAGE_SIZE: 4 | NUM_PAGES 12 | NUM_STUDENTS: 45
>
> The specifications don't seem to mention returning the 6 newest id's
>
>
> So how it is possible to Only make 3 calls to getPage() when returning an iterator of 45 Items? (I'm doing it in 12)
Note that the test does not consume the iterator until exhaustion. It only consumes the first six elements.
To quote the project specification: "The iterator should not simply load the entire list and then iterate over it, as if we need to access only a prefix or suffix of the list, this would be extremely inefficient."
> 2. Do we assume all given students took the given unit?
The specification also says "You are advised to read the documentation comments for the interfaces in [the studentapi] package carefully." This documentation has the information you need.