Lesson 7 of 730 minModule progress 0%

Module 12: Generics and Type Safety

Mini-Project: Generic Data Structure

Implement a generic cache or queue with bounded type parameters and Optional results.

Build a FixedSizeQueue<T> with enqueue/dequeue, iterators, and Optional peek methods.

Add bounded type parameters or comparator injections for prioritized variants.

Write unit tests for type safety, ensuring the API prevents misuse at compile time.

Advertisement

Lesson check

What benefit should the mini-project demonstrate?

Next lesson →