CS 403 – Programming Languages by ewghwehws

VIEWS: 6 PAGES: 23

									CS 403 – Programming
Languages
 Class 28 - December 7, 2000
     Review & Final words
        Final Exam notes
Thursday, Dec 14, 8:00AM
Format:
   Fair number of multiple choice questions
   Scantron forms! Bring your #2 pencils!
   Might be some short discussion (like
    previous exams)
Final Exam notes
  Comprehensive
  About 1/3 of exam will cover material in
  chapters 1-8 (from the first exam).
  About 2/3 of exam will cover material in
  chapters 9-11 & 13-15.
  Examination Aid: You may bring one 8
  ½ by 11 sheet, handwritten on both
  sides as an aid to the exam.
Some Example MC Questions
 When Ada handles an exception, where
 does execution continue? (Pick the best
 option.)
 a. The next line of code after the one that
    generated the exception.
 b. The next line of code in the procedure that
    called the exception-causing procedure.
 c. The next line of code after the END of that
    block.
 d. The program terminates. Execution does
    not resume.
Some Example MC Questions
 Given this code (some call & return),
 which parameter passing method would
 give the output: “87 45 15”?
 a.   Pass by value
 b.   Pass by value-result
 c.   Pass by result
 d.   Pass by name
 e.   None of these will give that output.
Some Example MC Questions
 Given this code (some call & return) and
 assuming “pass by value-result”, what
 would the output be?
 a.   453 27
 b.   236 -3
 c.   96 82
 d.   1024 256
 e.   None of the above
Questions you won’t see!
   Which language did we not study in
   class?
  a.   LISP
  b.   Scheme
  c.   Haskell
  d.   Prolog
  e.   None of the above
Questions you won’t see!
   Which language did we demonstrate
   at length in class, but you didn’t have
   to program an assignment in it?
  a.   FORTRAN
  b.   ML
  c.   Haskell
  d.   Prolog
  e.   None of the above
Questions you won’t see!
   …?
  a.   LISP
  b.   Scheme
  c.   Haskell
  d.   Prolog
  e.   None of the above
Quick Review of Topics
Chapter 1
  Language Evaluation Criteria
  Language Design Trade-Offs
  Implementation Methods
Chapter 2: Historical Overview
Chapter 3: Syntax & Semantics
  Grammars
  Parse Trees
Review of Topics
Chapter 4: Names, Bindings, Type
 Checking and Scopes
  Binding & Binding Times
  Type checking & Strong Typing
  Type compatibility
  Scope & Lifetime
  Referencing Environments
Chapter 5: Data Types
 Primitive data types
 Character & String types
 User defined types
 Array types
 Associative types
 Record types
 Set types
 Union types
Chapter 6: Expressions &
Assignment Statement
Arithmetic expressions
Overloaded operators
Type conversions
Relational & Boolean expressions
  Short circuit evaluation
Assignment Statements
Mixed-mode assignment
Chapter 7: Control Statements
Compound statements
Selection statements
Iteration statements
Unconditional branching
Guarded commands
Chapter 8: Subprograms
Design issues
Local referencing environment
Parameter passing methods
Subprograms as parameters
Overloaded subprograms
Generic subprograms
Separate & Independent compilation
Accessing non-local environments
User-defined overloaded operators
Chapter 9: Implementing
Subprograms
General semantics of calls & returns
FORTRAN 77 subprograms
ALGOL-style subprograms (and
 everything since ALGOL)
Blocks
Implementing Dynamic & Static scoping
Implementing subprogram names as
 parameters
Chapter 10: ADTs
Abstraction
Encapsulation
Parameterized ADTs
Language examples
Chapter 11: OO Programming
OOP
Design issues for OO languages
Smalltalk
Support for OO in
  C++
  Java
  Ada
Chapter 12: Concurrency
Skipped!
You’ll see this in CS 426 Operating
 Systems
Chapter 13: Exception Handling
Basic issues
Exception handling in
  PL/I
  Ada
  C++
  Java
Chapter 14: Functional
Programming Languages
Basic ideas…
ML
Chapter 15: Logic
Programming Languages
Basic issues
Prolog
Studying for the exam
You may study in groups of 3-5.
You may post up to 5 sample exam
 questions from each group.
I’ll give one point for each sample
 question, up to a max of 5, to count as
 bonus points on the exam.
Post no later that Tuesday 5PM.

								
To top