阅读更多
CS112F. Objects and Algorithms
Extends the foundation developed in CS111F to encompass object-oriented programming
and design.
Prerequisites: CS111F
Syllabus:
• Fundamental programming constructs: Basic syntax and semantics of a higher-level
language; variables, types, expressions, and assignment; simple I/O; conditional and
iterative control structures; functions and parameter passing; structured decomposition
• Object-oriented programming: Object-oriented design; encapsulation and information hiding;
separation of behavior and implementation; classes, subclasses, and
inheritance; polymorphism; class hierarchies; collection classes and iteration protocols;
fundamental design patterns
• Fundamental data structures: Primitive types; arrays; records; strings and string
processing; pointers and references; linked structures; strategies for choosing the right
data structure
• Event-driven and concurrent programming: Event-handling methods; event
propagation; managing concurrency in event handling; exception handling
• Using APIs: API programming; class browsers and related tools; programming by
example; debugging in the API environment
• Algorithmic strategies: Brute-force algorithms; greedy algorithms; divide-and conquer ;
backtracking; heuristics
• Fundamental computing algorithms: Simple numerical algorithms; sequential and
binary search algorithms; sorting algorithms
• Virtual machines: The concept of a virtual machine; hierarchy of virtual machines;
intermediate languages; security issues arising from running code on an alien machine
• Fundamental techniques in graphics: Hierarchy of graphics software; using a graphics
API
• Software development methodology: Fundamental design concepts and principles;
structured design; testing and debugging strategies; test-case design; programming
environments; testing and debugging tools
B.1.4 Breadth-first
As outlined in Chapter 8, we propose two implementations of a breadth-first approach.
The first is simply to include an overview course (CS100B) before a more conventional
programming sequence. The second is to expand the introductory curriculum into a
three-semester sequence (CS101B-102B-103B) so that there is time for the additional
topics.
CS100B. Preview of Computer Science
Offers a broad overview of computer science designed to provide students with an
appreciation for and an understanding of the many different aspects of computer science.
Topics include discrete mathematics, an introduction to programming languages,
algorithmic problem solving, analysis of algorithmic complexity, basic concepts in
hardware, operating systems, networks, graphics, and an overview of the social context of
computing. No background in computer science is assumed or expected. The course is
intended for both students who expect to major or minor in computer science as well as
for those not planning on taking additional course work.
Prerequisites: none
Syllabus:
• Mathematical preliminaries: Sets, functions, logic, proofs
• Algorithms: Definition, design, and implementation; introduction to classical
algorithms (sorting, searching, and pattern matching)
• Algorithmic analysis: Efficiency; asymptotic analysis; computational complexity; big-
O notation; polynomial vs. exponential growth; computability
• Hardware realizations of algorithms: Data representation; the von Neumann model of
computation; the fetch/decode/execute cycle; basic machine organization
• Programming fundamentals: Overview of programming fundamentals and object oriented
design principles; brief introduction to a programming language that supports
the object-oriented paradigm
• Operating systems and virtual machines: Historical evolution of operating systems;
responsibilties of an operating system; basic components of an operating system
• Networking and computer graphics: Brief introduction to some of the basic concepts in
networking and computer graphics
• Social and professional issues: Social context of computing; responsibilities of
computing professionals
Notes:
It is, of course, impossible to cover all of computer science within a single course. The
exact list of topics and their ordering will therefore vary based on the interests and
background of the instructor. At a minimum, an initial breadth-first course should
include a solid introduction to algorithms, some basic concepts in hardware and computer
organization, an exposure to abstraction and the virtual environments created by software, a brief introduction to programming and software development, and a treatment of the social, ethical, and professional issues that arise in the field. Beyond that, each instructor
should feel free to choose the specific topics covered, particularly in terms of the
treatment of modern computing applications. The sample syllabus includes about six
hours of material on networking and computer graphics, both important and rapidly
growing areas. It would, however, be appropriate to expand these topics or supplement
them with material on other important issues such as databases, artificial intelligence, and
distributed systems.
There are two important considerations in the design of a breadth-first introduction to
computer science. The first is to treat discrete mathematics not as a separate and
unrelated subject, but as a fully integrated component of the course. By doing so,
students will better understand and appreciate the importance of discrete mathematics to
our discipline. For example, Boolean logic could be introduced during a discussion of
programming language operators, counting methods could be presented during a
discussion of the efficiency of iterative algorithms, while recurrence relations are a
natural way to study the performance of recursive algorithms. The goal is for students to
be introduced to mathematical concepts within the context of their use in solving
important computing problems.
The second point is that the many disparate topics typically found in a breadth-first
course must be tied together into an integrated whole. Students must not see the course
as a collection of interesting but unrelated topics in a “if this is Tuesday it must be
computer organization” style. They should instead develop an appreciation for the
important relationships among the major subfields of computer science. This goal can be
achieved by demonstrating how each of the course topics utilizes earlier ideas and builds
on them to produce newer and more powerful abstractions. This type of “spiral”
approach, which reinforces, emphasizes, and builds on previous concepts, is an important
aspect to the success of such a course.
CS101B. Introduction to Computer Science
Presents a broad overview of computer science that integrates programming with discrete
mathematics, hardware fundamentals, algorithms, and computability.
Prerequisites: No programming or computer science experience is required. Students
should have sufficient facility with high-school mathematics to solve simple linear
equations and to appreciate the use of mathematical notation and formalism.
Syllabus:
• Discrete mathematics: Functions, relations, and sets; basic logic; proof techniques;
basics of counting; discrete probability
• Fundamental programming constructs: Basic syntax and semantics of a higher-level
language; variables, types, expressions, and assignment; simple I/O; conditional and
iterative control structures; functions and parameter passing; structured decomposition
• Algorithms and problem-solving: Problem-solving strategies; the role of algorithms in
the problem-solving process; the concept and properties of algorithms
• Fundamental data structures: Primitive types; arrays; strings and string processing
• Recursion: The concept of recursion; recursive mathematical functions; divide-and conquer
strategies
• Basic algorithmic analysis: Big “O” notation; standard complexity classes
• Fundamental computing algorithms: Simple numerical algorithms; sequential and
binary search algorithms; quadratic and O(n log n) sorting algorithms
• Basic computability: Finite-state machines; Turing machines; tractable and intractable
problems; uncomputable functions; the halting problem; implications of
uncomputability
• Overview of programming languages: History of programming languages
• Digital logic and digital systems: Overview and history of computer architecture;
fundamental building blocks; logic expressions
• History of computing
• Introduction to the social implications of computing
Notes:
This course is the first of a three-semester sequence (CS101B-102B-103B) that seeks to
offer a broad, integrated introduction to computer science, along the lines advocated by
the 1989 “Computing as a Discipline” report [Denning89] and Computing Curricula 1991
[Tucker91]. Each of the three courses in the sequence includes theory along with
programming, and a range of additional topics are introduced in each course in the
sequence.
As we note in Chapter 7, the breadth-first model has not enjoyed the success that its
proponents had envisioned. We believe, however, that part of the problem may have
come from trying to fit all these topics into too small a space. Given the expansion of
programming -related material that must be covered in the introductory sequence, there
simply isn’t time to cover the broader concepts of the discipline at any depth in the
confines of the traditional two-semester sequence. As a result, most breadth-first courses
that exist today seem to be lead-ins to a more traditional programming sequence. This
model, which has several successful implementations, is outlined in the syllabus for
CS100B.
In the last few years, however, the two-semester introductory sequence has become
cramped even for the programming material. As a result, several institutions are moving
toward a three-semester introductory sequence. We endorse these efforts in section 7.7.3
and offer a sample implementation in CS100B. The interesting question that this move
toward three-semester sequences brings up is whether the additional time makes a
breadth-first approach more viable.
The material presented in the CS101B-102B-103B sequence is quite similar to that offered
in any of the traditional two-semester introductions and the CS115 discrete structures
class. The difference is the ordering of the material. In the breadth-first sequence,
mathematics is distributed throughout all three semesters and is more directly coupled to
the topics that use it. In this way, students will have a greater opportunity to appreciate
the connections between theory and practice.
A major danger of all breadth-first approaches lies in the fact that students tend to be far
more attracted by the programming material, which they see as exciting and empowering,
than they are to the more theoretical material. In this treatment, we have taken care to
include more programming in the first course than has sometimes been true of breadth- first introductions. In the count of units, a third of the material in CS101B is directly
related to programming and much of the rest can be presented so as to emphasize its
practical importance.
We recognize that this approach has not been tested and that it may therefore suffer from
the same modes of failure that plagued the earlier breadth-first attempts. We believe,
however, that the expansion to three semesters may help to address these problems. After
all, three-semester sequences—a breadth-first preliminary course followed by a two semester programming sequence—do exist and seem to be reasonably successful. The
advantage of the more integrated design is that students will be exposed to more
programming in the first course and more theory in the courses that follow.
CS102B. Algorithms and Programming Techniques
Provides an introduction to programming that builds on a broad introduction to the
computer science discipline.
Prerequisites: CS101B
Syllabus:
• Discrete mathematics: Basic logic; proof techniques
• Algorithms and problem-solving: Implementation strategies for algorithms; debugging
strategies
• Fundamental programming constructs: Declaration models; garbage collection;
abstraction mechanisms; modules
• Fundamental data structures: Arrays; records; strings and string processing; data
representation in memory; static, stack, and heap allocation; runtime storage
management; pointers and references
• Object-oriented programming: Encapsulation and information-hiding; separation of
behavior and implementation; classes and subclasses; inheritance; polymorphism; class
hierarchies
• Fundamental computing algorithms: Simple numerical algorithms; hash tables
• Overview of programming languages: Brief survey of programming paradigms
• Virtual machines: The concept of a virtual machine; hierarchy of virtual machines;
intermediate languages
• Machine level representation of data: Bits, bytes, and words; numeric data
representation and number bases; fixed- and floating-point systems; representation of nonnumeric data; representation of records and arrays
• Assembly level machine organization: Basic organization of the von Neumann
machine; control unit; instruction fetch, decode, and execution
• Introduction to net-centric computing: Background and history of networking and the
Internet; network architectures
• Building a simple graphical user interface: Principles of graphical user interfaces; GUI
toolkits
• Software engineering: Software design; software tools and environments; requirements
and specifications; software validation; testing and debugging strategies
Notes:
This course is the second of a three-semester sequence (CS101B-102B-103B) that seeks to
offer a broad, integrated introduction to computer science. The rationale for the design of
the sequence and suggestions for its implementation are given in the notes to CS101B.