ROOT Project: An Integration of an OOA/D Methodology

in the Computer Science Curriculum

 


Arturo I. Concepcion

Department of Computer Science

California State University, San Bernardino

San Bernardino, CA 92407 concep@csci.csusb.edu

Richard J. Botting

Department of Computer Science

California State University, San Bernardino

San Bernardino, CA 92407 dick@csci.csusb.edu

Darryl D. Scroggins

Department of Computer Science

California State University, San Bernardino

San Bernardino, CA 92407 dscroggi@csci.csusb.edu


Abstract

This paper reports on the Refashioning Object-Oriented Technology Teaching (ROOT) Project which was undertaken by the Department of Computer Science, California State University at San Bernardino, and Rational Software through the Software Engineering Education (SEED) Partnership in Fall 97.  The ROOT Project integrates an object-oriented analysis and design (OOA/D) methodology in the CS curriculum using the Unified Modeling Language (UML).   Instead of compressing the teaching of an OOA/D methodology in the traditional CS 1 and CS 2 courses, we integrated OOA/D in five lower and upper division courses.  By teaching the OOA/D methodology in an incremental manner, the students are not overwhelmed in learning the OOA/D methodology.  We have developed laboratory exercises and programming projects in the five identified lower and upper division courses which allow the students to apply the methodology before implementation.  After two years of the ROOT Project, we have observed a marked improvement on students understanding of the OO paradigm when they apply the OOA/D methodology to programming projects in their senior-level computer science courses.

 

Key Words:   Unified Modeling Language, Object-Oriented Paradigm, Object-Oriented Analysis and Design.

 

1. Introduction

 

There are currently discussions in the ACM (Association of Computing Machinery) Special Interest Group in Computer Science Education Technical Symposia and the Conference on OOPSLA (Object-Oriented Programming Systems, Languages, and Application) Educators Symposia on the appropriate topics to be taught in the CS 1 and CS 2. In these introductory courses in computer science students learn algorithms, a programming language, and data structures. CS 1 and CS 2 are the gateway to the upper division courses and thus mastery of these courses will lead to success in learning advanced concepts.

Recently, the object-oriented (OO) paradigm was introduced as a new way of developing software. The OO concepts include class, objects, inheritance, polymorphism, and dynamic binding, but inclusion of these concepts overburdened the teaching of CS 1 and CS 2. Furthermore, to apply OO, the students need to learn a different framework, where the components of the software system consist of a set of objects with defined relationships with other objects.  New objects can be built on top of existing objects where we can reuse some or all of the existing object's properties and add new ones for the new object.  Reusability then becomes one of the main objectives of the OO paradigm. All of these make the OO paradigm difficult for introductory students to grasp.

 

Due to the demand by the software industry for computer science graduates with training and education in the object-oriented paradigm, most computer science departments adopt an object-oriented programming language (OOPL) in their introductory courses: CS 1 and CS 2.  Although an OOPL is being used, students are still being taught the structured paradigm in these courses with the expectation that they will become familiar with the OO paradigm later in the curriculum.  However, having become indoctrinated in the procedural paradigm, students find it very difficult to understand and use object-oriented analysis and design (OOA/D) methodologies.  It has become clear that OOA/D must be introduced early in the curriculum.  The integration of the OO methodology into the computer science curriculum at the CS 1 and CS 2 level is a recognized problem and is the subject of several studies and experiments  [ADAM98, PROU98, DERS98, ASTR98].

 

ROOT (Refashioning Object-Oriented Technology Teaching) is a project jointly undertaken by the Department of Computer Science CSUSB and Rational Software through the Software Engineering for Educational Development (SEED) Partnership. ROOT is aimed at integrating an object-oriented analysis and design (OOA/D) methodology into the undergraduate Computer Science Program without adding new courses to the curriculum. This goal is achieved by distributing the steps of the OOA/D methodology over five undergraduate courses.  In these courses, the students learn OOA/D incrementally without being overwhelmed by it. In each of these courses, software combined with laboratory exercises and project materials were developed to increase the student's ability to grasp the concepts associated with OOA/D. The chosen OOA/D methodology is the Unified Modeling Language (UML). Rational Software provided the software package, Rose/C++, for use in the ROOT Project.

 

In the next section we discuss how the OOA/D methodology using UML was integrated in the computer science curriculum. There are five lower and upper division courses used in the ROOT Project: CSCI 201 (Computer Science I), CSCI 202 (Computer Science II), CSCI 320 (Programming Languages), CSCI 330 (Data Structures), and CSCI 350 (File Systems).  Then, in Section 3, we draw our conclusions and future directions.

 

2. Integration into the Curriculum

The best approach to teaching OOA/D appears to be by gradually integrating the OO techniques into the required programming courses. At CSUSB, which is on the quarter system, the courses are CSCI 201, CSCI 202, CSCI 320, CSCI 330, and CSCI 350. CSCI 201 is the first course in C++ programming while CSCI 202 is the next sequence course in C++ programming. CSCI 320 is a programming languages course where students learn the difference between several types of programming languages, its syntax and applications.   CSCI 330 is the data structures course and CSCI 350 is the file system course. CSCI 201 is the prerequisite to CSCI 202. CSCI 202 is the prerequisite to CSCI 320 and CSCI 330. CSCI 330 is the prerequisite to CSCI 350. The goal is to gradually increase the required level of understanding and use of UML in each course. The OO technique introduced and an example problem for each of these courses will now be discussed. The laboratory exercises and programming projects for each of the five undergraduate courses were developed and are found in the ROOT Project Web page: http://www.csci.csusb/rootproj.

 

2.1 CSCI 201 - Computer Science I

CSCI 201 is typically the first programming class taken by the Computer Science undergraduate at CSUSB.  In this class the student is introduced to the process of planning, designing, coding, compiling, debugging, and testing, software programs.  This is an appropriate time to introduce the student to the UML class diagram.  This is done by briefly explaining the diagram, its meaning, and its usefulness, and by making the diagram a required element of the last few programming assignments.

 

One of the assignments given to the CSCI 201 student  can be found on the root project web site in the file cs201/lab08/lab08.html. The problem requires the student  to modify a given class by adding a new "split" method and a new constructor that takes one parameter.  Along with the modified program the student is required to submit a class diagram for the new class.  The class diagram for this assignment is shown in Figure 1.

 

Figure 1. Class Diagram for Triangle.

 

The purpose of requiring the class diagram is to help the student start to visualize the class structures prior to the coding process.

 

 

2.2 CSCI 202 - Computer Science II

In CSCI 202 the student is expected to be more competent with the object-oriented programming language and capable of undertaking more significant problems.  In this class the notation for inheritance, aggregation, and composition is introduced.

 

A typical assignment given to the CSCI 202 student is given on the ROOT Project Web site.  The problem is to derive the class "Manager" from a given class "Employee" and then derive the class "Executive" from the new class "Manager".  The students are also instructed to add the attribute "department"  to the class "Manager" and to override the inherited "print" methods in each of the new classes.

 

The class diagram submitted along with the code is shown in Figure 2.

 

Figure 2. Generalization of the Class Employee.

 

The students are taught the principles of generalizations, specializations, inheritance, aggregation, and composition in this course. The laboratory exercises and programming projects found on the Web site are therefore geared towards exercising the above principles.

 

2.3 CSCI 320 - Programming Languages

This course covers a variety of programming paradigms. The goal is to help students to understand programming languages issues and introduce them to a variety of syntax, semantics, and paradigms.  This course includes laboratory work in C++, Prolog, LISP, and Java.

 

We taught the UML, in this course, as a way to describe the semantic structure of languages. The syntax can be presented in extended forms of Backus-Naur-Form and then we tackle semantic issues using the UML.  As an example, Figure 3, elegantly summarizes the abstract syntax LISP data.


                                                                            car

 

                                              List        1      cdr

 

                                                                    1

 

 

 

 

 

        NIL            Atom        ConsPair

 

 

Figure 3. Abstract Structure of LISP.

 

Adding constraints and operations to the abstract structure can provide the semantics of a language. As an example, the semantics of the well known "while" language can be expressed by providing 'exec' and 'eval' function that model the execution of statements and the evaluation of expressions. Shown in Figure 4 is the UML  representation of the "while" programming language

 


 


 


Figure 4. The WHILE Programming Language.

 

In this course, we gave a small and defective language description using an extended BNF and informal semantics. They first studied the language description and prepared a list of defects that they would fix in a redesign of the language. They then submitted a draft improved BNF+UML description reviewed and graded by the instructor. By teaching the students how to use UML in the study of programming languages, they have the opportunity to learn more about UML syntax. Detailed discussions of the implications of this approach in the study of programming languages are found in [BOTT99].

 

2.4 CSCI 330 - Data Structures

In this course, the students learn about abstract data types, such as lists, queues, stacks, trees, and graphs. They learn about different sorting and searching algorithms, string processing, and tree and graph algorithms.

 

In this course, the students learn how to use the different abstract data types and algorithms in the solution of problems.  They are challenged with more difficult programming  projects than those in CSCI 202.

 

One of the problems given to the student is to create an arithmetic evaluator that can convert equations from infix notation to postfix notation and solve them.  The solution uses a stack which is derived from a linked list. The UML diagram submitted for the above problem is shown in Figure 5.

 

 

Figure 5. Class Diagram for Infix to Postfix Notation.

 

The students thus learn how to apply OOA/D using UML in the solution of small projects involving abstract data types and classical algorithms. They are taught to go through an OOA/D phase before implementing their projects in C++.

 

2.5 CSCI 350 - File Systems

This course is a preparatory course to the database course. It involves a single programming project that the students, grouped into teams, will design and implement for the entire term. The programming project is the implementation of a file system and is to be done in three phases. The first phase is the implementation of a simple file system that can handle dynamic file management.  For the second phase, the students will create a database system from the simple file system that was created in the first phase.  The search will be done using a primary key. Finally, the third phase will create a B-tree index in order to improve the search performance when searching for a primary key.

 

In this course, the students are taught a specific set of steps in applying the UML OOA/D methodology. This is the first time that the students will apply an entire OOA/D set of steps for a programming project that is more complex and more involved than projects they had in CSCI 201, 202, 320, and 330. 

 

The UML technique was applied based on the following steps.  First, from the System Requirements Specification defined a Use Case diagram is developed, which is the primary element in project development and planning.  A use case is a typical interaction between the user and a computer system.  It is primarily used to define the external behavior of an entity without specifying its internal structure.  All the events from the outside world are a good source of identifying use cases. [FOWL97]  During the second step of the design process, we develop a Class Diagram to capture the structure of the classes that form the system's architecture.  The class diagram shows the existence of classes and their static relationships in the logical view of the system.  During analysis, we use class diagrams to indicate the common roles and responsibilities of the entities that provide the systems behavior.  In contrast, the implementation of a class is its internal view.  Therefore, it mainly consists of implementation of all the operations defined in the interface of the class. [BOOC94]  In the third step we exercise the UML Sequence Diagram, which is used to trace the execution of a scenario.  The primary purpose of the diagram is communication.  One of the hardest things to understand in an object-oriented program is the overall flow of control.  A good design has lots of small methods in different classes.  Therefore, at times it can be tricky to figure out the overall sequence of behavior.  Sequence diagrams help the programmer see that sequence and provide an immediate visual appeal. [BOOC94]  The OOA/D method of using UML diagrams enhances software development.  In the fourth step, any functionality missed would be refined in the use case diagram.  Any methods or objects missed would be updated in the class diagram.  This iterative development technique is the key to exploiting OO effectively.  Each iteration builds production-quality software, tested and integrated, that satisfies the sub-set of the requirements of the project's architecture.  Figure 6 shows the iterative development process of UML diagrams.

 

Requirements

 

 

 


Use Case Diagrams

 

 

 

Class Diagrams

 

 

 

Sequence Diagrams

 

 

 

Architectural Design

 

Figure 6: OOA/D Methodology Steps.

 

 

3. Conclusion and the Next Step

The ROOT Project incorporates an OOA/D methodology - specifically UML (Unified Modeling Language) - into the undergraduate courses: computer science I, computer science II, data structures, programming languages, and file systems.  This project was started in Fall 1997 and was concluded in the end of Fall 1998. We have observed marked improvement in the students knowledge of applying the OOA/D methodology in their upper-division courses, such as software engineering, CSCI 460 (Operating Systems), CSCI 455 (Software Engineering), CSCI 480 (Database Systems), etc.

 

A related problem associated with the education of computer science students at the undergraduate level is that there is no culminating experience whereby students are involved in the development of a very large software system. Although there are programming projects in most of the upper division courses, these projects do not involve the modification or extension of very large OO software systems, which is a key experience software industry is looking for when hiring software engineers. This problem has not been well addressed in many Computer Science Curricula because of the main issues of resources and synchronization of upper division courses [VILL98]. It is crucial that students are taught the OOA/D methodology so that they are equipped to apply this knowledge in the development of very large software systems.

 

The Department of Computer Science, CSUSB, has a research project in distributed computing systems, the Spider Project. Two Masters Theses started the Spider Project [PARK96, YUH97], which builds a Java virtual machine on a distributed system. By using the Spider Project as the very large software application project, we can incorporate the experience of developing a very large software system in the upper division courses, such as operating systems, database management systems, software engineering, data communications and networks, and compilers. Figure 7 shows how to integrate the experience of developing very large systems in the Computer Science Curriculum.  It shows the ROOT Project which involves the courses: CSCI 201, 202, 320, 330, and 350. The next step is to involve advanced upper-division courses, such as operating systems, software engineering, database systems, etc.  The components of the Spider System may consist of: a distributed database system, a distributed file system, a distributed Java virtual machine, a scheduler unit, a clock synchronization unit, security unit, and an interface definition language processor. This is the next step of the ROOT Project.

 

 

 

Figure 7: The Next Step of ROOT Project.

Acknowledgments

We acknowledge the following faculty who contributed to the ROOT Project: Yasha Karant, Josephine Mendoza, Owen Murphy, Kerstin Voight, Tong L. Yu, and Kay Zemoudeh

 

 

References:

[ADAM98] Adams, J.C., "Chance-It: An OO Capstone Project for CS 1", Proceedings of the 29th SIGCSE Technical Symposium, Feb 1998, pp. 10-14.

 

[ASTR98] Astrachan, O., et. al., "Design Patterns: An Essential Component of Computer Science Curricula",  Proceedings of the 29th SIGCSE

 

[BOOC94] Booch, G., "Object-Oriented Analysis and Design with Applications", Second Edition. Addison-Wesley Publishing Company, 1994.

 

[BOTT99] Botting, R.J., "On the Application of a Popular Notation to  Semantics, " SIGPLAN Notices, Vol. 34, No. 6, Jun 99, pp. 82-83.


[DERS98] Dershem, H.L.  & J. Vanderhyde, "Java Class Visualization for Teaching OO Concepts", Proceedings of the 29th SIGCSE Technical Symposium, Feb 1998, pp. 53-57.

 

[FOWL97] Fowler, M. et. al., "UML DISTILLED Applying the Object Modeling Language", Addison-Wesley Publishing Company, 1997.

 

[PARK96] Park, M-J., "An Optimistic Concurrency Control Mechanism Based on Clock Synchronization," M.S. Thesis, Dept. of Computer Science, California State Univ. San Bernardino, Mar 96.

 

[PROU98] Proulx, V.K., "Traffic Simulation: A Case Study for Teaching OOD", Proceedings of the 29th SIGCSE Technical Symposium, Feb 1998, pp. 48-52.

 

[YUH97] Yuh, H-S., "Spider: An Overview of an Object-Oriented Distributed Computing System," M.S. Thesis, Dept. of Computer Science, California State Univ. San Bernardino, Jun 97.