Question: This generic class represents a person in line. A person should be able to carry a parcel of any type. Note: You may NOT create
This generic class represents a person in line. A person should be able to carry a parcel of any type.
Note: You may NOT create any instance variables nor instance methods that are not required.
Generic Type:
T the type of parcel this person carries
Variables:
parcel the parcel this person carries
o If we ever attempt to set its value to null, throw an IllegalArgumentException.
nextPerson a reference to the next person in line, which should also carry the same type of
parcel as this person
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
