Production test program with Authorware

zhaozj2021-02-16  33

Production test program with Authorware

Text / Map Gestior Authorware is a very excellent multimedia development tool, although the current multimedia development tool is endless, but Authorware is very easy to learn, powerful, no need for too much programming, is very strong. Multimedia products, in the multimedia development of teaching applications, are deeply loved by educators. The test procedure made with Authorware, although it is not a professional exam software, but it is simple, easy to operate, no software operation training, no need to spend a fund to buy or make a special exam system, in teaching work There is a great value. This article will be explained by examples to help you gradually master the entire process of the Authorware production test procedure. Here you ask you to have a considerable understanding of Authorware because this article uses more authorware's functions, and does not explain the details of Authorware made. Let's enter the topic, our instance explains a "primary middle school microcomputer test system" production process, the interface after running is shown in Figure 1, Figure 2, Figure 3. One,

Program analysis

The object of the exam is a student facing junior high school, because the academic system used in all parts is different, so the program structure is different. This program uses five or four systems, junior high schools for four school years, the example program has four modules, each of the school years is a module, click on the corresponding school year to enter each module, each module will have three branches, respectively: answer , Check, and pay. Here is the specific work of each branch. Please bind to Figure 1 - Figure 10 understands this procedure.

1, the answer part, also the core part, consider Authorware itself, because it is not very strong on the reading and writing ability of the file, so the example program uses a plain text file to store test questions and answers, the form of the test questions and judgment questions, this example program The choice is a single-choice question, and the entire program structure will be large if you adopt a number of options. Click on the answer button to enter the answer section, first make a single-choice question, then the judgment question, the specific work must be done, read the test file and display (including test questions and options) Each option corresponds to a button, buttons implemented : Read the next test questions and options and write the answers to the previous test questions into the temporary answer file (each question is a line), if there is a multi-person test, then when the next exam, this file is covered, There is an answer button to terminate the answer at any time. If you are a number of options, you need to make a button, implement the function to read the next test, the option button only the function of writing the answer. The functionality of the entire answering section has been implemented. 2. The inspection section only implements the browsing of the test questions, but does not provide a modified function. You can browse the questions before answering. The program is required to maintain the unity, consistency of the test questions and answers when reading the test questions and temporary answer files. 3, the delivery part should implement the automatic score function, requiring the answer in advance, and the answer to each question is a line, stored as a standard answer file. The number of test questions should be matched to the score. The example program is a problem of 30 questions, and the question 20 is a total of 50 questions. Each question is 100 points, and the number of test questions can be determined according to the actual situation. It is advocated to have a number of choices. There are few questions, which is more realistic. The program implements the standard answer file and the read and judgment of the temporary answer file. If the same score is added 2, the total score is finally displayed, the program exits. From the structure and process of the entire program, we have been analyzed, and I believe that everyone has an overview of this procedure. Here, we can add a test time in the start of the program, in the basic unit, define a variable save total time, minus one minute variable value, read the next question in the answer sheet At the same time, the variable value is judged, if the value exits and points to the zero program. Second, the program production is not described in detail by the production process of the sect, background and adding various icons. This article only discusses a detailed discussion on the role of variables and functions in the computing icon, and what you need to pay attention to during the production process. Before the production, the test file format will be described to better understand this procedure. Question content: First of all, the choice questions, each question is a line, each title is a line, the following is the judgment question, each entitled line, in the choice questions and judgment questions, it is empty, and finally a line prompt text, prompt answer complete.

(1) Program main

The program trunk mainly includes: background, prompt text, start button, and exit button, as shown in Figure 4. The exit button is mainly a few display icons (copyright information, etc.) and a computing icon (real program exit), the contents of the calculation icon are: quit (0). In the start button is the four modules of this program, the content button content is shown in Figure 5. The calculation icon of "Defining Variables and Assignment" is labeled in the figure, which is: Define variables used by each module and assigns the first value, the content is as follows (in / * ... * /), the following class Same: Number: = 1 / * Recording test line number * / number * / numbera: = 0 / * Record the number of answers * / lin: = 0 / * Use the variable used when reading the file * / line: = 0 / * Variables used when reading files * / file: = 0 / * Use of variables used when reading files * / xzt: = 0 / * Storage test content variable * / xzda: = 0 / * Storage option option variable * / ( 2) The four major modules of the four modules, each module is a school year, this article is only used in the first school year, and the other academic year and its production process are the same, but the file name when reading and writing files, making corresponding modifications That is, as shown in Fig. 6. In the figure, the "Write Temporary Answer File" is labeled, the function is to write an empty file, record the answer to the answer, the contents of the compute icon are as follows:

WC: = "" / * Define the temporary variable value * / writeextfile (filelocation ^ "tiku // daan.txt", wc) / * use functions, write answer questions answer file, file write Tiku directory, file name Daan.txt content is empty * / tihao: = 1 / * Defines the topic number variable, used to record the topic number * / each large module, there are three branches, and the following discussion work. 1, answer branch

The answer is the most complicated, more content that needs to be made, as shown in Figure 7. The calculation icon of "reading the first test question" is to read the first test. If you do not join this icon, the program will not display properly when the program enters the answer interface, the content is as follows: file: = readextfile (filelocation ^ "Tiku // Shiti1.txt") / * Read the shiti1.txt file under Tiku directory to file variable * / if file = "" "" = "No title" / * Judging the file variable, display "No title "* / Else / * If it is not empty, do the following procedure * / number: = 1 / * The first number of questions * / numbera: = 2 / * The first choice of the number of lines * / line: = GetLine (file, number) Lin: = getLine (file, number) xzt: = getLine (line, 1, 1, return) / * Read selection Question to variable xzt * / xzda: = getLine (lin, 1, 1 , Return) / * Read option assignment to variable xzda * / end if / * judgment end * /

The reading of the test questions is now, but it is still not available. Question Display Production Process: Double-click on the interactive icon of "Select Questions" as shown in Figure 7, in the interface, use text tools to add two lines of content: {xzt} and {xzda}. {xzt} is used to display the selected questions, {xzda} is used to display options, and it can be displayed normally, as shown in Figure 8. When making a judgment, only {xzda} can only be removed, using only variable {xzt} to complete the display of the test questions. Read the work of the next question is completed by the four option buttons. This article describes how to read the next test with the button, the other button production process is the same, just written to the temporary answer file. Characters are different. Add a computing icon to the group icon of the letter "a", the content is as follows: appendextfile (filelocation ^ "tiku // daan.txt", Tihao ^ "^ return) / * Take the topic number and letters" a " Write a temporary answer file in tiku directory DAAN.TXT * / file: = readextFile (filelocation ^ "tiku // shiti1.txt") if file = "" THEN XZT: = "No title" Else Tihao: = Tihao 1 / * The title plus 1 * / number: = Number 2 / * Select the number of banks plus 2 * / numbera: = Numbera 2 / * Option line number plus 2 * / line: = get, Number) lin: = GetLine (file, number) xzt: = getLine (line, 1, 1, return) / * Read the next topic to the variable xzt * / xzda: = getLine (lin, 1, 1, return) / * read An option to assign the variable xzda * / end if if xzt = "" "" "" "If the selected question is end, if the following statement is completed * / Tihao: = Tihao-1 / * topic minus 1 * / appendextfile (filelocation ^ "Tiku // DAAN.TXT", "Below is the judgment" ^ Return) / * Writing the character "below is the judgment question", the role is to give the prompt * / goto (iconid @ "when executing the check. Erase Background ") / * Jump out of the choice to enter the judgment question * / END IF" The answer "button role is to end this interaction and enter the judgment question. The calculation icon content of the "variable assignment" in Figure 7 is: Number: = 62 / * The first line of the first judgment question, this example is 30, plus the option to a total of 60 lines, plus two lines The calculation icon contents of the "Reading Judgment question" in the seventh line * / Figure 7 are as follows: Tihao: = Tihao 1 / * topic number plus 1 * /

Number: = Number 1 / * First Judgment Question * /

Line: = getLine (file, number)

xzt: = getLine (Line, 1, 1, Return) / * Read Judgment Questions to Variable XZT * /

The reading of the next question is done by "correct" and "error" two buttons. Add a computing icon in the group icon of the Correct button: appendextfile (filelocation ^ "tiku // daan.txt", Tihao ^ "A" ^ return) / * written to the topic number in the temporary answer file and Character "a" * /

Goto (Iconid @ "Read Judgment") / * Jump to "Read Judgment Questions" computing icon to achieve the reading of the next judgment question * /

"Correct" and "Error" two buttons are basically the same, just "correct" button to write characters "a" in the file to indicate the correct, "Error" button to write characters "b" in the file to indicate error. 2,

Check branch

Checking branches only implement file readings, better creation, as shown in Figure Nine. The contents of the computing icon labeled "Reading Test" in the figure are as follows:

File: = readextFile (filelocation ^ "tiku // shiti1.txt")

File1: = readextfile (filelocation ^ "tiku // daan.txt") / * Read temporary answer file * /

IF file = "" "

XZT: = "No title"

Else

Number: = 1 / * The number of rows of the first choice * /

Numbera: = 2 / * The number of rows of the first selection questions * /

Tihao: = 1

Line: = getLine (file, number)

Lin: = getLine (file, numbera)

Tihao1: = getLine (file1, tihao)

XZT: = Getline (Line, 1, 1, Return)

xzda: = getLine (lin, 1, 1, return)

Tihaox: = getLine (Tihao1, 1, 1, Return) / * Read the answers to the temporary answer file to assign the variable Tihaox * /

END IF

Add a computing icon in the group icon of the next question, as follows:

If TIHAO> 31 THEN / * Judgment is a judgment question, if you do the following statement * /

Tihao: = Tihao 1

Number: = Number 1

Tihao1: = getLine (file1, tihao)

Line: = getLine (file, number)

XZT: = Getline (Line, 1, 1, Return)

Xzda: = "" / * This variable is the display of the selected questions, here is empty * /

Tihaox: = getLine (Tihao1, 1, 1, Return)

ELSE / * The following is the * /

Tihao: = Tihao 1

Number: = Number 2

Numbera: = NUMBERA 2

Tihao1: = getLine (file1, tihao)

Line: = getLine (file, number)

Lin: = getLine (file, numbera)

XZT: = Getline (Line, 1, 1, Return)

xzda: = getLine (lin, 1, 1, return)

Tihaox: = getLine (Tihao1, 1, 1, Return)

END IF

3, payroll branch

The branch of the delivery is mainly realized. The statistical results are mainly compared by the content of the standard answer file and the content of the temporary answer file. If the answer is the same, the score is accumulated. The production process of the branch branch is shown in Figure 10. The most important one is the "statistical grade" calculation icon, which is as follows:

Number: = 0

Numbera: = 0

Line: = 0

lin: = 0

Tihao44: = 0 / * Use it to record scores * /

XZT: = 0

XZDA: = 0 / * All variables are cleared * /

I: = 1 / * Define count variables * /

File1: = readextfile (filelocation ^ "tiku // daan.txt")

File2: = readextFile (filelocation ^ "tiku // bzda1.txt")

Repeat with i: = 1 To 51 / * The answer to the 50 topic is written, which includes a tint of "following the judgment question", so it is necessary to loop 51 times * / number: = Number 1

Numbera: = Numbera 1

Line: = getLine (file1, number)

Lin: = get11 (file2, numbera)

XZT: = Getline (Line, 1, 1, Return)

xzda: = getLine (lin, 1, 1, return)

IF xzt = xzda kil

Tihao44: = Tihao44 2 / * scores, 2 points per question * /

END IF

End repeat / * End cycle * /

At this point, we have completed the examprue, I believe that everyone can make their own test software under the guidance of program analysis and program production. If you need an example program to access http://lwcsoft.myrice.com, download it to the "Sparrow Nest" column.

http://lwcsoft.myrice.com 2003.9.14

转载请注明原文地址:https://www.9cbs.com/read-28006.html

New Post(0)