CJCoding With Joseph
15free / daySign inCreate account

Thompson Rivers University

Group Class

Assignment 4 Collections - SM 2025

This is a generic class used to store a group of objects of any type. For this assignment, we will use it to store Applicant objects, but it should also work for other types like String, Integer, or any other object.

We will build this class step by step, starting with the class declaration and then adding each required method.


Class Header

This is the beginning of a generic class. The <T> part means this class can store items of any type, not just one specific class. For example:

  • If we write Group<Applicant>, the type T becomes Applicant.

  • If we write Group<String>, then T becomes String.

Members only

Keep reading this lesson

You've reached the end of the free preview. Unlock the rest of this lesson plus 54 more lessons in Thompson Rivers University.

  • Unlimited coding questions
  • Unlimited access to all classroom material
  • Weekly live call for questions and guidance
  • 3,000 AI tutor tokens / month
  • Personal SQL database (3 MB)
  • Progress tracking

Cancel any time.