Package com.gophers.structures.factory
Class GradeFactory
java.lang.Object
com.gophers.structures.factory.AbstractGradeFactory
com.gophers.structures.factory.GradeFactory
A factory class to create specific types of
Grade objects based on
the given index.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateItem(org.junit.runner.Result result, int index) Creates a specificGradeobject based on the given index.Methods inherited from class com.gophers.structures.factory.AbstractGradeFactory
createItems
-
Constructor Details
-
GradeFactory
public GradeFactory()
-
-
Method Details
-
createItem
Creates a specificGradeobject based on the given index.- Specified by:
createItemin interfaceFactory<Grade>- Specified by:
createItemin classAbstractGradeFactory- Parameters:
result- The JUnitResultobject containing the test result details.index- The index to determine which grade object to create.- Returns:
- A new instance of a
Gradesubclass. - Throws:
IllegalArgumentException- if the index does not match any defined grade type.
-