[SYCS 136] Data Design and Implementation

69 terms by philipjbrowning 

Ready to study?
Start with Flashcards

Create a new folder

Advertisement Upgrade to remove ads

C++ Plus Data Structures

What is data abstraction?

The separation of a data type's logical properties from its implementation. (p66)

What is data encapsulation?

The separation of the representation of data from the applications that use the data at a logical level; a programming language feature that enforces information hiding. (p67)

What is an abstract data type (ADT)?

A data type whose properties (domain and operations) are specified independently of any particular implementation. (p68)

What is a data structure?

A collection of data elements whose organization is characterized by accessing operations that are used to store and retrieve the individual data elements; the implementation of the composite data members are in an abstract data type. (p68)

What is a composite data type?

A data type that allows a collection of values to be associated with an object of that type. (p74)

What is a class?

An unstructured type that encapsulates a fixed number of data components (data members) with the functions (member functions) that manipulate them; the predefined operations on an instance of a class are the whole assignment and component access. (p87)

What is a client?

Software that declares and manipulates objects (instances) of a particular class. (p87)

What is the self?

The object to which a member function is applied. (p92)

What is inheritance?

A mechanism used within a hierarchy of classes in which each descendant class inherits the properties (data and operations) of its ancestor class. (p93)

What is the base class?

The class being inherited from. (p94)

What is the derived class?

The class that inherits. (p94)

What is polymorphism?

The ability to determine which of several operations with the same name is appropriate; a combination of static and dynamic binding. (p94)

What is overloading?

Giving the same name to more than one function or using the same operator or symbol for more than one operation; usually associated with static binding. (p94)

What is binding time?

The time at which a name or symbol is bound to the appropriate code. (p94)

What is static binding?

The compile-time determination of which implementation of an operation is appropriate. (p95)

What is dynamic binding?

The run-time determination of which implementation of an operation is appropriate. (p95)

What is composition?

(Also called containment) A mechanism by which an internal data member of one class is defined to be an object of another class type. (p95)

What is containment?

(Also called composition) A mechanism by which an internal data member of one class is defined to be an object of another class type. (p95)

What is Big-O notation?

(Also called order of magnitude) A notation that expresses computing time (complexity) as the term in a function that increases the most rapidly relative to the size of a problem. (p104)

What is order of magnitude?

(Also called Big-O notation) A notation that expresses computing time (complexity) as the term in a function that increases the most rapidly relative to the size of a problem. (p104)

What is the domain?

The set of all possible values. (p68)

What is the application level?

(Also called user level or problem domain). A way of modeling real-life data in a specific context. (p70)

What is the problem domain?

(Also called application level or problem domain). A way of modeling real-life data in a specific context. (p70)

What is the user level?

(Also called the application level or problem domain). A way of modeling real-life data in a specific context. (p70)

What is the logical level?

(Also called the abstract level) An abstract view of the data values (the domain) and the set of operations to manipulate them. (p70)

What is the abstract level?

(Also called the logical level) An abstract view of the data values (the domain) and the set of operations to manipulate them. (p70)

What is the implementation level?

A specific representation of the structure to hold the data items, and the coding of the operations in a programming language (if the operations are not already provided by the language). (p70)

What are constructors?

An operation that creates a new instance (object) of an abstract data type. It is almost always invoked at the language level by some sort of declaration. (p73)

What are transformers?

(Also called mutators) Operations that change the state of one or more of the data values, such as inserting an item into an object, deleting an item from an object, or making an object empty. (p73)

What are mutators?

(Also called transformers) Operations that change the state of one or more of the data values, such as inserting an item into an object, deleting an item from an object, or making an object empty. (p73)

What is a binary transformer?

An operation that takes two objects and merges them into a third object. (p73)

What are observers?

An operation that allows us to observe the state of one or more data values without changing them. (p73)

What is a predicate?

An operation that asks if a certain property is true. (p73)

What is an accessor function?

(Also called selector function) A function that returns a copy of an item in the object. (p73)

What is a selector function?

(Also called accessor function) A function that returns a copy of an item in the object. (p73)

What are iterators?

An operation that allows us to process all components in a data structure sequentially. (p74)

What is a summary function?

A function that returns information about the object as a whole. (p73)

What do the specifications describe?

This describes the logical or abstract level. (v)

What concerns the logical or abstract level?

What the operations do. (v)

What concerns the application or user level?

How the data type might be used to solve a problem. Why the operations do what they do. (v)

What concerns the implementation level?

Where the operations are actually coded. This level is concerned with the how questions. (v)

[Exam] What is the difference between the C++ types "struct" and "class"?

A C++ struct has only public variables and functions. A C++ class uses the principle of information hiding, allowing the programmer to choose between public and private variables and functions.

What is an unstructured composite type?

A collection of components that are not organized with respect to each other. (p74)

What is a structured data type?

An organized collection of components in which the organizatio ndetermines the method used to access individual data components (p74)

What is a record?

A composite data type made up of a finite collection of not necessarily homogeneous elements called members or fields. (p75)

What is homogenous?

They all are of the same data type. (p79)

What does ordered mean?

There is a first element, a second element, and so on. (p79)

What does finite mean?

Indicates that the last element is identifiable. (p79)

What does fixed size mean?

The size of the collection of data types must be known in advance. (p79)

What is an array descriptor?

(Also called a dope vector) A table that stores information about the array characteristics. (p82)

What is a dope vector?

(Also called an array descriptor) A table that stores information about the array characteristics. (p82)

What is the formula to calculate the address?

Address(Index) = Base + Index * SizeOfElement (p83)

What is an object?

A class object or class instance - that is, an instance of a class type. (p93)

What is a method?

A public member function. (p93)

What is an instance variable?

A private data member. (p93)

What does sending a message mean?

Calling a public member function. (p93)

What are the three basic ingredients in any object oriented language?

(1) Encapsulation
(2) Inheritance
(3) Polymorphism (p93)

What is an inheritance hierarchy?

A hierarchy in which each concept inherits the properties of the concept immediately above it in the hierarchy. (p94)

What is the parent?

The concept immediately above in the inheritance hierarchy. (p94)

What are ancestors?

All the concepts above in the inheritance hierarchy. (p94)

What are the children?

The concepts immediately below in the inheritance hierarchy. (p94)

What are the descendants?

All the concepts below in the inheritance hierarchy. (p94)

Who is responsible for handling exceptions?

The client. (p99)

Does the ADT code check the preconditions?

No. (p99)

[Exercise 2] Explain the programming goal "to protect our data abstraction through encapsulation."

When data abstraction is protected through encapsulation, the data user can deal with the data abstraction but cannot access its implementation, which is encapsulated. The data user accesses data that is encapsulated through a set of operations specified to create, access, and change the data. Data encapsulation is accomplished through a programming language feature.

[Exercise 5] What composite types are predetefined in the C++ language?

Array, struct, union, and classes.

[Exercise 8] Describe the component selectors for one-dimensional arrays at the logical level.

The syntax of the component selector is the array name followed by the index of the desired item: array-name[index-expression].

[Exercise 20] How is the client prevented from directly accessing the details of an instance of a class?

The members of a class are private unless specified as public. Client code cannot access private members.

[Exercise 23] Name three ways that classes can relate to each other.

Classes can relate to one another through inheritance, containment (composition), and not at all.

Please allow access to your computer’s microphone to use Voice Recording.

Having trouble? Click here for help.

We can’t access your microphone!

Click the icon above to update your browser permissions above and try again

Example:

Reload the page to try again!

Reload

Press Cmd-0 to reset your zoom

Press Ctrl-0 to reset your zoom

It looks like your browser might be zoomed in or out. Your browser needs to be zoomed to a normal size to record audio.

Please upgrade Flash or install Chrome
to use Voice Recording.

For more help, see our troubleshooting page.

Your microphone is muted

For help fixing this issue, see this FAQ.

Star this term

You can study starred terms together

NEW! Voice Recording

Create Set