The Personal Self-Assessment Environment

Project 3 Software Requirements Specification

Last modified: Thu Sep 30 08:40:49 HST 1999

Overview

This semester, you will be incrementally constructing a "Personal Self-Assessment Environment"---a small software system that you can use to build assessment quizzes on topics of your choice. You can think of this system as a flexible, configurable set of "intelligent flash cards" that you can use to help you learn factually-oriented material. Each assessment quiz consists of a set of multiple choice questions, where one or more of the potential answers can be correct. No "short answer" or "essay" question types are allowed so that the system can automatically grade and correct your answer on each question. Some example application areas for the personal self-assessment environment are learning vocabulary words in a foreign language, important events in history, or technical concepts relevent to a certification exam. Note that many technical certification exams are multiple choice and automatically graded, making this software ideal for certification self-study.

Some of the potential enhancements you may be making to the basic system during the semester:

Project 3 Increment: Answering and scoring individual questions

This increment involves an extension to the command line interface to support user-supplied answers to questions. This extension requires you to implement mechanisms to grade answers to individual questions.

A friendly word of advice: in the design of this extension, think ahead to later when you will be implementing a GUI interface to PSAE. Try to implement this extension in terms of a common API to both the CLI user interface and the GUI user interface.

Here are the specific requirements for this project.

  1. First, the software must conform to all of the requirements stated in prior projects. This includes coding standards, JavaDoc standards, command line argument processing, etc. Your Project 3 software must pass all of the test cases created for prior projects. (Note that some test cases may need to be changed to conform to the new constraint of title uniqueness.)

  2. This is version 3.0. You should have a single (typically static) string instance somewhere in your program storing this version number. This single string instance should be used whenever the version number is printed. It is a design error for you to create multiple copies of the version number string. Remember to update the first line of your output to refer to this version string.

  3. The software must ensure that each question has a unique :TITLE string, as documented in an updated version of the PSAE File Format Specification.

  4. The software must support the optional command line argument "-answer".

    The -answer argument takes two parameters: a string indicating the title, and a single integer indicating which answers the user indicated to be correct.

    If the supplied string does not exactly match any of the loaded :TITLE strings, then the program should provide an informative error message and terminate execution. (Note that the entire set of loaded questions are searched, not just those in the current selection set as specified by the -diffSet command.)

    The integer argument to -answer encodes which answers the user indicates to be correct in the following way. Assign the value 1 to the first :ANSWER declaration for the indicated question. Assign the second :ANSWER declaration the value 2. Assign the third :ANSWER declaration the value 4. And so on--the nth answer gets the value 2**n-1.

    To determine the set of answers checked as valid, you sum the values. Thus, the integer value 0 indicates that no answers were checked. The integer value 1 indicates that only the first answer was checked. The integer value 3 indicates that the first two answers (1+2) were checked. The integer value 7 indicates that the first three answers were checked (1+2+4) were checked. The integer value 6 indicates that the second and third answers were checked (2+4). And so on.

    If you think about this numeric encoding for a little while, you should be able to come up with a simple algorithm that enables you to test this integer against the answer set and determine what's correct and what's not correct.

    More than one -answer argument can be provided on the same command line.

    If there are only two answers for the given question, then the possible legal integer values are 0, 1, 2, and 3. Any other integer values should be considered as a command line error in this case. In general, for a question with n answers, the possible legal integer values range from 0 to (2**n) - 1.

    The program should print out a single line in response to each -answer argument. The line should specify the title of the question being tested, and the amount of credit awarded for that question. Credit should be awarded in the following way:

  5. As always, you must handle incorrect command line arguments.

Examples

First, assume a legal file of 10 questions called test.qa. In this file, the questions are titled "Question01", "Question02", and so forth up to "Question10". Assume each question has 10 answers, and that the nthe question's correct answer is n Thus, the single correct answer for Question 01 is the first answer, the single correct answer for Question 02 is the second answer, and so forth.

  1. A correct answer on a single question.
    % java -jar johnson-P3.jar -qa test.qa -answer "Question01" 1
    Personal Self-Assessment Environment V3.0 Philip Johnson
    Loading question title: Question01
    Loading question title: Question02
    Loading question title: Question03
    Loading question title: Question04
    Loading question title: Question05
    Loading question title: Question06
    Loading question title: Question07
    Loading question title: Question08
    Loading question title: Question09
    Loading question title: Question10
    10 questions successfully loaded.
    Answering 'Question01': 100
    

  2. Two correct answers:
    % java -jar johnson-P3.jar -qa test.qa -answer "Question01" 1 -answer "Question03" 4
    Personal Self-Assessment Environment V3.0 Philip Johnson
    Loading question title: Question01
    Loading question title: Question02
    Loading question title: Question03
    Loading question title: Question04
    Loading question title: Question05
    Loading question title: Question06
    Loading question title: Question07
    Loading question title: Question08
    Loading question title: Question09
    Loading question title: Question10
    10 questions successfully loaded.
    Answering 'Question01': 100
    Answering 'Question03': 100
    

  3. A correct and incorrect answer:
    % java -jar johnson-P3.jar -qa test.qa -answer "Question01" 1 -answer "Question03" 7
    Personal Self-Assessment Environment V3.0 Philip Johnson
    Loading question title: Question01
    Loading question title: Question02
    Loading question title: Question03
    Loading question title: Question04
    Loading question title: Question05
    Loading question title: Question06
    Loading question title: Question07
    Loading question title: Question08
    Loading question title: Question09
    Loading question title: Question10
    10 questions successfully loaded.
    Answering 'Question01': 100
    Answering 'Question03': 0
    

Note that other command line arguments could also be supplied.


Philip Johnson