Study your flashcards anywhere!

Download the official Cram app for free >

  • Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key


Play button


Play button




Click to flip

37 Cards in this Set

  • Front
  • Back
  • 3rd side (hint)
Name 4 guidelines for naming a class
*Start with a capital letter
*Be centered in the top compartment
*Be written in a boldface font
*Be written in italics if the class is abstract
How many compartments may a class have?
As many compartments as required to describe the class
How is an instance of an object shown
Object name followed by the class, i.e., Ford : Car. It is also underlined.
What are attributes?
Attributes are used to represent the details of a class. They describe the properties of an instance.
How is an attribute shown (diagrammed)?
Either inline or by a relationship.
Two ways
How is the visibility of an attribute represented?
Use the following symbols: +, -, #, or ~ for public, private, protected, or package, respectively
How is the name of an attribute normally capitalized?
Typically the first letter is lowercase, and the first letter of each subsequent word is capitalized.
It's all up from the start.
What is the type of an attribute?
another classifier, typically a class, interface, or built-in type like int.
How is the multiplicity of an attribute represented?
multiplicity ::= [lower..upper] use * to represent 0 or more. [1 .. *] indicates one or more an integer [3] represents exactly 3
What are the property strings of an attribute?
denote such things as ordering or uniqueness. They are surrounded by {} and separated by commas.
What are attribute constraints?
one or more restrictions placed on an attribute. They may be natural language or use a formal grammar such as the OCL.
How is an optional attribute diagrammed?
The attribute name is preceeded by a "/".
How do you represent a set of ordered attributes?
If the uniqueness constraint of an attribute is not specified what is the default value?
How do denote that an attribute is not unique?
-orderedAttrib[4]{ordered, no unique}
Name some common attribute properties.
readOnly, union, subsets <attribute-name>, composite
What are constraints?
restrictions placed on an element
What common property must all constraints have?
They must evaluate to a boolean value.
What are static attributes?
attributes of the class rather than of an instance of the class
part of the type
How are static attributes designated?
They are underlined.
What are operations?
Operations are features of classes that specify how to invoke a particular behavior.
Write the general syntax expression for an operation.
visibility name ( parameters ) : return-type {properties}
Write the general syntax expression for an operation parameter.
direction parameter_name : type [ multiplicity ]
= default_value { properties }
What are the 4 possible parameter directions. Indicate how each type is used by the operation.
in, out, inout, return
What is the purpose of an operation constraint?
A constraint defines a contract that indicates how an operation interacts with the rest of the system.
What is a precondition?
A precondition is a constraint that specifies the state of the system that must exist before an operation is invoked.
Show an example of a precondition.
use "precondition: foo must equal bar" for example
What is a postcondition?
A post condition establishes the post operation state of the system that must be met.
What is a bodyCondition?
A constraint that restricts the possible values of the return values.
What is a query operation?
A query operation is a constraint that indicates that the operation does not change the system state in any way.
Is an exception a constraint?
No, but an exception may be expressed in a similar manner.
How is an exception to an operation indicated?
Use a note attached by a dotted line.
What is a static operation?
A static operation is an operation that is invoked on the class itself rather than an instance of a class.
acts on the class
How is a static operation indicated?
The signature is underlined.
What is a method?
A method is the actual implementation of an operation.
How is a method noted?
There is no specific notation for an operation.
What is an abstract class?
A class that has one or more operations without signatures.