Copyright: (C) Ossi Ylijoki 1995


# Contents
ST_OOP Document - Contents

This is a program document of Self-Trainer for Object Oriented Programming (ST_OOP) prototype.

Select a topic from the following list. If you have not used a program like this before, select How to use Help -command from Help-menu.

0.	About

1.	Task definition and principal solution

1.1	Task definition

1.2	Principal solution

2.	Users manual

2.1	Inputs

2.2	Outputs

2.3	Error messages

2.4	Restrictions

2.5	Run instructions

3.	Program document

3.1	Program structure

3.2	Global variables and data structures

3.3	Class descriptions

3.4	Further development

4.	Test cases

Document history


About
0. About

ST_OOP - Self-Trainer for Object Oriented Programming.

Prototype v0.82b.

Copyright (C) University of Joensuu, Department of Computer Science.

Programming:

Ossi Ylijoki, August-95


Task definition
1.1 Task definition

The aim of this laboratory project was to produce a preliminary prototype of a new kind of computer-aided training program, self-trainer. Self-trainers consist of massive data bases of training tasks. They should allow trainees to solve these problems in a way that is very similar to their normal work. A self-trainer should also provide a trainee theoretical declarations, i.e. explanatory texts and examples. In this case, these goals are achieved by combining a real object oriented programming environment with a self-trainer interface, ST_OOP.

ST_OOP is actually a simple task browser, which allows the trainee to select an assignment from the database, displays the assignment instructions in its main window and then loads corresponding program file into the programming environment. The trainee then reads the instructions and resolves the problem by modifying the program in the real programming environment - just as she would do in her normal work. Whenever needed, explanatory texts and examples are available directly from self-trainer interface.


Principal solution
1.2 Principal solution

When ST_OOP is started, it first reads some configuration information from an initialisation file (INI-file) and then starts the programming environment. After this, the program displays instructions for the first assignment and instructs the programming environment to load corresponding program file. At this point, everything is ready for the trainee to begin.

After the trainee has decided to leave the current assignment, she has the following options in the ST_OOP window:

-	Move to the next or previous task. The program displays instructions for the new task and instructs the programming environment to unload current program file and get a new program file corresponding to the new task. The environment itself remains loaded in the main memory and no user action is needed after the move command in the self-trainer, which means fast and automatic transition from the users point of view. This was the most challenging part of this project.

-	Inspect theoretical declarations. Self trainer displays texts and examples in a separate window. Technically, this window is displayed by another program, but the action is invisible to the user.

-	Change class. (This feature is not implemented.) ST_OOP displays a window, where the trainee can select a new assignment class.

-	Exit program. The program unloads the programming environment and terminates.

Since this program is a prototype and there was a limited amount of development time available, ST_OOP has its limitations. As mentioned, subjects cannot change class, because that feature is not implemented. The database is very limited; it contains only a few tasks for testing purposes. Usability has not been tested and thus it is probably that several (minor, I hope) user interface modifications will be needed. Despite the limited nature of this preliminary prototype, I hope it will demonstrate the idea of a self trainer for object oriented programming, serve as a basis for further discussions and give some information for further design and implementation.


Inputs
2.1 Inputs

ST_OOP has three different input sources: command line, initialisation file and user interface.

2.1.1 Command line

When the program starts, it needs to know the location and name of its initialisation file. The program takes this information as a command line parameter. Parameter must contain file name and it may contain path and drive, for example C:\ST\ST_OOP.INI. Drive, path and filename must point to a valid initialisation file, otherwise ST_OOP terminates with an error message.

2.1.2 Initialisation file

Initialisation file name is given to the program as a command line parameter. This file is a normal Windows initialisation file, which contains sections, entries (keys) and entry strings (key values) as follows (for more information about Windows initialisation file structure, refer to Windows documentation):

[SECTION1]

Entry1=value 1

Entry2=value 2

Sections and their purpose in this file are:

[ST_OOP]

-	general program configuration

[CLASSES]

-	defines assignment classes; one entry (Class<n>) for each class

[CLASS<n>]

-	defines assignments and corresponding programs for class<n>

-	a section for each Class<n> entry in CLASSES section

Section ST_OOP contains the following entries:

TextsAndExamples

Theoretical declarations - location and name. This file must be in Windows help file (.HLP) format. Example: TextsAndExamples=d:\st_oop\st_oop.hlp.

ProgrammingEnv

Programming environment - location and name. Example: ProgrammingEnv=d:\bp\bin\bpw.exe.

Class

Assignment class in use. Valid range is 1..ClassCount entry value (see Classes-section below). Example: Class=1.

The following are programming environment menu commands as entered from keyboard. (For example Open-command in File-menu can be given by pressing Alt+F and then O.)

CloseAll

Key mnemonics for Close all -command in Window-menu. Note: do not include Alt or spaces. Example: CloseAll=WA.

Open

Key mnemonics for File open -command in File-menu. Note: do not include Alt or spaces. Example: Open=FO.

Exit

Key mnemonics for Exit-command in File-menu. Note: do not include Alt or spaces. Example: Close=FX.

Section CLASSES names all available assignment classes. There must be a corresponding [CLASS<n>] section for each class. Here is an example of this section:

[CLASSES]

Class1=Novice

Class2=Beginner

Class3=Pro

Class4=Guru

ClassCount=4

Class numbering must start from 1. The last entry, ClassCount, must be equal to total number of classes. Note also that entry numbering must be contiguous (this is a prototype, anyway).

Section CLASS<n>, where <n> is a class number, lists assignments and their corresponding programs for the class. There must be one CLASS<n> section for each class defined in CLASSES-section. Here is an example of this section:

[CLASS1]

A1=d:\oo\task_fst.txt

P1=d:\oo\step06.pas

A2= d:\oo\task_n.txt

P2=d:\oo\st_oop.pas

AssignmentCount=2

The entries and their purpose:

A<n>

Assignment file location and name. This file is a normal text file (ANSI ASCII), that describes what the trainee should do. ST_OOP displays this text in its main window. The numbering must start from A1 and it must be contiguous (A1, A2, A3 and so on).

P<n>

Program file location and name for assignment A<n>. The trainee modifies this file when solving the problem A<n>.

AssignmentCount

Total # of assignments in this class; this must be equal to A<max> (= P<max>).

Note that entry numbering must be contiguous (this is still a prototype!).

2.1.3 User interface

The trainee can enter commands to the ST_OOP program by pressing one of the following command buttons:

Previous

Move to the previous task. Previous task is the task, which precedes the current task (in the current class) in ST_OOP.INI-file. The program displays instructions for the new task and instructs the programming environment to unload current program file and get a new program file corresponding to the new task. If current task was the first assignment in this class, ST_OOP displays a short message instead of getting a new assignment.

Next

Similar to Previous-command, but moves to the next task.

Help

Inspect theoretical declarations. ST_OOP will call Windows Help engine and instruct it to display help file defined by TextsAndExamples-entry in ST_OOP.INI-file.

Change class

Since this feature is not implemented, ST_OOP only displays a message box indicating this (instead of opening a window where the trainee could select a new assignment class).

Exit

The program unloads the programming environment and terminates.

The programming environments user interface is described in its manuals.

See also: Error messages


Outputs
2.2 Outputs

ST_OOP displays some information in its user interface and interacts with the programming environment and Windows.

2.2.1 User interface

Assignment text is shown in the ST_OOPs main window. This text is read from a normal text file (ANSI-ASCII) defined by current A<n> entry of the current class in the initialisation file. The text is displayed as is, i.e. no modifications are done.

2.2.2 Interaction with the programming environment

When the trainee presses Next- or Previous-button, ST_OOP sends some commands to the programming environment. The program emulates user action: it enters commands just as the trainee would do with the keyboard. Key mnemonics for these commands are defined in the initialisation file. When the program is terminated by pressing the Exit-button, ST_OOP sends an exit command to the programming environment.

2.2.2 Interaction with Windows

When ST_OOP is started, it asks the Windows system to load the programming environment. Help button causes the program to request help service from the Windows.

See also: Inputs, Error messages


Error messages
2.3 Error messages

"Error: .INI-file not found or invalid ProgrammingEnv entry.

The program cannot continue due to missing or invalid initialisation file. Check command line and ProgrammingEnv entry in initialisation file.

"Error: Could not load Windows Help engine."

Theoretical declarations can not be displayed, because ST_OOP could not load Windows Help engine. Possible causes: low memory, system resources or missing help engine (WINHELP.EXE).

"This is the first task in this class."

Select Next-command or change class.

"No more tasks in this class."

Select Previous-command or change class.


Restrictions
2.4 Restrictions

When using Borland Pascal with Objects (BPW) as the programming environment, it must not be running, when ST_OOP is started. This is important, because ST_OOP cannot gain control over BPW, if it is already running.

If you use Notepad as the programming environment, you must explicitly save the program (if you made any changes) before moving to the next or previous assignment.

Assignment file numbering (A<n> entries in the initialisation file) must start from A1. Numbering must also be contiguous (A1, A2, A3 and so on). This is the case with program file numbering and class numbering, too.

The number of assignments and corresponding programs is restricted only by available disk space.

The maximum size of all entry values in the initialisation file is 255 for character values and 32767 for integer values.

Maximum assignment text length is 4096 characters.

See also: Global variables and data structures.


Run instructions
2.5 Run instructions

This chapter gives information about how to install and run the ST_OOP program. Building the program and associated help file and modifying the resources are also covered.

Select a topic:

Installing and starting ST_OOP

Building the program

Building the help file

Modifying the resource file

Adding a new assignment

Deleting an assignment

Changing the programming environment


Installing and starting ST_OOP
2.5.1 Installing and starting ST_OOP

Installation

1	Insert ST_OOP diskette in drive A:

2	Make a directory for ST_OOP program to your hard disk. Example:

MD  C:\ST

3	Make a directory for the assignments and program files. Example:

MD  C:\ST\DB

4	Copy the program and the initialisation files from the diskette to your program directory. Example:

COPY A:\ST_OOP.EXE  C:\ST

COPY A:\ST_OOP.HLP  C:\ST

COPY A:\ST_OOP.INI  C:\ST

5	Copy the assignments and the program files to your assignment directory. Example:

COPY A:\DB\*.*  C:\ST\DB

6	Edit the initialization file ST_OOP.INI. Use any text editor, for example Windows Notepad. See comments below.

Comments

If you have Borland Pascal for Windows (BPW) installed, search the ProgrammingEnv-entry in ST_OOP section and alter it so that it points to your BPW.EXE file. See chapter 2.1 Inputs for more information about initialisation file.

If you do not have BPW or do not want to use it, you can use Windows Notepad instead. Set the ProgrammingEnv-entry so that it points to your NOTEPAD.EXE file. In this case, you have to change the command entries (CloseAll, Close, Open) too. Notepad has no close all -command, but you can substitute it with File|New -command. Of course, Notepad is a poor replacement for a programming environment, but this is how anyone can get the idea of self trainer without having to install BPW. See also Changing the programming environment.

Note: If you use Notepad, you must explicitly save the program (if you made any changes) before moving to the next or previous assignment.

In addition, you have to change TextsAndExamples-entry path and every path in Class<n> sections so that they correspond to your installation.

Starting ST_OOP

The following procedure assumes that you installed the program in C:\ST-directory.

1	Start Windows if it is not running.

2	If BPW is running, close it.

3	Select Run-command from Program Managers File menu and

4	enter C:\ST\ST_OOP.EXE  C:\ST\ST_OOP.INI as the command and click OK.


Building the program
2.5.2 Building the program

1	Make a working directory to your hard disk. Example: MD c:\st_oop

2	Copy all files from ST_OOP-diskette to your working directory. Example: COPY a:\src\*.* c:\st_oop

3	Start Borland Pascal for Windows (BPW) and load ST_OOP.PAS.

4	Select Compile|Target and make sure that the selected application target is a Windows application:

5	Select Options|Compiler and check the compiler options:

I/O checking should be disabled.

6	Select Compile|Make (or Compile|Build) to build ST_OOP.


Building the help file
2.5.3 Building the help file

1	From DOS prompt, enter command

HC31  ST_OOP.HPJ

Comments

Help compiler, HC31.EXE, is a (slow) DOS-program. Version 3.10.445 of this program is delivered with Borland Pascal for Windows (BPW). I used version 3.10.505, which can be downloaded for example from ftp.microsoft.com.

Help file ST_OOP.HLP consists of the following files:

ST_OOP.RTF	.RTF-formatted text created with MS Word 6.0a. Help texts.
PREF.BMP	16-colour bitmap created with Windows Clipboard and Paintbrush. BPW Preferences-dialogue.
COMPOPT.BMP	16-colour bitmap created with Windows Clipboard and Paintbrush. BPW Compiler options -dialogue.
CLASS.SHG	Shed-formatted graphics created with hotspot editor (delivered with BPW). Class hierarchy chart.

Class hierarchy chart was produced as follows:

1	The chart was created with ABC Flowcharter 2.0. File name is CLASS.AF2.

2	The chart was transformed to Windows metafile (.WMF) format with ABCs export function. File name is CLASS.WMF.

3	Class.wmf was used as input for the hotspot editor (SHED.EXE). Links were added and the result was saved as CLASS.SHG.


Modifying the resource file
2.5.4 Modifying the resource file

1	Start the Resource Workshop (RW). This is a separate program, which is delivered with BPW.

2	Select File|Open project...

3	Select .RC Resource script from the File type list box.

4	Select your working directory from the Directories list.

5	Select ST_OOP.RC from Files list and click OK.

6	Select File|Preferences... and make sure that ST_OOP.RES file is multisaved with the project:

7	Click OK and change the resources.

8	Select File|Save project. RW saves the resource files (.RC is in text format and .RES is compiled). When you next time build ST_OOP with BPW, your modifications will take effect.

Note: You can also modify the resources of an existing ST_OOP without building the program. If you do this, limit your modifications to textual and/or lay-out changes - do not add or delete any controls (buttons, etc.).


Adding a new assignment
2.5.5 Adding a new assignment

1	Write the assignment text and prepare a new program file for the assignment.

2	Edit the initialization file:

-	Add a new A<n> entry for the assignment. Example: A123=c:\st\db\ptr01.txt.

-	Add a corresponding P<n> entry for the program file. Example: P123=c:\st\db\pointer.pas.

-	Increment AssignmentCount entry value by one.

Comments

One assignment can belong to one or more classes. Add it to every class you like as described in step 2 above.

Note that the numbering must remain contiguous. For example, if you have tasks A150, A151, A152 and want to add a new assignment between A150 and A151, first rename the rest of the tasks: A151 => A152, A152 => A153 and then add your new task as A151.

See also: Inputs


Deleting an assingment
2.5.6 Deleting an assingment

Edit the initialization file as follows:

1	Remove the A<n> and the corresponding P<n> entry.

2	Renumber the rest of the assignments so that no gaps exist.

3	Decrement AssignmentCount entry value by one.

Comments

Repeat the above procedure for every class, where the assignment exists.

See also: Inputs


Changing the programming environment
2.5.7 Changing the programming environment

Edit the initialization file as follows:

1	Change ProgrammingEnv-entry so that it points to your new programming environment file.

2	Change key mnemonic entries so that they correspond to your new programming environments commands. The entries are:

-	CloseAll

-	Open

-	Exit

3	Restart ST_OOP so that the changes will take effect.

Comments

ST_OOP has been designed to work with Borland Pascal for Windows (and it will work with some limitations with Windows Notepad).There is no guarantee that the two programs will co-operate correctly if you use any other programming environment.

Note: If you use Notepad, you must explicitly save the program (if you made any changes) before moving to the next or previous assignment.

See also: Inputs


Program structure
3.1 Program structure

ST_OOP is programmed with Borland Pascal for Windows (BPW) using Object Windows class library (OWL). The following class hierarchy does not contain any OWL classes for clarity reasons. Click on class name to see class description.

Explanations:

Solid box	Method.

Dotted box	Data member.

Parentheses	Indicate that data member/method is private.

See also: Class descriptions.


Global variables and data structures
3.2 Global variables and data structures

The one and only own global variable of ST_OOP is the application object called st. It is used only in the main program. Global constants are listed in the following tables:

Constant	Value	Explanation
DLG_MAIN	100	Main window dialog ID
CMD_PREV	101	Command button IDs
CMD_NEXT	102
CMD_HELP	103
CMD_EXIT	104
CMD_CHANGE_CLASS	107
TXT_ASSIGNMENT	106	Assignment text box ID
MSG_PROG_ENV_ERROR	1	Invalid initialization file or ProgrammingEnv-entry message ID
MSG_LAST_TASK	0	Last task message ID
MSG_FIRST_TASK	3	First task message ID
MSG_WINHELP_ERROR	2	Couldnt load Windows help engine message ID
HELP_QUIT	2	Constants for Winhelp-function
HELP_CONTENTS	3
Constant	Default value	Explanation
PROGNAME	'ST_OOP'	Application title
MAX_STR_LEN	255	Max string length (resource  and .INI files)
LEN_TASK_TEXT	4096	Max string length in asssignment text box
ERROR	'Resource error '	General message, if resource string not found
SEC_PROG	'ST_OOP'	.INI-file section and entry names
SEC_CLASSES	'CLASSES'
KEY_TEXT	'TextsAndExamples'
KEY_PROG	'ProgrammingEnv'
KEY_CLASS	'Class'
KEY_CLASSn	KEY_CLASS
KEY_ASSIGNMENT_COUNT	'AssignmentCount'
KEY_CLASSCOUNT	'ClassCount'
KEY_CLOSEALL	'CloseAll'
KEY_OPEN	'Open'
KEY_CLOSE	'Exit'


Class descriptions
3.3 Class descriptions

This chapter describes ST_OOPs classes. Every class is derived from some Object Windows library (OWL) class. Parent class name is mentioned in parentheses just after the ST_OOP class name. This document covers only the new and overwritten features, not those derived from ancestor(s). For documentation of ancestors, refer to OWL documentation.

Select a class

TSTOOP	Application object.
TMainWindow	Main window class.
TAssignment	Assignment management.
TTaskText	Assignment text edit control.
TResourceString	Resource string management.

See also:

Program structure.

Global variables and data structures.


Class TSTOOP(TApplication)
3.3.1 Class TSTOOP(TApplication)

This is the application object class.

Public member variables

None.

Public methods

procedure InitMainWindow; virtual;

Creates the applications main window and stores it into TApplications MainWindow data member. This is a normal OWL routine.

function ProcessAppMsg(var Msg: TMsg): Boolean; virtual;

This method simply returns false and is overwritten for efficiency reasons.

Private member variables

None.

Private methods

None.


TMainWindow(TDialog)
3.3.2 TMainWindow(TDialog)

This is the applications main window class.

Public member variables

None.

Public methods

constructor Init(AParent: PWindowsObject; AName: PChar);

Calls parents Init, then creates a new Task and a new TaskText with length LEN_TASK_TEXT.

procedure SetupWindow; virtual;

At first, calls parents SetupWindow. Then, if the initialization file was invalid, displays a message box with text MSG_PROG_ENV_ERROR and terminates the program. If not, requests Windows to load the programming environment. Name and location is asked from the Task. At last, stores programming environments main window handle and displays current assignment text.

procedure LoadProgram;

Commands the programming environment to close all existing windows and load a new program file.

procedure cmdPrev(var Msg: TMessage); virtual ID_FIRST + CMD_PREV;

Moves to the previous assignment, displays instructions for the task and loads corresponding program file into the programming environment. If the current task was already the first task in this assignment class, displays a message box with text MSG_FIRST_TASK and stays on the current task.

procedure cmdNext(var Msg: TMessage); virtual ID_FIRST + CMD_NEXT;

Similar to cmdPrev, exept that moves to the next assignment and message box text is MSG_LAST_TASK.

procedure cmdChangeClass(var Msg: TMessage); virtual ID_FIRST + CMD_CHANGE_CLASS;

Displays a messgage box with text Not implemented.

procedure cmdHelp(var Msg: TMessage); virtual ID_FIRST + CMD_HELP;

Asks Windows to load help engine and display theoretical declarations. If this fails, displays a message box with text MSG_WINHELP_ERROR.

procedure cmdExit(var Msg: TMessage); virtual ID_FIRST + CMD_EXIT;

Commands the programming environment to unload itself and terminates the ST_OOP program.

destructor Done; virtual;

Disposes allocated memory by calling Task.Done and TaskText.Done, then calls parents Done.

Private member variables

m_Resources: TResourceString;

Utility for error message management. See TResourceString.

m_pTask: pAssignment;

Utility for assignment management. See TAssignment.

m_hwndProgEnv: HWND;

Programming environments main window handle. This is used, when ST_OOP sends commands to the programming environment.

m_pTaskText: pTaskText;

Pointer to assignment text control. Needed when we must replace the instructions with a new tasks instructions.

Private methods

None.

See also:

Global variables and data structures.


TAssignment(TObject)
3.3.3 TAssignment(TObject)

This class is used to manage assignments.

Public member variables

None.

Public methods

constructor Init(FName: string);

FName is the name of the initialization file as given in the command line. Function saves this and reads KEY_TEXT and KEY_PROG entries from SEC_PROG section of the initialization file. If KEY_PROG entry could not be found, function sets m_AssignmentFileError flag to true, otherwise it retrieves information of the first task of the current class from the initialization file.

function IsAssignmentFileError: boolean;

Returns true if something went wrong when reading the initialization file.

function MoveNext: boolean;

Sets next assignment as current, i.e. retrieves information of the next task of the current class from the initialization file. Returns true, if successful and false, if there are no more tasks.

function MovePrev: boolean;

Similar to MoveNext, but sets previous assignment as current.

function GetAssignment: PChar;

Returns current assignment file (path & name).

function GetProgram: PChar;

Returns current program file (path & name).

function GetTexts: PChar;

Returns texts and examples help file (path & name).

function GetProgEnv: PChar;

Returns programming environment file (path & name).

procedure SetClass(ClassNbr: integer);

Sets current class to ClassNbr.

function GetAssignmentFile: PChar;

Returns initialization file (path & name).

Private member variables

m_AssignmentFile: array [0..MAX_STR_LEN] of char;

This is the name and location of the initialization file and comes from command line. Example:  c:\st\st_oop.ini.

m_TextsAndExamples: array [0..MAX_STR_LEN] of char;

Name and location of file, that contains theoretical explanations. Example: c:\bp\bin\bpw.hlp.

m_ProgrammingEnv: array [0..MAX_STR_LEN] of char;

Name and location of the programming environment. Example: c:\bp\bin\bpw.exe.

m_AssignmentFileError: boolean;

True, if invalid assignment file, otherwise false.

m_ClassID: array [0..MAX_STR_LEN] of char;

Assignment class key currently in use, e.g. CLASS1.

m_Assignment: array [0..MAX_STR_LEN] of char;

Current assignment file (in current class) name and location.

m_AssignmentID: integer;

Current assignment number.

m_AssignmentCount: integer;

Number of assignments in this class.

m_Prog: array [0..MAX_STR_LEN] of char;

Current program file name and location.

Private methods

function GetCurr: boolean;

Reads current assignment information (assignment and program file names and locations) from the initialization file.

See also:

Global variables and data structures.


TTaskText(TEdit)
3.3.4 TTaskText(TEdit)

This is a class for ST_OOPs main window assignment text edit control management.

Public member variables

None.

Public methods

procedure ReplaceTextWith(Assignment: PChar);

This procedure reads the passed (current) assignment file from disk and replaces edit controls text with it. If text length exeeds LEN_TASK_TEXT, it is truncated.

Private member variables

None.

Private methods

None.

See also:

Global variables and data structures.


TResourceString(TObject)
3.3.5 TResourceString(TObject)

This is an utility class for reading a string from a resource file.

Public member variables

None.

Public methods

function Get(ID: integer; default: string): PChar;

Reads a string with resource identifier ID from a current programs resource file string table. Returns that string or default, if the string with identifier ID could not be found.

Private member variables

m_Str: array [0..MAX_STR_LEN] of char;

Temporary storage for the string. Each time Get-method is executed, it overwrites the old value of m_Str.

Private methods

None.

See also:

Global variables and data structures.


Further development
3.4 Further development

User-interface testing will certainly bring up several features that need to be improved. However, here are some suggestions, that came to my mind:

Geometry management.

ST_OOPs main window is now of fixed size; it could be sizeable, in which case also the controls, i.e. assignment text box and command buttons should adjust their size and location, when user adjusts the size of the window.

Default window sizing.

By default, ST_OOP could adjust itself and instruct the programming environment so that the windows cover the screen nicely, for example ST_OOP could cover the top third of the screen while the programming environment covers the lower two-thirds. This should happen even if the screen resolution changes. When the program terminates, the current settings could be saved for the future, if the trainee so wishes.

Saving the current situation.

When terminating, ST_OOP could save the current situation. When the trainee next time starts the program, it loads the saved situation, that is, the assignment that was under the trainees inspection previously.

Improved efficiency.

ST_OOP could read the information of the current class (assignment and program file locations and names) into the main memory at once by start-up, or whenever the user changes class. This could be more efficient with large initialisation files, that is when the number of assignments is growing. Secondly, in this case there is no need for contiguous numbering, total count of tasks is enough.


Test cases
4. Test cases

T1	Start-up.

1-1	Initialisation file not given in the command line => program terminates with an error message.

1-2	Invalid initialisation file path in the command line => program terminates with an error message.

1-3	ProgrammingEnv entry missing => program terminates with an error message.

1-4	TextsAndExamples entry missing => program starts OK, but an attempt to access help leads to an error message from Windows help engine.

1-5	Class entry missing => program starts OK, uses Class1 as default.

1-6	Classes-section missing => program starts OK.

1-7	No Class<n> section(s) => program starts OK, but no assignments are available.

1-8	The Borland Pascal programming environment is already open => ST_OOP starts OK, but it gains no control over the programming environment and pressing, for example, Next or Previous button causes more or less unpredictable results.

1-9	The Notepad programming environment is already open => ST_OOP starts OK and a new instance of Notepad is created.

T2	Quitting. This test group must be run separately with each programming environment.

2-1	Pressing Exit-button => programming environment quits, ST_OOP quits and Windows help engine quits (if it was open).

2-2	Pressing Alt+F4 (or selecting Close from ST_OOPs system menu) => only ST_OOP quits, the programming environment (and the help engine) stays.

2-3	Quitting the programming environment separately leaves ST_OOP still open. However, it will not re-load the programming environment, if Next or Previous buttons are pressed.

T3	Functions. This test group must be run separately with each programming environment.

3-1	Current task is the first task in the current class. Press Previous-button => message, no movement.

3-2	No more tasks in the current class. Press Next-button => message, no movement.

3-3	Tasks still left => Next or Previous button yields to corresponding movement: assignment text changed, new program file loads into the programming environment. (If the old program was modified, the programming environment asks, whether the file should be saved.)

3-4	Assignment text length > 4096 => program truncates the text.

3-5	Help button causes Windows help engine to appear. If the TextsAndExamples entry in the initialisation file is valid, the help texts will be shown. If not, the help engine displays an error message.


Document history

9.8.1995 Ossi Ylijoki

-	1st version

10.8.1995 Ossi Ylijoki

-	added 2.5.5, 2.5.6, 2.5.7

11.8.1995 Ossi Ylijoki

-	test report 110895-1 corrections done