CSE1001: Syllabus
First Quarter
- Introduction
- Class goals: programming (language mastery)
- What is CS? Fields of CS.
- How high-level languages work: A bottom up journey
through the computer
- Who invented the computer?
- Kinds of computers:
peripherals, micro computers, mini computers, mainframes,
personal computers,
workstations,
laptops, notebook computers, supercomputers
- Computer architecture:
CPU,
ALU,
bit,
byte, word
- Program translation: compile, link, execute
[Chapter 2, pages 65-66],
high-level language (e.g., hello.adb),
machine and assembly code (e.g., hello).
- Edit, compile, test
- Software life cycle: design, implementation, testing, maintenance
- Ada programming language: history and evolution, overview
- Lexical: comments, identifiers, reserved words, delimiters, literals, whitespace
- Literals
- string literals "He said, ""Don't.""", "¿Qué pasa?"
- character literals 'A', '''
- integer literals 2#1_0101#, 8#25#, 16#15#, 20
- real literals 1_234.56E78
- Overall structure of an Ada main program:
context clause, subprogram body, declarative part, sequence of statements
- Simple IO commands
- Reading and writing integers and floating-point numbers,
Get and Put
(e.g., io.adb)
- Get_Line, Put_Line,
Skip_Line, and New_Line
(e.g., proportions.adb)
- BNF
- Expressions
- Exponentiation and square root:
math.adb
- Declarations
- Statements; simple and compound
- null statement
- assignment statement
- if statement
- others come later
- Control flow
- Assignment statement
- if statement
- some simple examples of the if statement:
cond.adb
- Enumerated types
Second Quarter
- Iteration
- for loops
- temperature.adb,
compute high and low temperatures over 24 hours
- countdown.adb,
interate backwards
- formula.adb,
constant lower and upper bounds
- nested.adb,
- for_example.adb,
enumerated types, nested loops, reverse
- pythagorean.adb,
nested loops, bounds that depend on the loop parameter
- hobo.adb,
nested loops, bounds that depend on the loop parameter
- More about for loops after subtypes and arrays are introduced
- general loops (loop/exit)
- Program complexity, big "Oh" notation
- Block structured language, locality of scope
Tip: minimize scope.
- Block statement
- a simple example of the block statement:
block.adb
- Subprograms
Third Quarter
- Chapter 7
- discrete data types, discrete and scalar attributes;
attribute.adb
- The data type character--Latin-1 character set
- Strings--slices and index constraints; e.g.,
simple.adb
- user defined integer types, portability;
e.g., size.adb
- phase distinction: compile time versus run time
- subtypes;
e.g., sub.adb,
and
lower.adb
- comparision of integer types: int.adb
- type equivalence, anonymous types
- Computability
- Any computable problem can be programmed in Ada
- Some problems are not computable; e.g., compiler cannot know if
a value is within range, or if the program will loop forever
- More control structures
- case statement
- more for loops
- pyramid.adb,
loop indices over discrete types (character), nested, reversed, non-constant bounds
- simple_for.adb,
loop indices over discrete types (user-define enumeration type),
discrte type attributes, subtypes as loop ranges
- while loops
- Loop invariants
- Exception handling
- Finite state machines: a model of a simple machine
- vending.adb
- Computability: all models of computability have the same power
(Church's thesis)
- But FSM is not a general model of computation;
it is very restricted.
Fourth Quarter
- Records
- (Advanced material.) Objects
- inheritance via derived types, overriding: vectors from triples.
triplets.ads,
triplets.adb,
vectors.ads,
vectors.adb
- objects are tagged records, class hierarchy, classwide subprograms:
shape_main.adb
- dynamic dispatch, narrowing, widening:
objects.ads,
objects.adb,
shapes.ads,
shapes.adb,
main.adb
- Packages
- specification, implementation, and client:
junk.ads,
junk.adb, and
use_junk.adb.
- predefined packages: IO, math, command line, ...
Goal is to be package writers, not users.
- simple terminal control package:
screen.ads,
screen.adb, and
example.adb.
- package for rational numbers:
fraction_package.ads,
fraction_package.adb,
gcd.adb (a subunit), and
main.adb.
(Make use of Ada95 "use type" declaration.)
- package with state and initialization:
fibonacci_package.ads,
fibonacci_package.adb
- share declarations between programs:
cd_package.ads,
cd_write.adb, and
cd_read.adb
- (advanced material)
no body required:
earth_orbit_data.ads,
quantities.ads
- One dimensional arrays
- why? No need to declare many variables individually.
- arrays and for loops:
main.adb,
stats.adb
- simple examples:
simple.adb,
- array aggregates and constant arrays:
cnst.adb
- strings are arrays.
- string bounds:
bounds.adb
- array operations
- unconstrainted arrays and subprograms
- examples:
tax.adb,
score.adb,
- (advanced material)
type compatibility:
test.adb
Ryan Stansifer <ryan@cs.fit.edu>
Document location: http://www.cs.fit.edu/~ryan/cse1001/syllabus.html
Last modified: Tue Mar 30 12:46:08 EST 1999