CIS 2750 UPDATED FINAL PAPER QUESTIONS AND
ANSWERS MARKED A+
✔✔Scaffolding - ✔✔Built to make it easy to test code
- stubs
- drivers
- dummy files
✔✔Stubs - ✔✔low-level module of dummy code that can be called by higher-level
module being tested
✔✔Driver - ✔✔fake module that calls real module being tested (also called a test
harness)
✔✔Dummy File - ✔✔small version of real data file that has same types of components
as that file
✔✔C Language Standards - ✔✔Appeared in early 70s
ANSI C standardized 1989
1990 ANSI took ISO's standard from 1989
ISO 9899:1999 = C99
ISO 9899:2011 = C11
✔✔Implementation defined code - ✔✔compiler writer chooses what happens and has to
document it
✔✔Unspecified behavior - ✔✔something correct for which the standard doesn't impose
requirements
✔✔Undefined behaviour - ✔✔something incorrect for which the standard doesn't
impose any requirements
✔✔Constraint - ✔✔restriction/requirement that must be obeyed: otherwise program
becomes undefined
✔✔Strictly conforming code - ✔✔code only uses specified features, doesn't exceed any
implementation defined limits, no output that depends on implementation defined,
unspecified, or undefined
✔✔Conforming programs - ✔✔considered w/ respect to specific implementation and
may be non conforming w/ a different compiler
✔✔Code Rot - ✔✔Program hasn't been updated but it stops working/compiling
, basically the environment upgrades (Y2k: 2 bytes was no longer enough for the year,
storage saving shortcut kinda screwed everything)
✔✔Scripting Languages - ✔✔loose term to describe high level languages
interpreted instead of compiled
designed to Get Things Done
✔✔Extending - ✔✔binding programs to scripting languages to increase functionality
✔✔Interpreted Languages - ✔✔convenient, can use interactive environment to execute
individual code segments instead of complete compiled programs
kinda slow
source code parsed, then each valid instruction has to be interpreted
✔✔Static type checking - ✔✔done at compile time (C, Java)
compiler verifies no type related error
✔✔Dynamic Type Checking - ✔✔done at run time
a scripting languages thing
variable type determined and verified at run time
system manages types w/o explicit input on length, type
can lead to weird type mismatch
✔✔Strictly/strongly typed - ✔✔very precise types (≠ static type checking)
✔✔Weakly typed - ✔✔more permissive types (can add int to string and get a result) ≠
dynamic type checking
some languages treat all as strings, modify if non string operation called on it
others do the same but objects
results in code that almost never crashes
✔✔Duck typing - ✔✔dynamic type checking: if it walks like a duck and talks like a duck,
treat it like an int
basically the functions/operations on the var determine the type
✔✔Automatic memory management - ✔✔objects can grow and shrink as needed,
removed when no longer necessary
✔✔Object Oriented - ✔✔scripting languages can be difficult to manage for large
problems, OO attempts to address that
Functions are first class citizens (objects)
✔✔Javascript - ✔✔OO scripting language
browser based scripting
familiar structures, garbage collecting, support for OO, dynamic, weak type system
ANSWERS MARKED A+
✔✔Scaffolding - ✔✔Built to make it easy to test code
- stubs
- drivers
- dummy files
✔✔Stubs - ✔✔low-level module of dummy code that can be called by higher-level
module being tested
✔✔Driver - ✔✔fake module that calls real module being tested (also called a test
harness)
✔✔Dummy File - ✔✔small version of real data file that has same types of components
as that file
✔✔C Language Standards - ✔✔Appeared in early 70s
ANSI C standardized 1989
1990 ANSI took ISO's standard from 1989
ISO 9899:1999 = C99
ISO 9899:2011 = C11
✔✔Implementation defined code - ✔✔compiler writer chooses what happens and has to
document it
✔✔Unspecified behavior - ✔✔something correct for which the standard doesn't impose
requirements
✔✔Undefined behaviour - ✔✔something incorrect for which the standard doesn't
impose any requirements
✔✔Constraint - ✔✔restriction/requirement that must be obeyed: otherwise program
becomes undefined
✔✔Strictly conforming code - ✔✔code only uses specified features, doesn't exceed any
implementation defined limits, no output that depends on implementation defined,
unspecified, or undefined
✔✔Conforming programs - ✔✔considered w/ respect to specific implementation and
may be non conforming w/ a different compiler
✔✔Code Rot - ✔✔Program hasn't been updated but it stops working/compiling
, basically the environment upgrades (Y2k: 2 bytes was no longer enough for the year,
storage saving shortcut kinda screwed everything)
✔✔Scripting Languages - ✔✔loose term to describe high level languages
interpreted instead of compiled
designed to Get Things Done
✔✔Extending - ✔✔binding programs to scripting languages to increase functionality
✔✔Interpreted Languages - ✔✔convenient, can use interactive environment to execute
individual code segments instead of complete compiled programs
kinda slow
source code parsed, then each valid instruction has to be interpreted
✔✔Static type checking - ✔✔done at compile time (C, Java)
compiler verifies no type related error
✔✔Dynamic Type Checking - ✔✔done at run time
a scripting languages thing
variable type determined and verified at run time
system manages types w/o explicit input on length, type
can lead to weird type mismatch
✔✔Strictly/strongly typed - ✔✔very precise types (≠ static type checking)
✔✔Weakly typed - ✔✔more permissive types (can add int to string and get a result) ≠
dynamic type checking
some languages treat all as strings, modify if non string operation called on it
others do the same but objects
results in code that almost never crashes
✔✔Duck typing - ✔✔dynamic type checking: if it walks like a duck and talks like a duck,
treat it like an int
basically the functions/operations on the var determine the type
✔✔Automatic memory management - ✔✔objects can grow and shrink as needed,
removed when no longer necessary
✔✔Object Oriented - ✔✔scripting languages can be difficult to manage for large
problems, OO attempts to address that
Functions are first class citizens (objects)
✔✔Javascript - ✔✔OO scripting language
browser based scripting
familiar structures, garbage collecting, support for OO, dynamic, weak type system