what is an abstraction?
a view or representation of an entity that includes only the most significant attributes
what is an abstract data type?
- the subprograms that provide the operations for that type
6 Design issues for abstract data types
What is an object
an instance of an abstract data type
What is the encapsulation construct in Ada
the package
4 characteristics of C++ class
6 characteristics of C++ constructors
5 characteristics of C++ destructors
3 differences of Java objects than C++ objects
3 characteristics of abstract data types in C#
6 characteristics of C# structs
3 characteristics of Ruby classes (that I probably don’t know)
class methods are distinguished from instance methods by having a class name appended to the beginning of their names with a dot separator
constructors are called “initialize”
classes can be “updated” any place in the text
Ruby undef_method vs remove_method
undef_method - blocks any reference to a given method
remove_method - block deletes method from class but allows those class objects to look for method definition in parent
4 characteristics of information hiding in Ruby
what is an encapsulation construct?
-a way of organizing programs into collections of logically related code and data, each of which can be compiled without recompilation of the rest of the program
Examples of encapsulation constructs in C, C++, Ada, C#
C –> header and implementation files
C++ –> header/implementation and class header/implemenatation files
Ada –> packages (can include any number of interfaces to ADTs)
C# –> assemblies (mimics a dll or exe)
why use named encapsulations?
when dealing with large programs written by many coders working independently named encapsulations define scopes that help avoid name collisions/duplication
4 examples of named encapsulation?
C++ namespace
Java package
Ada package
Ruby modules
5 characteristics of Java packages
2 things for using Ada package data
use Ada.pkg_name
method…
6 characteristics of Ruby modules