flashcards.txt

Card Set Information

Author:
Anonymous
ID:
276301
Filename:
flashcards.txt
Updated:
2014-06-07 03:40:56
Tags:
computer science
Folders:

Description:
data structures
Show Answers:

Home > Flashcards > Print Preview

The flashcards below were created by user Anonymous on FreezingBlue Flashcards. What would you like to do?


  1. What is a basic (or simple) class?
    A class whose member variables are all built in types eg. int, float, bool, string
  2. What is a composite class?
    A class that has at least one member variable that is of another class type.
  3. What is an interface class?
    A class that has no data members, and no implementation. They just define an interface (a set of methods) that other classes must implement.
  4. What is an abstract class?
    A class that provides an interface, but which may also have some data members and some implementation.
  5. What is a template class?
    A class that has data and a complete instantiation, but the TYPE of data is not instantiated until compile time.
  6. What is a bound element?
    A type that is described using a template.
  7. List the 5 basic class relationship types.
    DRACS - Dependency, Realisation, Aggregation, Composition, Specialisation.
  8. Explain what is meant by a dependency relationship.
    A relationship that "needs, uses, or requires". Used when one class USES another within it's code but DOES NOT HAVE A DATA ELEMENT of that type. Dashed line with arrow head. Arrow points to the required dependency. EG a class requires "IO"
  9. Explain what is meant by a realisation relationship.
  10. Explain what is meant by an aggregation relationship
    It's a "has a" relationship. A class has a data member that is the type of another class. However, when the whole disappears, the parts DO NOT!. Shown with a solid line and an open diamond at the whole end.
  11. Explain what is meant by a composition relationship.
    It's a "has a" relationship. A class has a data member that is the type of another class. When the object disappears, all of it's parts also disappear. Shown in UML with a solid line and a solid diamond at the "whole" end.
  12. Explain what is meant by a specialisation relationship.
  13. When a class has all the characteristics of another class, but adds information. We derive a child class from a parent class and then add to it. Only specialisation if you can relate using "is a". Eg a "Car" "is a" "wheeled vehicle". AND, the child class uses every member variable declared in the parent, AND the child class requires every method defined in the parent.

What would you like to do?

Home > Flashcards > Print Preview