The Program Life Cycle. - Concordia University Wisconsin

Download Report

Transcript The Program Life Cycle. - Concordia University Wisconsin

Day 1.
1. Syllabus / Overview of course.
2. Data structures.
3. Abstract programming methods.
4. Simulation.
5. Quality S/W.
1. Syllabus / Overview






See syllabus for:
1) Office hours.
2) Texts--(a) for a few classes, we will reuse Laitinen’s text.
(b) McMillan’s book is the main text.
(c) The curriculum text Computer Science: An
overview (for this class and all further CSC
classes) is also helpful.
 3) Objectives. 4) Grading. 5) Schedule.
Web-site.
 As with CSC 250, the CSC 300 Web-site is
found from www.cs.cuw.edu
 You will find the syllabus, PowerPoints and
lecture notes, and
example programs, many of which are in
process of being re-written.
Extra help.
 If anyone wants a tutor for this class, please
let me know as soon as possible.
 Also, work with me, by letting me know
promptly when you need help. You can
send me questions / code, come to office
hours.
Overview





The 4 main ideas of this course are:
1) Data structures;
2) Abstract Programming Methods;
3) Simulation;
4) Quality S/W.
1) Data structures.
 3 definitions:
 1) A data structure is an organized
collection of data with an access method.
 2) An access method is a mechanism for
accessing individual data elements.
 3) An (A)bstract (D)ata (T)ype = the
abstract, logical idea of a data structure.
Data Structures (cont.).
 “Abstract” in what sense?
 A concept / logical idea, independent of
H/W and S/W implementation.
 Note the analogy between an algorithm and
an ADT.
 An algorithm is an abstract specification
of…….
 An ADT is an abstract specification of……
Data Structures (cont.).
 Just as one algorithm can be translated into
many programs and run on many H/W
platforms, one ADT can be implemented in
many different ways.
 All the ADTS we study can be implemented
by static and dynamic approaches.
Data Structures (cont.).






We will study the following 4 main ADTs:
(1) Stacks;
(2) Queues;
(3) Lists;
(4) Trees.
These do not exist in the programming language—
e.g. no keyword “stack,” but we can simulate
them e.g. using arrays / linked lists.
Data Structures (cont.).
 Simulations are not the same as the real
thing (e.g. simulated leather).
 E.g. a real stack can shrink or grow, but an
array cannot. But we can model this by
having the stack shrink or grow inside the
stack.
 Idea of virtual characteristics.
Data Structures (cont.).
 All ADTS are illustrated by a visit to the
station.
 E.g.
 1) Stack of mail on a cart;
 2) Queue of customers at the ticket office;
 3) List of platforms and destinations;
 4) Tree of railway lines from a major hub.
Data Structures (cont.).
 Why study ADTs?
 1) We need to understand the idea / concept of a
data structure before we can implement it.
 2) We then have the freedom to implement the
ADT in the best way (e.g. most efficient / most
flexible) for a given application.
 3) We can focus on a standardized interface
independent of implementation. Why?
2.
Abstract programming methods.
 This leads to the idea of abstract
programming, where we carefully
distinguish what a data structure is from
how it is implemented.
 Note the parallel between control
abstraction and data abstraction.
The .NET framework.
 C# facilitates data abstraction with the .NET
framework. This is extra code which makes
programming with complex data easier, e.g.
there are ArrayList and StringBuilder
classes that simplify working with linear
lists and strings, by hiding details of
implementation and providing simple,
intuitive services.
3. Simulation.
 Simulation operates at 2 levels:
 1) We will use virtual characteristics e.g.
static features can seem to be dynamic;
 2) We will model real world systems, e.g.
real world queues (electronic time models
real time, numbers represent real objects
[like The Matrix]),
4. Quality S/W.
 This topic is explored in more depth in
CSC370, but we emphasize S/W that is:
 1) Carefully planned;
 2) Modifiable;
 3) Well-documented;
 4) Robust;
 5) Testable and rigorously tested.