The Personal Self-Assessment Environment

Project 4 Software Requirements Specification

Last modified: Mon Oct 18 11:06:36 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.

Project 4 Increment: Adding new questions, and updating the qa file

This increment involves two extensions to the command line interface: one to support user-supplied questions, and another to allow updating of the qa file.

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 4 software must pass all of the test cases created for prior projects.

  2. You must have completed module 09 before starting this module.

  3. This is version 4.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.

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

    The -newQuestion command line argument should be followed by exactly 15 values. These values indicate the :TYPE, :CAT, :TITLE, :QUESTION, :DIFFICULTY, and exactly five :ANSWERs along with their associated point values. The point values will not be quoted, and each answer's point value will follow the string containing the answer. See the example below.

    Your program should not crash if the user mistakenly provides less than 15 values on the command line following the -newQuestion command line argument. However, it does not need to be "smart" and recognize that only nine strings were provided to this argument and continue processing. If it cannot read 15 values following the -newQuestion argument, it should simply signal a command line error and quit. Note that if the user only provides 14 values and then provides some other command line argument, your program should process that command line argument as if it were the fifteenth value.

    Zero, one, or more -newQuestion commands can be provided on the command line.

    The program should write out a single line indicating that a new question was added, and its title.

    All -newQuestion commands should be processed before any -answer commands. In other words, user-defined questions should be available to the user to answer.

  5. The software must support the optional command line argument "-writeQuestions". This command line argument takes a single string, the name of a file, and writes out all successfully loaded questions (including any questions supplied via any -newQuestion commands) to the file.

    Zero, one, or more -writeQuestions commands can be provided on the command line.

    When a file is written, a line should be printed indicating what file was written and how many questions were written to it.

    If the file exists and contains data, that data is overwritten. If the file does not exist, it is created. If the file specification is illegal, the program catch the problem without crashing and terminate processing at that point.

    The file must be written out in legal psae format. In other words, once the file is written, it should be a legal argument to -qa in a future invocation of the system, and all questions should be read in without error.

  6. Make sure the help message is updated with all currently supported command line arguments.

Examples

Assume a file called "test.qa" with 10 questions.

  1. Writing out a new file.
    % java -jar johnson-P4.jar -qa test.qa -writeQuestions "newtest.qa"
    Personal Self-Assessment Environment V4.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.
    Writing 10 questions to file newtest.qa.
    

  2. Adding a new question
    % java -jar johnson-P4.jar -qa test.qa -newQuestion "MC:N" "Leap" "Author" "Who wrote Leap?" "50" "Cam" 100 "Philip" 0 "Robert" 0 "" 0 "" 0 
    Personal Self-Assessment Environment V4.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.
    Defining a new question: Author
    

  3. Adding a new question and writing it out
    % java -jar johnson-P4.jar -qa test.qa -newQuestion "MC:N" "Leap" "Author"
    "Who wrote Leap?" "50" "Cam" 100 "Philip" 0 "Robert" 0 "" 0 "" 0 -writeQuestions "foo.qa"
    Personal Self-Assessment Environment V4.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.
    Defining a new question: Author
    Writing 11 questions to file foo.qa
    

Note that other command line arguments could also be supplied.


Philip Johnson