Preface

This is a formal document which lays out the design of our project. However, it is primarily internal, thus it will be viewed only by our team and Professor Greg Welch. Therefore, Dr. David Thissen, the client, will not be presented with a copy. This is the first version to be delivered, and if revisions need to be made, they will be before the implementation manual is put together.

Glossary

Item Parameters – In the input file, there is information about a test. For each question on that test, there are three data points: a, b, and c. These are called item parameters. They are used in the generation of tracelines.

Tracelines – Tracelines are generated using the item parameters. They are graphs which represent the probability a person got a question right or wrong, based on the intelligence of that person. The harder the question, the steeper the slope of its traceline.

1. Introduction

Basically, we are reworking a product that Dr. David Thissen created. We are also adding some functionality and making the product user friendly and cross platform. Furthermore, Java is being used in the development of the new product, as opposed to the original C++. The current interface, where the user enters a series of numbers to represent choices, is to be replaced with a Graphical User Interface (GUI), and the output will be similarly updated. The recursive mathematical algorithm that is the core of the computations of the program will remain the same, though the code representation of it may change slightly. Finally, the new code will be written using strict coding guidelines such as the black box philosophy.

2. High Level Design Specification

Figure 2.1 - Structural Model Diagram

Figure 2.2 – Control Model Diagram

2.A Main

This is the centralized manager of the program. It brings everything together through a call-return system. Thus all of the subprograms are run in sequence until the final output has been delivered to the user. Furthermore, it maintains the necessary data structures and passes the pertinent data along to each sub-process.

2.B User Interface

The user indicates which input file type is going to be used, then selects that file in a file chooser window. Also, the user specifies some pertinent information about that file.

2.C Input File Reader

This reads in the item parameters from the specified input file. There are three types of files which can be read: columns, bilog, and multilog.

2.D Recursive Algorithm

This takes the item parameters, genereates tracelines from them, and then calculates everything needed for the summed score to scale score conversion.

2.E Output

This takes the data calculated by the recursive algorithm and outputs it to the screen. It also allows the user to save the data to a file and “copy” it so that it may be “pasted” in another application.

3. Detail Design Specification

3A. Main

All four other aspects of the program are centered about the Main section. The main program will integrate all four other aspects: the User Interface, Input File Reader, the Recursive Algorithm, and the Output of the program. All of the processing that goes on is centered throughout the main section, including passing between the various data structures the Input File data, the Trace Lines and the Scaled Scores. There will be one main java program that implements the rest as objects and passes values between all four main procedures. The User Interface gathers all necessary user information, the Input File Reader determines which file type is in use, the data is read and then processed in the Recursive Algorithm, and then all data is sent to the Output file.

3B. User Interface

The User Interface is a fairly simple GUI that simply checks all the various user input and determines whether the information can be used to complete the data processing and produce a valid output file. The User Interface is a collection of items that will invoke the Input File Reader and Output upon completion.

Figure 3.1 – Lower Level Structural Diagram (User Interface)

3C. Input File Reader

In the GUI, the user types the name of a file that contains the input parameters. Also, the user will press a radio button which declares the format of the file. For each format, the reader will acquire the three input parameters using the Java StringTokenizer class, and store them as a, b and c. In the columns and the bilog file format, there is a line representing each test question. Each line of the file will be tokenized to the appropriate position, and then the parameters will be read in. In multilog format, there are two types of questions that can be represented. The first is identical to the line system in bilog, and will be handled in the same way. The second allows for partial credit for wrong answers, and can possibly have a great many more items to be read in as parameters. These extra parameters are handled in the same way, but will be stored as b1, b2, b3… The parameters for each input format are stored in the Test class which is vector of arrays.

Figure 3.2 - Lower Level Structural Diagram (Input File Reader)

*FileFormat = 0*FileFormat = 1*FileFormat = 2+

**Metric = false **Metric = true

StringTokenizerString Tokenizer

String Tokenizer

*FileFormat is an int variable in the main class that reads in its value from the GUI

**Metric is a boolean variable in the main class that reads in its value from the GUI

3D. Recursive Algorithm

Once the file input reader finishes, the input data will be passed to the recursive algorithm. Here, the input for each format will be used to calculate array representations of graphs, called tracelines, for each item in the test. Then, in a series of for loops, each item is successively multiplied against the standard normal curve once for a right and once for a wrong answer. At the end of the outer loop, a double array equal in size to the number of items on the test will contain the likelihood of someone getting a particular score given that the got a particular number of answers correct.

Figure 3.3 – Lower Level Structural Diagram (Recursive Algorithm)

Initialize double arrays

Tracelines

Exit Condition 1

Exit Condition 2

Exit Condition 3

EAPs

Exit Condition 1 = Exit LOOP 1 after it has gone through all possible scores (maxscore)

Exit Condition 2 = Exit LOOP 2 after it has gone through all possible scores up to the score equal to the

Index of LOOP 1

Exit Condition 3 = Exit LOOP 3 after is has gone through all of the categories for the question number

equal to the index of LOOP 1

3E. Output

Once the double array described above is completed, one line is output for each possible score on the test. Each line contains the score, the EAP calculated in the recursive algorithm, the standard deviation of the EAP, and any other information the user requested in the GUI.

Figure 3.4 – Data Flow Diagram

Input Parameters read

from said file

Test class made to graphs

Represented in arrays

Tracelines combined with

Normal Curve to get EAPs

GUI options performed

Like percentiles, SS…

3F. Class Variables and Functions

Form1.java

Variables

Data Name

/

Type

/

Description

IntScaleScore / boolean / Determines whether the user has chosen the Integer to Scales Score via the checkbox.
PopScaleMui / double / Stores the value of Mu obtained from a text field.
PopScaleS / double / Stores the value of s (the population scale score) obtained from a text field.
FFC / boolean / If the file format selected is columns, this variable is true, else it is false
FFB / boolean / If the file format selected is Bilog, this variable is true, else it is false
FFM / boolean / Stores the state of the lesson, remembering variable values for future usage.
ScaleMax / double / Stores the value of the max int obtained from a text field.
ScaleSD / double / Stores the value of the scale s.d. obtained from a text field.
ColumnA / int / Stores the value of Columns for: a obtained from a text field.
ColumnB / int / Stores the value of Columns for: b obtained from a text field.
ColumnC / int / Stores the value of Columns for: c obtained from a text field.

RescaleInt

/ boolean / Determines whether the user has chosen the Rescale to Integer with option via the checkbox.

RescaleSD

/ double / Stores the value of the Standard Deviation obtained from a text field.

ShowPercentile

/ boolean / Determines whether the user has chosen to display Percentiles. Done via the checkbox.

Metric

/ boolean / Decides if you chose normal (Metric == false) or if you chose logistic (Metric == true)

CurrentFile

/ String / Stores the location of the input file used. Changed through editing the text field

f

/ Frame / Frame used to display the Input File Dialog
GetReader / FileDialog / Used to create the file dialog that allows the user to select the input file

Functions

Name

/

Type

/

Description

Form1() / public / Constructor of the GUI form; initializes all variables
dispose() / public void / Destructor.
radioButton1_checkedChanged
h(Object source, Event e) / private void / Checks to see if the “Columns” radio button has been checked. If it has
edit4_textChanged(Object source, Event e) / private void / Handles the changes made to edit4 (b in columns)
radioButton3_checkedChanged
(Object source, Event e) / private void / Handles the selection of either Normal Metric or Logistic Metric.
button2_click(Object source, Event e) / private void / Input file select button. When clicked, it displays a windows-style file selection window that prompts the user to select the input file.
edit11_textChanged(Object source, Event e) / private void / Checks the value in the Current File. If the current file is valid, then enable the view and process button.
checkBox1_click(Object source, Event e) / private void / Handles the checking of the checkbox “Integer Scale Scores”.
button4_click(Object source, Event e) / private void / Exits the program when clicked.
button1_click
(Object source, Event e) / private void / Displays in a new window the content of the file specified in the Current File field if it is a valid file.
edit1_textChanged(Object source, Event e) / private void / Called when any changes are made to the Current File field. It checks to see if the string in the field is still a valid file. If it is not, then it disables the view and process button, else it leaves it as it is.
s_textChanged(Object source, Event e) / private void / Handles the changes made to Pop. Dist. mu text field.
edit9_textChanged(Object source, Event e) / private void / Handles the changes made to “Scale 0.0 to:” text field.
edit10_textChanged(Object source, Event e) / private void / Handles the changes made to “Scale s.d. to:” text field.
checkBox3_click(Object source, Event e) / private void / Checks to see if check box “Rescale to Integers with :” has been checked and handles the changes depending on whether it has been checked or not.
edit7_textChanged(Object source, Event e) / private void / Gets the “Average” value from the text field.
edit8_textChanged(Object source, Event e) / private void / Gets the “Standard Deviation” value from the text field.
edit3_textChanged(Object source, Event e) / private void / Gets the value of Column A
edit5_textChanged(Object source, Event e) / private void / Gets the value of Column C
checkBox2_click(Object source, Event e) / private void / Variable to see if the user wishes to show percentile.
MultiLog_checkedChanged(Object source, Event e) / private void / If the radio button for the Multilog option is changed,
then it will change the value of FFM,
BiLog_checkedChanged(Object source, Event e) / private void / If the radio button for the BiLog option is changed, then change the value of FFB.
button3_click(Object source, Event e) / private void / Calls the main function that processes the selected input file and outputs it into a new window.
button1_click(Object source, Event e) / private void / When the user types something into the “Current File” (edit11) text field, it is checked to see if it contains a valid file name. If it isn’t a valid file, then the “View” button is not activated, else if it is a valid file, then the “View” button is activated.
This call occurs when the user clicks on the view (button1) button on the GUI after the button has been activated.
Another window opens up and displays the content of the file specified in the “current file” text field.
traceycall() / private String / Computes all EAP’s (and other mathematical values), outputs those values to a file, and returns a String containing those values for output to the screen.
round(double, int) / private String / Rounds a double and converts it into a String.

traceycall()

Variables

Name

/

Type

/

Description

maxScore / int / Contains the maximum possible score for the Test
numPartitions / int / Contains the number of quadrature points (46)
numItems / int / Contains the number of Items in the Test
ncps / int / Contains the number of current possible scores at each iteration of the main algorithm loop
likelyhood / double [ ] [ ] / Contains the probability of getting each score in the test
lktemp / double [ ] [ ] / Temporary variable used to calculate likelyhood
qpmax / double / Contains the value for the maximum quadrature point (4.0)
theta / double / Index used to represent each of the quadrature points in the calculations for likelyhood and the normal curve
normal / double [ ] / Contains the normal curve
normSum / double / Used in the calculation of the normal curve
filename / String / Contains the name of the output file
outputFile / File / Used to open the output file
fr / FileWriter / Used to write to the output file
out / BufferedWriter / Used to write to the output file
sum / double / Used in the calculation of EAPs
temp / double / Used in the calculation of EAPs
eap / double / Used in the calculation of EAPs
sd / double / Used in the calculation of EAPs
sdtemp / double / Used in the calculation of EAPs
sScore / double / Used in the calculation of EAPs
sError / double / Used in the calculation of EAPs
percent / double / Used in the calculation of EAPs
tempArray / double [ ] / Used to store above variables
eapArray / double [ ] / Used to store above variables
sdArray / double [ ] / Used to store above variables
strEap / String / Used for output of EAP
strTemp / String / Used for output of proportion
strSd / String / Used for output of standard deviation
strSs / String / Used for output of scale score
strErr / String / Used for output of error
strPer / String / Used for output of percentile
output / String / Returned from traceycall(), eventually contains all of the data that is outputted to the screen and to the output file.
averageScS / double / Used in scale score calculations
sdScS / double / Used in scale score calculations
OutputFrame.java
Functions

Name

/

Type

/

Description

OutputFrame extends Frame

/

public class

/ The main program of the OutputFrame class. This class adds a Menu Bar to the normal Frame.

OutputFrame(String title, String data)

/

public

/

OutputFrame constructor. Calls on the normal Frame constructor. “data” is what is placed into the OutputFrame. Adds the menu bar onto a normal frame.

MenuHandler.java

Variables

Data Name

/

Type

/

Description

data

/

String

/ Used when the save command is selected. It holds all the data that is to be outputted to the file specified.

MenuFrame

/

OutputFrame

/

The output frame you are working with. Needed so that actions of the menu options can be executed.

GetWriter

/

FileDialog

/

File Dialog used for the save option.

Functions

Name

/

Type

/

Description

MenuHandler implements ActionListener, ItemListener

/

public class

/ The main program of the MenuHandler class. This class is used to handle the Menu Bar Commands of an OutputFrame.

MenuHandler(OutputFrame MenuFrame, String DataPassed)

/

public

/

MenuHandler constructor. MenuFrame is the OutputFrame that is being manipulated. DataPassed is the data stored in the OutputFrame which is needed for the save option.

actionPerformed(ActionEvent ae)

/

public void

/

Event listener that detects the option menu selected and acts accordingly.

SaveInto(String file, String data)

/

private void

/

Function that saves “data” in a file called “file”

ViewFrame.java

Variables
Name / Type / Description
Title /

String

/ Displays the title of the new window to be displayed
OutputStr / String / The actual String to be outputted into the text area of the new window.

Functions

Name

/

Description

ViewFrame(String title, String outputStr) / Main function that takes in the title of the new window and the string to output in the window as parameters.
subFrames.java

Variables

Data Name

/

Type

/

Description

SubFrame

/

Frame

/

Used to recognize which Frame is being acted upon.

Functions

Name

/

Type

/

Description

subFrames extends WindowAdapter /

public class

/ The main program of the subFrames class. This class is used by Frames so that the x button on the windows screen will close down the selected frame
subFrames(Frame readframe) /

public

/

The constructor of subFrames. readframe is the Frame which is to be acted upon by the subFrames class.

windowClosing(WindowEvent we) /

public void

/

If the x button is selected, then set the visibility of the frame to false.