THE SOFTWARE ENGINEERING APPRENTICE :
                                  A NEW LABORATORY APPROACH TO ADA INSTRUCTION


                                            A PROPOSAL TO DISA/AJPO

                                           IN RESPONSE TO BAA 94-01.

                                                Dr. John Dalbey
                                               Dr. S. Ron Oliver

                                     Cal Poly Computer Science Department
                                              TABLE OF CONTENTS

Section

B        PROJECT DESCRIPTION . . . . . . . . . . . . . . . . . . . . . . . . 3

C        SUMMARY OF INNOVATIVE CLAIMS  . . . . . . . . . . . . . . . . . . . 9

D        SCHEDULE AND MILESTONES . . . . . . . . . . . . . . . . . . . . . .11

E        FACILITIES AND QUALIFICATIONS OF KEY PERSONNEL. . . . . . . . . . .12

F        BUDGET. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13

G        APPENDIX:  
         "A Software Development Process Laboratory for CS1 and CS2" . . .14

                                            B. PROJECT DESCRIPTION 

     This category 2 proposal describes an instructional innovation
for use in a Fundamentals of Computer Science course sequence. 
The project is to create a series of sophisticated "case studies"
in Ada programming.  The case studies embody a software
engineering approach to software development.  Programming
exercises for students require working with specifications,
design, and source code for existing, functioning applications.  

1. STATEMENT OF WORK

Goals 
     The goal of this work is to provide instruction during the
formative introductory courses which facilitates a deep
understanding of the Ada language and which demonstrates the
value of software engineering methods.  Students will be more
likely to assimilate software engineering methods and principles
during subsequent undergraduate coursework.  Graduates will then
be better equipped with software engineering skills to
effectively participate in modern software development efforts. 

Scope
     We intend to create four "case study" style instructional
units to be used as laboratory activities in introductory
computer science courses.  We are not proposing to teach software
engineering at the introductory level.  We do propose to give
students Ada source code for working systems that exhibit
software engineering principles.  The case studies to be used
will be much more comprehensive ("large") than those normally
used in introductory courses.  The development of these case
studies and related exercises is the major work effort.


Technical approach
     The typical first course in computer science is organized
around the "features" of a programming language, perhaps
augmented with a cursory discussion of problem solving
techniques.  The pedagogy of presenting small, unrealistic
programs in order to demonstrate a language feature has the
consequence of instilling a "programming in the small" mentality. 
Even contemporary Ada textbooks fall into this traditional
paradigm.  The inadequacy of the traditional approach to prepare
students for the realities of the software development industry
has been much discussed among computer science educators (for
example, HILB93, PATI93, PAXT93, referenced in the attached
paper). 
     The approach we propose to achieve our stated goal is to
create an innovative laboratory curriculum for introductory
computer science courses which focuses on "programming in the
large."  Our approach is based on a software engineering
paradigm, a simplified waterfall model.  The framework for the
laboratory curriculum will be the software development process. 
The organizing principles will be methods of software
engineering.  Language features are incorporated in the material
to be used or developed for the process-oriented exercises.  This
is in contrast to the more traditional approach where language
feature topics are the framework for designing exercises, and
software engineering principles tend to be presented as secondary
issues.
     Our pedagogy will be based on an "apprentice" model of
learning rather than more formal and traditional academic models.
In the formal model language features are introduced one at a
time.  When a feature is introduced the rules for its use are
described, and then a simple example built around that feature is
presented.  In the apprentice model students are given tasks
which are typical of those in a real software development
environment - code verification, modification, and enhancement. 
They will encounter actual examples of language features in a
working context, not just a syntax diagram or other abstract
description.  The tasks students perform will be more than
arbitrary exercises, they will be relevant to a tangible and
meaningful goal.
     The key to implementing this new approach is the development
of a series of student exercises which revolve around sample
software applications or case studies.   As opposed to the small
"throwaway" programming assignments typical in an introductory
class, we intend to provide students with large existing
functioning applications. We have several criteria for selecting
(or developing) the software applications which will serve as the
focus of instruction:

     1)         They be written in Ada.  This is essential since the
                Computer Science Department at Cal Poly is committed to
                using Ada for the introductory course sequence (and has
                been since 1990).  Coding must follow the standards in
                "Ada Quality and Style: Guidelines for Professional
                Programmers" (Van Nostrand Reinhold, 1989).

     2)         They are larger than the typical introductory
                assignment.  We envision 1000 to 5000 lines of code per
                case study.

     3)         They do not require extensive domain specific
                knowledge.  Suitable domain independent applications
                might include games or graphic applications.  It is
                critical that students understand the purpose and
                context of the programs immediately, so they may focus
                on the objectives of the exercises.

     4)         They have motivational appeal and relevance for
                students.

     5)         Explicit specification and design documentation is
                available which follows a recognized design methodology
                to which the students will be exposed in upper division
                courses.

     6)         They provide opportunities to illustrate the subset of
                Ada language features which are to be learned in the
                introductory courses.  They should be designed to
                accomodate new features of Ada 9X which we will be
                teaching as soon as suitable development environments
                become available.

     The case studies and exercises developed will be organized as
laboratory exercises to accompany any of a number of existing
text books.  By rendering a laboratory component to augment
existing texts, we are increasing the likelihood of adoption,
since the materials do not demand the abandonment of existing
instructional materials for lectures, etc. (The laboratory
component could even be adopted for introductory courses not
based on Ada, simply by re-coding the case studies.) 
     The case studies and exercises will be used by the authors and
others on the faculty who teach our Fundamentals of Computer
Science courses.  A prototype case study has already been tested
in the Fundamentals 1 course.  The completed materials will be
used in the laboratory component of both Fundamentals 1 and 2,
beginning Fall 1994.  At a later date an experimental course will
be offered in which the new materials will be fully integrated
into both lecture and laboratory components of the introductory
course sequence.
     To guarantee the adoption of these materials, the department
head, Dr. Jim Beug, has committed to participate in this grant to
facilitate the integration of the materials into the curriculum. 
Additionally, we have obtained the support of the curriculum
coordinator of the departments "core" courses. 


Specific tasks and time frame

     a.     Search for existing projects which could be adapted (from
            within the university, in software repositories, industry
            contacts, and professional publications).  (3 weeks)

     b.          Write outline of projects. (3 weeks)

     c.          Write project specifications. (3 weeks)

     d.          Design the application(s) and write test plans. (5
                 weeks)

     e.          Implement and test source code. (5 weeks)

     f.          Write student exercises and instructions. (4 weeks)
     g.          Write solutions to exercises and instructor notes. (3
                 weeks)


2.       SUMMARY OF ANTICIPATED RESULTS, PRODUCTS, AND TRANSFERABLE
         TECHNOLOGY

     a.          Four sets of student exercises and instructions which
                 can be immediately adopted for use in the introductory
                 programming course sequence using Ada.

     b.          The project specifications, design, and source code on
                 which the student exercises focus.

     c.          Solutions to the exercises and instructor notes.

     All products will be in plain ASCII text ready to disseminate
     via traditional or electronic means.

     As these materials will be incorporated into Cal Poly courses,
we intend to perform both qualitative and quantitative evaluation
of their impact.  (Note that no funding for evaluation is being
sought in this proposal).  We plan to present the materials and
the results of their preliminary evaluation at the SIGCSE'95 (and
other) technical symposia.



3. PROPRIETARY CLAIMS AND SUPPORTING ARTIFACTS

     a.  We make no proprietary claims to the results.

     b.          Access to an Ada compiler is necessary to use our
                 results.


4. PROTOTYPE MATERIALS

     A prototype of the instructional materials being proposed is
currently being tested in the department's introductory
programming course.  The case study is a "moon lander"
simulation.  The application simulates in a very simple way a
space ship landing on the moon.  The simulation begins with the
ship 10000km above the surface. Gravity will naturally pull the
rocket down to the surface and one must fire the engines (burn
fuel) to keep from becoming another crater.  The user enters a
value for how much fuel to burn.  The goal is to land on the
surface at a slow enough speed to not crash the lander. A text
display shows the current status of the lander:

 TIME   FUEL       ALTITUDE    VELOCITY      DELTA_V   DELTA_ALT    BURN
    0   5000          10000           0          0.0         0.0       0
   10   5000           9880         -24        -24.0       -120.0     10
   20   4900           9571         -38        -13.9       -309.5      0
     ... and so on.


The materials supplied to students are:

     1.  The project specification ( 2 pages).
     2.  The software design ( 2 pages of psuedocode).
     3.  The Ada source code ( 200 lines).
     4.  A list of 19 enhancements we desire to make to the
program.

The assignments given to students are:

     1.     Verify that the simulation performs according to the
            specification.  Write a report summarizing the results of
            testing.  (There are a number of "bugs" intentionally
            left in the source code for students to "discover.")

     2.     Determine the changes to the source code necessary for
            each enhancement in the list provided.  Modify the source
            code, compile it, and perform verification that the
            simulation functions properly. 

Some of the enhancements students must perform are:

     1.     Adjust the formatting of the output so the columns are
            evenly spaced across the screen.

     2.     Change the crash message to a message of your choice.

     3.     Add a message to display the lander's velocity when it
            touches down at the surface.  Something like "Speed at
            impact was ..."

     4.     After displaying the instructions, prompt the user to
            enter their name.  Then in the analysis, preface the
            results with a message "Touchdown, Captain  (name)  ."

     5.     Prevent the column headers from scrolling off the top of
            the screen by using procedures provided in a prewritten
            Ada package.  

     6.     Add another abort condition:  If velocity exceeds 300
            (either positive or negative) then the lander breaks
            apart and you die.

     7.     Fix a bug which currently allows fuel remaining to go
            negative.  Don't allow the fuel to go below zero.  If the
            user enters a value which results in negative fuel, set
            it to zero.

     8.     Add a "thrust limiter" feature to prevent you from
            accelerating too fast and you being crushed by g-forces. 
            If the user enters a burn > 100, display "Burn too high,
            auto thrust limiters engaged" and proceed with the
            computations using a burn of 100.

     9.     Add a "fuel low" warning message.  This message should be
            displayed at each iteration if the fuel remaining is less
            than 500.  When the fuel is gone, change the warning to
            an appropriate "out of fuel" message.

     10.    Alter the status display so instead of showing a single
            value for velocity, we show two columns for SPEED and
            DIRECTION.  

     11.    Add more sophistication to the crash analysis procedure. 
            For example, depending on speed at impact, there might be
            different messages for "You made a new moon crater,"
            "lander and crew destroyed," "survived, but major damage
            to craft," "minor damage," "bumpy but safe landing," and
            "perfect."

                                        C. SUMMARY OF INNOVATIVE CLAIMS

     The key innovation of this work is the emphasis on
"programming in the large."  In the traditional course, students
write tiny, "disposable" programs which illustrate specific
language features.  This "programming in the small" approach is
inconsistent with the contemporary world of software development
where most projects are large undertakings.
     Almost all introductory curricula are oriented around
particular language features (e.g. FOR, IF, WHILE, etc) and the
assignments focus on developing student's skills with these
features.  Our innovation is to build the curriculum around
software engineering methods (Specification, Analysis, Design,
Verification, etc).  Ada's language features will be presented
within that larger context, thus making more apparent the
advantages Ada offers to the software designer. 
     Another ramification of the "programming in the large" focus
is that the instructional exercises will be based on an
"apprentice" model of learning, in which students are given small
but meaningful tasks in a large and realistic context.  
     The advantages that our innovations offer are that students
will spend time reading and comprehending pre-existing code, they
will see examples of good design and documentation, they will see
relevant and meaningful application of the language features they
are studying, they will be forced to consider how to adapt their
solution to a pre-existing framework.  By implication they will
understand the importance of writing code that can be easily
reused or modified by others.
     These claims, and the merits described in the next section,
are further elaborated in the attached paper "A Software
Development Process Laboratory Component for CS1 and CS2," which
was presented at the SIGCSE94 conference.


1. RATIONALE 

     The assignments in a traditional first course are usually so
small that there is no need for a "software engineering"
approach.  For the simple assignments a trial and error, "hacker"
mentality will often succeed.   The crucial  dimension of the
work being proposed is that the applications which students study
are not trivial, and they will be clearly "engineered."  The
relevance of a software engineering model of software development
is more obvious and can be explicitly discussed in a meaningful
context.
     Traditional programming assignments often seem irrelevant to
students because they are artificial, contrived to focus on a
particular language feature.  The "apprentice" model we are
following shows students a tangible and realistic context for
what they are learning and gives them a chance to perform "real"
tasks in a meaningful setting.
     The case studies which students will investigate will follow
established coding and documentation standards.  These models of
good coding practices will offer more exemplary exposure to
software than that provided by typical textbook examples. 
Software reuse, which is increasingly viewed as essential for the
success of the software industry, will be explicitly modeled, in
different ways, in most of the exercises being developed. 
     Typical programming assignments of 100 lines or less promote
the notion that programming is an individual effort.  The large
case studies we develop will be too substantial for an individual
beginning student to consider undertaking alone.  While the
exercises may or may not explicitly demand a team solution, the
pre-existing application can be thought of as authored by
"invisible" team members.   Students will naturally see the need
for working in teams, and will adopt related habits early during
their undergraduate experience.


2. UTILITY AND RELEVANCE

     The work proposed will be immediately applicable in our
Fundamentals of Computing and Data Structures courses.  Some or
all of the case studies could be chosen by a particular
instructor for discussion.   Student exercises could be selected
from those we develop at the discretion of the instructor.  The
"modular" design of our materials makes them flexible and easily
adapted by instructors with differing styles.
     Upon occasion the introductory computer science course may
be taught by a lecturer, graduate student, or visiting scholar
who is somewhat deficient in software engineering experience or
Ada language skills.  The instructional materials we develop,
being comprehensive and self-contained case studies, can easily
be used by even inexperienced teachers.
     The materials produced by this grant can be adapted in whole
or in part with no change by other academic institutions or
industrial trainers.  Cal Poly has excellent relationships with
several industrial partners including Tandem, HP, ESL, and
others.  Our materials could be adopted by any of these firms for
in-house Ada training. 
     The underlying instructional model demonstrates a significant
innovation in computer science instruction. The model can serve
as a valuable guide for instructional development even if the
specific software projects are changed to something targeted for
a particular student audience.  For example, industrial trainers
using our model could build case studies from actual software
products their company has developed.  

                                         D. SCHEDULE AND MILESTONES

     a.          Search for existing projects which could be adapted
                 (from within the university, in software repositories,
                 industry contacts, and professional publications). 
                 (1/2/95 - 1/22/95)

     b.          Write outline of projects.  (1/23/95 - 2/12/95)

     c.          Write project specifications.  (2/13/95 - 3/5/95)

     d.          Design the application(s) and write test plans. (3/6/95
                 - 4/9/95)

     e.          Implement and test source code. (4/10/95 - 5/14/95)

     f.          Write student exercises and instructions.  (5/15/95 -
                 6/11/95)

     g.          Write solutions to exercises and instructor notes. 
                 (6/12/95 - 6/30/95)

     Due to department course scheduling constraints, the above
     schedule may be delayed in the event the grant is awarded
     after December 1, 1994.

PERSONNEL
     Dr. John Dalbey, Principal Investigator, has been a computer
science educator and consultant to the computer industry for 15
years.  Dr. Dalbey will be serving as coordinator and major
developer on this grant.  He will be the chief software designer,
instructional designer, and evaluator, contributing 3 person-
months of effort.

     Dr. S. Ron Oliver has more than 25 years experience as a
professional computer scientist, including 8 years teaching in
the university environment.  His industrial experience includes
an equal mix of commercial and aerospace experience.  Dr.
Oliver's efforts on the project as co-PI and software designer
will be at the level of 1 person-month. 

     Dr. Jim Beug is currently the head of the Computer Science
Department at Cal Poly.  He will be assisting with integrating
the results of the project into the department's courses.  His
contribution to the project will be .2 person-month. 

     A graduate student from the department will be employed as a
programmer to implement and test the applications which are
developed for the case studies.  This effort required of this
position will be 1 person-month.                                  E. FACILITIES AND QUALIFICATIONS OF KEY PERSONNEL

Dr. John Dalbey, Ph.D. Science and Math Education, UC Berkeley, 1986.
     Dr. Dalbey's doctoral work focused on research to improve
instruction in computer science.  He has taught both lower division
computer science courses and the upper division software engineering
course sequence.  He is the developer of "Spider Draw," an innovative
instructional simulation distributed with the GW-Ada compiler.  He is
the author of Spider Graphics workbook, a set of laboratory exercises
for introductory Ada programming courses. He developed prototype
materials for this grant which are currently being evaluated in CSc
118.

Dr. S. Ron Oliver, Ph.D. Computer Science, Colorado State University,
1988.
     Dr. Oliver teaches Software Engineering, both at the graduate and
undergraduate level. He also teaches introductory computer science
courses.  While on sabbatical leave during the 93-94 academic year,
Dr. Oliver is writing a text book in Software Engineering with Object
Oriented Methods and consulting with Electronics Systems Laboratories
(ESL).  His consulting assignments include developing a curriculum
and several courses in Software Engineering for the ESL Software
Engineering Directorate and supporting an IR&D project in
Megaprogramming.
     During the past five years Dr. Oliver has directed three applied
research projects using Object Oriented methods and Ada, and he also
participated in a research project using Object Oriented methods and
C++.  Three of these four projects were funded by industry as a
result of grant proposals written by Dr. Oliver.  The fourth project,
Object Oriented, Animated Simulation of a Traffic Light Control
System in Ada, was developed initially as a Class Project, and
subsequently as Senior and Master's projects.  

                                                RELEVANT PUBLICATIONS
Dalbey, J. (1993). An introductory Ada curriculum based on a graphics
     package. Proceedings of the seventh annual ASEET Symposium,
     January 13-14.
Dalbey, J. (1993). Spider Graphics workbook. El Corral publishers.
Dalbey, J. (1992). Spider Draw (computer software).  
Oliver, R. & Dalbey, J. A Software Development Process Laboratory
     Component for CS1 and CS2, to be presented at SIGCSE94.
Oliver, R.,  Quady, S., Teyssier, L., & Rollins, E. (1990).
     Distributed Flight Simulation with Ada, Cal Poly Tech. Report No.
     CPSLO-CSC-09-01.
Oliver, R. (1993). Communication System Modeling and Simulation, Cal
     Poly Tech. Report No. CPSLO-CSC-93-03.
           
                                                     FACILITIES
The computing facilities to be used for software development are
located in The Computer Systems Laboratory (CSL), operated by the
Computer Science Department at Cal Poly.  Specifically, Ada program
development will be done on PC-compatible microcomputers and Sun and
Hewlett-Packard Unix workstations equipped with Meridian and Alsys
Ada compilers.

                                                      F. BUDGET
                                                   G. APPENDIX