Class Notes for Day 1
CSSE 120: Fundamentals of Software Development I
Rose-Hulman Institute of Technology
Department of Computer Science & Software Engineering
Winter term, 2003-2004
Key ideas from today's session
- What is a computer program?
- A set of instructions that a computer can follow, one by one.
- If the computer knows how to do the instruction, the computer simply does the instruction.
- Otherwise, the instruction needs to be rewritten in more detail.
- These instructions that need to be rewritten in more detail are called high-level instructions.
- What are the parts of a program? How are they put together?
- Combining by sequencing: do this, then that, then ...
- Combining by grouping and giving the group a name (high-level instructions).
- This is called procedural abstraction.
- Loops.
- Conditionals.
- More ideas (over the next few weeks).
- Two kinds of computation: instruction-followers and computational communities.
- One kind of computation is: Step by step instructions that produce a desired result.
- Example: making a sandwich.
- We'll call such entities instruction-followers.
- Another kind of computation is:
Coordinating the activity among the many entities that make up your program,
and their interactions with the world around them.
- Example: a restaurant.
- We'll call such entities computational communities.
- They reflect the fact that programs today typically:
- Are embedded in an environment.
- Interact with that environment.
- Include many activities running concurrently.
- What kinds of questions does a program designer ask?
- A design process for building instruction-followers involves asking yourself, for each instruction-follower:
- What does it do next?
- How does it do each one of these things?
- These questions are part of top-down design.
- A design process for building computational communities involves asking yourself:
- What is the desired behavior of the program?
- Who are the entities who interact to produce this behavior?
- How do these entities interact?
- What goes inside each entity (how does it work)?
- Object-oriented concepts (brief introduction)
- Objects, classes, encapsulation, state, interfaces, inheritance, polymorphism,
methods, messages, parameters, returned values, chains of messages, (possible) infinite recursion, errors.
- UML class diagrams for describing classes and their interactions
-
Interactive control loops (in Chapter 1 reading)
- A simple program that repeatedly receives an input -- a new request,
a set of sensor readings, or some other information -- and responds appropriately.
- Example: an echo program.A
- An interactive control loop is the crucial bridge that turns an instruction follower
into an ongoing participant in an interactive community.
- The development cycle (in Chapter 1 reading)
Outline of today's activities
- [2 minutes] Contact before work
- [15 minutes] Introduce the course
- [5 minutes] Name-learning activity to introduce groupwork
- Get into groups of about 7 to 9
- Each person in the group, tell the others your name and something about yourself
- Each person in the group, tell each other person in the group their first name
- [30 minutes] Introduce object-oriented concepts by role play
- The activity itself
- Discussion of the activity
- [3 minutes] Interlude
- [20 minutes] Introduce instruction-followers by drawing a picture
- [10 minutes] Group Work: Have each student draw a picture (2 minutes). Then have them
attempt to describe how to draw the picture to a fellow student (3 minutes). Compare
the original with the copy (briefly). Repeat, with roles reversed.
- [10 minutes] Class discussion and lecture: Discuss with the class their observations,
what high-level instructions they found, and what programming primitives
they found.
- [10 minutes] Introduce computational communities
- Lecture/discussion to introduce computational communities,
using the restaurant example from Chapter 1 (briefly)
- [18 minutes] Introduce designing a computational community by designing a baseball team
- [10 minutes] Group work: Describe the division of responsibility and coordination
of activities among the entities at a professional baseball game.
Have students address the 4 design questions listed in the Key Ideas.
- [8 minutes] Class discussion: discuss their answers to the 4 design questions,
perhaps drawing a UML class diagram as you do so
- [2 minutes] Summarize and assign homework
- Summarize the two aspects of computation and the 6 key questions
- [0 minutes (as time permits)] Discuss class mechanics further as desired