It's UWAweek 26 (mid-year break)

help2005

This forum is provided to promote discussion amongst students enrolled in CITS2005 Object Oriented Programming.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying selected article
Showing 1 of 257 articles.
Currently 10 other people reading this forum.


 UWA week 19 (1st semester, week 10) ↓
SVG not supported

Login to reply

👍?
helpful
3:53pm Fri 10th May, Andrew G.

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.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  5:07AM Sep 06 2023
Privacy policy