Objectives for ITEC 320
Warning: Under Construction and
Highly Fluid
A student in ITEC 320 should
be able, without books or notes, to do the following:
Motivation
- List, describe and give illustrations of the motivation for how
ada was defined:
- Reliable programs
- Easy for programmers
Control structures
- write programs with a for loop
- explain the advantages and disadvantages of ada for loops when
compared to java for loops
- if elsif else end if vs java
- explain how the design decisions for ada control structures
support motivation
- exit when: how to use and disciplined use
Declarations
Assignment and Reference Semantics
- Explain what occurs with Ada and Java in declaration and
assignment of an array
Data Types
- Describe strong typing in ada in expressions, assignment, and
parameters and contrast with java
- Describe implicit and explicit type conversion in ada and
contrast with java
- Contrast user defined types in ada and java
- Explain and give several illustrations of the difference between
structural and named type equivalence
- Subtypes
- Numeric
- vs new types
- vs java subtypes
- java type and implementation hierarchies
- Enumerated types
- Explain motivation
- Describe how problem is solved in java with integer constants
- Explain advantages of enumerated types
- Describe implementation of boolean and character
Procedures
- Define: procedure, function, routine, subroutine
- List and define ada param modes
- Side effects
- define
- explain why we avoid
- give examples: expression with change, routine that changes
globals
- give example from outside ada: functions that change params, i++
- explain and illustrate what side effects can occur with java
- give and explain examples of how the design of the ada language
makes it harder for programmer to create side effects
- Global variables
- define
- illustrate in ada: in procedure and in package
- contrast globals in ada with globals in java
- Create and use overloaded operators
- define and illustrate and use infix and prefix notation
- describe unique nature of overloading operator =
- describe approach of different languages (java, ada, c++) wrt
overloaded operator, including assignment
- Define positional and keyword parameters
- Define default parameter
- Prereq: Define formal and actual parameter
Records
- Explain the similarities and differences between records and
classes/objects
- Create a program that has a well designed set of types involving
arbitrarily nested arrays and records
Packages
- Describe purpose of and relations between client, spec, body
- Describe and illustrate client, spec, and body and the various
files used to implement them
- List what can be declared in a spec
- Describe visibility of client, spec, body and any of their parts
wrt each other
- Contrast ada and java approach to visibility
- Contrast java import and ada with and use
- Explain and illustrate relationship among procedure declarations
in spec and procedures in body
- Create a system that has a client and one or more packages, given
purposes of each
- Package Word
- Give implemetation of type Word
- Give implementation of routines (except get and another word)
- Explain and illustrate purpose of get and anotherword and how
they interact and use lookahead
- Be able to use the routines from spec to create a client
- Be familiar enough with the operations in spec to write client
without spec in front of you
- Be able to write an end of file loop that gets words
- Package BigNum
- Use routines in spec (given spec) to create a client
- Give the implementation of type BigNum
- Give implementation of simpler functions and procedures
- Describe when an overloaded operator defined in a package can be
used infix vs prefix by a client
- ADTs
- Define adt
- Explain how packages support adts
- Explain importance of packages wrt encapuslation, information
hiding, abstraction
- List operations typically provided by an adt (eg create, query,
compare, modify, combine)
- Describe purposes of a class and relate them to the purposes of a
package and a record:
- type for variables
- provides structured types with hetereogenous data (ie different
types)
- allows user defined types
- template for creating objects
- repository for methods
- allows writing methods that use controlled global variables
- Integer Stack
- Write a complete integer stack package with an array
implementation
- Use an integer stack package to create a client that solves
some task
- Explain the mode of the stack parameter of each routine
- Explain the two possible specifications of pop and how it is
implemented in Ada
Generic Packages
- Explain the problem that generics are meant to solve
- Explain the problems that occur with java stack of Objects,
including what errors can occur and when the errors are caught
- Define: generic, parameterized type, template
- Explain history and approach to generics in ada, java, c++
- Use a generic package to create a new package, given the spec of
the generic
- Describe and illustrate how to declare a parameter to a generic
package
- Write a complete generic stack package implemented with arrays
- List and describe what can be a type to a generic
- Describe the compilation model of ada generics
Pointers
- Declare access types and describe the relation between pointers
and access types
- Use new to create an anonymous variable on the heap
- Describe the role of null when dealing with pointers
- Use a pointer to access a variable on the heap, either a variable
of primitive type or the fields of a record
- Define and illustrate the terms garbage and dangling reference
and garbage collection
- Declare recursively defined (ie linked) data structures
- Perform basic operations on linked structures
- Write programs using linked structures
- Give the dynamic implementation for stacks and queues and linked
lists
- Describe and diagram the different areas of memory
organization
- List and illustrate the different kinds of variables and describe
where and when they are allocated and deallocated
Last
modified on