home *** CD-ROM | disk | FTP | other *** search
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- --SCORING.TXT
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- package SCORING is
- --***************************************************************
- --* package SCORING is *
- --* a demonstration of a possible use for the VIDEO tools *
- --* It allows users to create a CAI course complete with *
- --* rudimentary Scoring capability. This package is *
- --* accessed by the programs TOTAL, RIGHT and WRONG. It is *
- --* suggested that you use menus for questions, tying in *
- --* the program RIGHT for correct reponses(branches) and *
- --* WRONG for incorrect choices(branches). The program *
- --* TOTAL should be the last node in the linked list, and *
- --* will display to the user the number of correct, *
- --* incorrect reponses, and the number of tries. *
- --*
- --* Written by: Stephen J. Hyland
- --* For: AdaSoft, Inc.
- --* May, 1985
- --*
- --***************************************************************
-
- type VALUE is ( CORRECT, IN_CORRECT, TOTAL_IT );
- procedure SCORE ( ANSWER : in VALUE );
- end SCORING;
-
- with SEQUENTIAL_IO, TEXT_IO;
- package body SCORING is
- type SCORE_REC is
- record
- RIGHT_ANSWER : INTEGER := 0;
- WRONG_ANSWER : INTEGER := 0;
- TOTAL_TRIES : INTEGER := 0;
- end record;
-
- package IO is new SEQUENTIAL_IO ( SCORE_REC );
- use IO;
- SCORE_FILE : FILE_TYPE;
-
- procedure GET_OLD_SCORE ( OLD_SCORE : in out SCORE_REC ) is
- begin
- OPEN ( SCORE_FILE, IN_FILE, "SCORE.DAT" );
- READ ( SCORE_FILE, OLD_SCORE );
- CLOSE ( SCORE_FILE );
- exception
- when others =>
- CREATE ( SCORE_FILE, OUT_FILE, "SCORE.DAT" );
- WRITE ( SCORE_FILE, OLD_SCORE );
- CLOSE ( SCORE_FILE );
- end GET_OLD_SCORE;
-
- procedure UPDATE_SCORE ( NEW_SCORE : in out SCORE_REC ) is
- begin
- OPEN ( SCORE_FILE, OUT_FILE, "SCORE.DAT" );
- WRITE ( SCORE_FILE, NEW_SCORE );
- CLOSE (SCORE_FILE );
- end UPDATE_SCORE;
-
- procedure SCORE ( ANSWER : in VALUE ) is
- use TEXT_IO;
- MY_SCORE : SCORE_REC;
- begin
- GET_OLD_SCORE ( MY_SCORE );
- MY_SCORE.TOTAL_TRIES := MY_SCORE.TOTAL_TRIES + 1;
- case ANSWER is
- when CORRECT =>
- MY_SCORE.RIGHT_ANSWER := MY_SCORE.RIGHT_ANSWER + 1;
- PUT ( "CORRECT" );
- UPDATE_SCORE ( MY_SCORE );
- when IN_CORRECT =>
- MY_SCORE.WRONG_ANSWER := MY_SCORE.WRONG_ANSWER + 1;
- PUT ( "WRONG" );
- UPDATE_SCORE ( MY_SCORE );
- when TOTAL_IT =>
- MY_SCORE.RIGHT_ANSWER := MY_SCORE.RIGHT_ANSWER + 1;
- PUT_LINE ( "CORRECT" );
- PUT ( "You scored " & INTEGER'image(MY_SCORE.RIGHT_ANSWER) );
- if MY_SCORE.RIGHT_ANSWER = 1 then
- PUT ( " correct answer " );
- else
- PUT ( " correct answers " );
- end if;
- PUT ( " and " & INTEGER'image ( MY_SCORE.WRONG_ANSWER ) );
- if MY_SCORE.WRONG_ANSWER = 1 then
- PUT_LINE ( " wrong answer " );
- else
- PUT_LINE ( " wrong answers " );
- end if;
- PUT_LINE ( "Out of " & INTEGER'image ( MY_SCORE.TOTAL_TRIES ) &
- " tries." );
- OPEN ( SCORE_FILE, IO.IN_FILE, "SCORE.DAT" );
- DELETE ( SCORE_FILE );
- end case;
- end SCORE;
-
- end SCORING;
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- --WRONG.TXT
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- --***************************************************************
- --*
- --* Main Program: Wrong
- --* Written by: Stephen J. Hyland
- --* For: AdaSoft, Inc.
- --* May, 1985
- --*
- --* Used in the Video Demo. Please look at the header for the
- --* package Scoring.txt;
- --*
- --***************************************************************
-
- with SCORING; use SCORING;
- procedure WRONG is
- begin
- SCORE ( IN_CORRECT );
- end WRONG;
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- --RIGHT.TXT
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- --***************************************************************
- --*
- --* Main Program: Right
- --* Written by: Stephen J. Hyland
- --* For: AdaSoft, Inc.
- --* May, 1985
- --*
- --* Used in the Video Demo. Please look at the header for the
- --* package Scoring.txt;
- --*
- --***************************************************************
-
- with SCORING; use SCORING;
- procedure RIGHT is
- begin
- SCORE ( CORRECT );
- end RIGHT;
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- --TOTAL.TXT
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- --***************************************************************
- --*
- --* Main Program: Total
- --* Written by: Stephen J. Hyland
- --* For: AdaSoft, Inc.
- --* May, 1985
- --*
- --* Used in the Video Demo. Please look at the header for the
- --* package Scoring.txt;
- --*
- --***************************************************************
-
- with SCORING; use SCORING;
- procedure TOTAL is
- begin
- SCORE ( TOTAL_IT );
- end TOTAL;
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- --INST1.TXT
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- THE Ada PROGRAMMING LANGUAGE
-
- This is an interactive self-training program for the Ada language and
- it's associated concerns. The following commands will allow you to use this
- instructional course.
-
- <CR> - go on to the next page or menu
- </> - return to the previous menu or set of questions
- <1-15> select a topic or a multiple choice answer
-
- <T> - end the session
- <R> - return to this page
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- --INST2.TXT
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- THE SOFTWARE CRISIS
-
- The development of a single high order language for the Department of
- Defense was an extraordinary effort involving the coordination of literally
- hundreds of agencies in academia, industry, and the federal government. The
- magnitude of the effort was anticipated; nevertheless, it was done because
- there seemed to be no other alternative to the crisis which was developing
- in software for the weapons systems delivered to the Department of Defense
- in the early 70's.
-
- The so-called "software crisis" was caused by many diverse factors, but
- the result was obvious to Department of Defense planners. The quality of the
- software being delivered and maintained by the military services was hindering
- our capability to maintain the state-of-the-art in weapons systems and
- leaving the United States vulnerable to our potential adversaries.
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- --INST3.TXT
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- INCREASING DEMAND FOR SOFTWARE WITHIN THE DEPARTMENT OF DEFENSE
-
- The advent of sophisticated and powerful microprocessors in the late
- sixties and early seventies quickly led to smaller, more efficient, reliable
- and accurate weapons systems. Simultaneously, the Department of Defense was
- entrusting more and more of it's large scale information processing to
- Automated Data Processing.
-
- Major command and control systems were streamlined using the new
- technology, battlefield logistic systems were automated and ruggedized, and
- communications systems in all three of the military services were modernized.
- The demand for software to support these new Department of Defense systems
- grew rapidly.
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- --INST4.TXT
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- SUMMARY
-
- In summary, the DOD software crisis has it's roots in the increasing
- demand for sopisticated software for better weapons and information
- systems. This demand reached over $6 billion annually in the early 1980's,
- and is expected to grow considerably over the next decade. Presently, software
- comprises approximately 85% of the overall DOD expenditures for ADP.
-
- By far, the greatest software cost is now for software maintenance --
- modifying existing software to meet emerging military requirements; however
- the quality of new software is also of great concern to the DOD. Sophisticated
- software produced under the rigid time constraints of defense requirements
- has been characteristically late, and often failed to perform as advertised.
- Additionally, much of the new software proved to be difficult if not
- impossible to modify or rehost later in it's life cycle.
-
- Six fundamental weaknesses are at the heart of the software crisis, and
- continue to drive the price of acquisition up and the quality down -- a
- characteristic lack of: responsiveness, timeliness, reliabliity,
- transportability, modifiability, and efficiency.
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- --MENU1.TXT
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-
-
- THE Ada PROGRAMMING LANGUAGE
-
-
-
- <1> Study a Lesson
-
- <2> Reference a Concept
-
- <3> Review for Exam
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- --MENU2.TXT
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-
- THE Ada PROGRAMMING LANGUAGE
-
- Ada and the Department of Defense
-
- <1> THE SOFTWARE CRISIS
-
- <2> GOALS FOR SOFTWARE
-
- <3> PRINCIPLES FOR MODERN SOFTWARE ENGINEERING
-
- <4> HISTORY OF THE DEVELOPMENT OF Ada
-
- <5> GOVERNMENT REGULATIONS AND DIRECTIVES
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- --MENU3.TXT
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-
- THE SOFTWARE CRISIS
-
- <1> Increasing Demand for Software
- <2> Increasing Costs
- <3> Software Hardware Ratio
- <4> Software Maintenance Costs
- <5> Other Major Software Costs
- <6> Problems in Software Development
- <7> Other Life Cycle Problems
- <8> Problems with Quality
- <9> Language Proliferation
- <10> Summary
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- --MENU4.TXT
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- The software crisis was a result of the rapid growth of computer
- technology in many fields. The Department of Defense is the largest single
- user of software in the world. Select the answer which correctly explains
- the increasing demand for software in the Department of Defense.
-
- <1> Smaller weapons systems required more efficient software.
-
- <2> Larger applications required more powerful software.
-
- <3> More systms were being automated.
-
- <4> All of the above.
-
- <5> None of the above.
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- --MENU5.TXT
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- Select the most accurate statement concerning the software crisis.
-
- <1> Several fundamental weaknesses in software development are at the
- heart of the problem.
-
- <2> As more powerful and diverse high order languages are developed
- many of the problems are lessened.
-
- <3> As more powerful hardware is developed, software problems will
- continue to lessen.
-
- <4> All of the above.
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- --COMPDEMO.COM
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- $ada scoring,wrong,right,total
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- --DEMO.COM
- --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- $ set term/noecho
- $ create VIDEO.DAT
- [CONTR04]DEMO.DAT
- $ assign sys$command: sys$input
- $ trun video
- $ set term/echo
- $ delete VIDEO.DAT;*
- $ exit
-
-