Menu

#4 Design for future grading tools

open
nobody
None
5
2010-05-05
2010-05-05
N Napier
No

Documenting idea from Teresa Lee's investigation of design patterns: "Since the JavaGrader program may support multiple grading tools (i.e. Code Turtle), the output file of the JavaGrader will likely have different formatting requirements depending on the different grading tools, which may lead to different formatting requirements for the input file. And some grading tools may need multiple files of different types with functionality of their own. Right now, the TestCaseConfigFile is in charge of creating TestCase objects, the ConfigError object, the CTConverter, and the ProjectConverter. To support multiple programs, we could probably make the TestCaseConfigFile as a concrete factory for creating files required for the Code Turtle. The TestCaseConfigFile would inherit a new abstract factory that would be added later, and the JavaGrader class would interact with the abstract factory instead. The JavaGrader would accept input from the user to determine which concrete factory to create at runtime. Every time we need to support a new grading tool, we create a new concrete factory for that grading tool. The new concrete factory would be in charge of creating its own TestCase objects, ConfigError object, and its converters. And it is definitely possible to reuse the TestCase class, the ConfigError class, and other converter classes that already exist. When the JavaGrader runs, the JavaGrader class would instantiate the correct concrete factory based on the user input, and pass the concrete factory to the abstract factory. The abstract factory serves as a blueprint of the sequence in which each concrete factory performs its object creation. However, it does not specify what objects the concrete factory should create; it is up to the concrete factory to determine."

Discussion


Log in to post a comment.