Homework 3

Learning Objectives

In this homework, you will apply the concepts you learned in class to reinforce your understanding of:

Homework Policy

This is an indiviual homework assignment. Please review Academic Integrity section of the class syllabus for rules on individual homework assignments.

Description

In class we discussed the Quiz Software application. You are provided with a staring solution to this application, which implements multiple choice question and has a stubed out numeric question class. The provided code is split into three main packages: model, control, and ui. You will need to implement the missing functionality in the model package. Additionally, you'll need to write a Driver class (in the hw2 directory, not in any of the packages) that tests the code in the model package.

Getting started

Pull your git repos and inspect hw3 directory. It contains the starter code for this homework. The UML diagram of the starer code is shown below. Each package is shown in a large box. The model package provides details of classes that reside inside that package.
  1. The implementation of MultipleChoiceQuestion class is provided, however, the NumericQuestion class is only stubbed out. Provide the implementation of the NumericQuestion class methods.
  2. Review the code for potential exceptions that may be thrown and add exception handling
  3. Adjust the format of both questions so that the question point value can be read in from a file along with the question and the instructor provided correct answer
  4. In the hw3 directory you will find Driver.java. Add code to this class to test the Quiz, MultipleChoide, and NumericQuestion classes. Note, this class currently tests the getGrade() method of Quiz. Use that test as an example for how to add new tests.
  5. Modify Driver.java main method to accept quiz file name from command line, and remove the hard coded file name
  6. Write Javadoc style comments for the Quiz, MultipleChoiceQuestion, NumericQuestion, and Question classes. (Generate and view your Javadoc to verify the comments show up as expected).

Submitting your solution

Submit your solution to this homework to hw3 directory of your CSCI 2300 git repo (the directory that provided you with the starter code). Submit all files that were changed or added.

Grading

Homework 3 is worth 100 points. Here is how your grade will be calculated: