Deck 10: Object-Oriented Programming

Full screen (f)
exit full mode
Question
A class specifies a set of instance variables and methods that are "bundled together" for defining a type of object.
Use Space or
up arrow
down arrow
to flip the card.
Question
A class can be used to make as many object instances of that type as needed.
Question
The mere use of objects constitutes object-oriented programming.
Question
Object-oriented programming languages provide three fundamental features that support a programming paradigm in which computation occurs as message passing between objects.
Question
The three fundamental features of an object-oriented programming language that support object-oriented development are __________________, _________________, and __________________.
Question
In procedural programming, the focus is on variables and the passing of variables to functions, whereas in object-oriented programming, the focus is on _____________ and _____________________________.
Question
Encapsulation provides a form of information hiding.
Question
Private members of a class in Python begin and end with two underscore characters.
Question
Information hiding is a form of abstraction.n.
Question
Getters and setters are methods providing controlled access to private instance variables.
Question
The def keyword is used to define classes, just as it is used to define functions.
Question
There is no means in Python for accessing the private members of a class.
Question
Name mangling occurs when the identifiers within a class are not sufficiently distinct.
Question
Functions serving as methods of a given class must have an extra first parameter, which by convention is named self.
Question
Although methods are defined as functions in Python, methods cannot raise an exception as regular functions can.
Question
Special methods are methods that are automatically called in Python.
Question
Special methods __repr__ and __str__ both produce the same string representation of a given object's value.
Question
There are special methods in Python corresponding to both arithmetic and relational operators.
Question
Selected members of a class can be made inaccessible ("hidden") from its clients, referred to as

A) blocked access
B) information hiding
C) information integrity
D) information management
Question
What keyword is used to define a new class in Python?

A) class
B) def
C) new
D) declare
Question
What is the name of the special method to initialized instance variables in Python?

A) __assign__
B) __set__
C) __init__
D) __initialize__
Question
Which of the following is the correct way to access private instance variable x in object a of type ClassA?

A) a.__x
B) a.__x__
C) a._ClassA__x
D) a.__ClassA__x
Question
Special Methods are defined with

A)two underscores before the method name
B) two underscores after the method name
C) two underscores before and after the method name
D) the key word special before the method definition
Question
_______________ is a fundamental feature of object-oriented programming languages that allows for information hiding.
Question
Private members of a class in Python must begin with two ________________ characters.
Question
Information hiding provides a form of ____________________.
Question
________ and _________ are methods providing controlled access to private instance variables.
Question
______________________ is used in Python to indicate that particular members of a class are to be considered private.
Question
Functions in Python meant to serve as methods of a particular class must have an added first parameter, by convention named ___________.
Question
Special methods are predefined methods in Python that are automatically called, with names that begin and end with two ___________________ characters.
Question
The two methods that are implemented to display the value of a given object are named__________ and ___________.
Question
For an XYCoord class that stores x and y private instance variables, how should the variables be named?
Question
Give appropriate getter and setter methods for an XYCoord class containing private instance variables x and y.
Question
Give an appropriate __init__ method for a class named FullName that stores the first and last name of a given individual. Assume that the class contains (private) instance variables first_name and last_name.
Question
For person1, an object instance of class FullName containing private instance variables first_name and last_name, indicate how each of these instance variables can be directly accessed from outside the class.
Question
For a class named FullName that contains an __init__ method that is passed a first and last name to construct a new object with, give an instruction that creates a new object of type FullName containing the name "Yu Huang."
Question
Give the __str__ method for a class named FullName that contains the first and last name of an individual, such that the name is displayed (when printed) in the form lastname, firstname. Assume that the class contains (private) instance variables first_name and last_name.
Question
For a class named Money that stores a dollar and cent amount, give an appropriate __add__ method. Assume that the class contains (private) instance variables dollars and cents. (Note: the cent amount stored should be in the range 0 to 99.)
Question
For a class named Money that stores a dollar and cent amount, give an appropriate __eq__ method that determines if two Money values are equal. (Note: the cent amount stored in Money objects is in the range 0 to 99.)
Question
Inheritance, in object-oriented programming, is the ability of a class to inherit members of another class as part of its own definition.
Question
The can be only one class defined for a given parent class in Python.
Question
There can be multiple levels of subclasses for a given class.
Question
All subclasses can serve as a subtype of its parent class.
Question
Another name for a subclass is a _____________ class or _____________ class.
Question
Another name for a superclass is a _____________ class or _____________ class.
Question
A _____________ is something that can be substituted for and behave as its parent type.
Question
Built-in function _______ can be used to determine the type (class name) of any value in Python.
Question
Built-in function _______ can be used to get the class description of a built-in type in Python.
Question
For class FullName that contains an __init__ method that is passed a first and last name to construct a new object with, define a subclass of the FullName class named FullNamePlus that also stores a person's middle name. The subclass should include an __init__ method, getter/setter methods, and a __str__ methods that displays a name in the form lastname, firstname middlename. (Assume that class FullName contains getter methods accessing the first and last names.)
Question
In object-oriented programming, polymorphism allows objects of different types, each with their own specific behaviors, to be treated as the same general type.
Question
A class in which one or more methods are unimplemented (or only implemented to raise an exception) is called an abstract class.
Question
The word polymorphism derives from Greek meaning:

A) something of a particular form
B) something with no particular form
C) something that can take many forms
D) something that can take any form
Question
Duck typing, used in Python, refers to the fact that:

A) all class types can be placed in order
B) all class types are automatically "imprinted" to be of type object
C) any class type can be redefined at runtime
D) any set of classes with a common set of methods, even if not subclasses of a common type,
Can be treated similarly
Question
A class with one or more unimplemented methods is called an __________ class.
Question
in Python, any set of classes with a common set of methods, even if not subclasses of a common type, can be treated similarly. This kind of typing is called ___________________.
Question
Give the definition of an abstract class named Currency that stores a currency amount (as an integer value). Include in the class an __init__ method and an abstract __str__ method. Define three subclasses of the Currency class named USCurrency (dollars), EuroCurrency (euros), and the ChineseCurrency (yuan). Implement the __str__ method of each so that the proper currency symbol is displayed. The Unicode string for displaying Euro and Chinese currency symbols are '\u20AC' and '\u5143, respectively.
Question
UML is a specification language specifically for specifying the design of Python programs.
Question
UML is a graphical programming language.
Question
A class diagram in UML is used to specify the static aspects of an object-oriented design.
Question
Interaction diagrams in UML are used to represent the interactions of the user of a given program.
Question
The most common relationship between classes is a UML class diagram is association.
Question
Multiplicity in a UML class diagrams refers to the total number of relationships defined between classes.
Question
Aggregation in UML defines a "part of" relationship.
Question
Role names are used to describe an association between two classes.
Question
The + and - symbols in UML class diagrams are used to denote

A) public and private access
B) instance variables and method members
C) built-in and user-defined classes
D) abstract and concrete methods
Question
Subclass relationships in UML are indicated by use of a solid line with a(n)

A) arrowhead
B) black square
C) closed arrowhead
D) black diamond
Question
A class that groups together a set of objects that exist independently of that class is referred to as

A) composition
B) aggregation
C) accumulation
D) multiplicity
Question
Match the descriptions with their terms:

-indicates the direction of method calls made

A) association
B) navigation
C) multiplicity
D) composition
E) aggregation
F) role names
Question
Match the descriptions with their terms:

-indicates a part-of relationship

A) association
B) navigation
C) multiplicity
D) composition
E) aggregation
F) role names
Question
Match the descriptions with their terms:

-indicates that the methods of one class are called by the methods of the other

A) association
B) navigation
C) multiplicity
D) composition
E) aggregation
F) role names
Question
Match the descriptions with their terms:

-indicates a grouping of classes

A) association
B) navigation
C) multiplicity
D) composition
E) aggregation
F) role names
Question
Match the descriptions with their terms:

-indicates the number of objects that may be associated

A) association
B) navigation
C) multiplicity
D) composition
E) aggregation
F) role names
Question
Match the descriptions with their terms:

-describes an association between two classes

A) association
B) navigation
C) multiplicity
D) composition
E) aggregation
F) role names
Question
Two types of diagrams in UML are _________ diagrams that express the static aspects of an object-oriented design, and _________ diagrams that denote the sequence of methods calls at execution time.
Question
The three sections of a class as denoted in UML are ____________, ______________, and __________.
Question
Initialization methods like __init__ in Python are named ______________ in UML.
Question
The direction of method calls between two classes can be optionally specified in UML by the use of ______________.
Question
_______________ in a UML class diagrams is used to indicate the number of objects that may be associated with an object of another type.
Question
____________ in UML class diagrams is indicated by the use of a filled diamond head, while __________ is indicated by use of an unfilled diamond head.
Question
Denote in UML a Fraction class with private instance variables numer and denom, an __init__ method, setter and getter methods, a method for properly displaying a fraction value, a method for adding two fraction values (such that the '+' symbol can be used, returning a Fraction result), and a method for comparing if two given Fraction objects are equal (using the '==' symbol, returning a Boolean result).
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/81
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 10: Object-Oriented Programming
1
A class specifies a set of instance variables and methods that are "bundled together" for defining a type of object.
True
2
A class can be used to make as many object instances of that type as needed.
True
3
The mere use of objects constitutes object-oriented programming.
False
4
Object-oriented programming languages provide three fundamental features that support a programming paradigm in which computation occurs as message passing between objects.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
5
The three fundamental features of an object-oriented programming language that support object-oriented development are __________________, _________________, and __________________.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
6
In procedural programming, the focus is on variables and the passing of variables to functions, whereas in object-oriented programming, the focus is on _____________ and _____________________________.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
7
Encapsulation provides a form of information hiding.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
8
Private members of a class in Python begin and end with two underscore characters.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
9
Information hiding is a form of abstraction.n.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
10
Getters and setters are methods providing controlled access to private instance variables.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
11
The def keyword is used to define classes, just as it is used to define functions.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
12
There is no means in Python for accessing the private members of a class.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
13
Name mangling occurs when the identifiers within a class are not sufficiently distinct.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
14
Functions serving as methods of a given class must have an extra first parameter, which by convention is named self.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
15
Although methods are defined as functions in Python, methods cannot raise an exception as regular functions can.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
16
Special methods are methods that are automatically called in Python.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
17
Special methods __repr__ and __str__ both produce the same string representation of a given object's value.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
18
There are special methods in Python corresponding to both arithmetic and relational operators.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
19
Selected members of a class can be made inaccessible ("hidden") from its clients, referred to as

A) blocked access
B) information hiding
C) information integrity
D) information management
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
20
What keyword is used to define a new class in Python?

A) class
B) def
C) new
D) declare
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
21
What is the name of the special method to initialized instance variables in Python?

A) __assign__
B) __set__
C) __init__
D) __initialize__
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
22
Which of the following is the correct way to access private instance variable x in object a of type ClassA?

A) a.__x
B) a.__x__
C) a._ClassA__x
D) a.__ClassA__x
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
23
Special Methods are defined with

A)two underscores before the method name
B) two underscores after the method name
C) two underscores before and after the method name
D) the key word special before the method definition
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
24
_______________ is a fundamental feature of object-oriented programming languages that allows for information hiding.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
25
Private members of a class in Python must begin with two ________________ characters.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
26
Information hiding provides a form of ____________________.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
27
________ and _________ are methods providing controlled access to private instance variables.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
28
______________________ is used in Python to indicate that particular members of a class are to be considered private.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
29
Functions in Python meant to serve as methods of a particular class must have an added first parameter, by convention named ___________.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
30
Special methods are predefined methods in Python that are automatically called, with names that begin and end with two ___________________ characters.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
31
The two methods that are implemented to display the value of a given object are named__________ and ___________.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
32
For an XYCoord class that stores x and y private instance variables, how should the variables be named?
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
33
Give appropriate getter and setter methods for an XYCoord class containing private instance variables x and y.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
34
Give an appropriate __init__ method for a class named FullName that stores the first and last name of a given individual. Assume that the class contains (private) instance variables first_name and last_name.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
35
For person1, an object instance of class FullName containing private instance variables first_name and last_name, indicate how each of these instance variables can be directly accessed from outside the class.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
36
For a class named FullName that contains an __init__ method that is passed a first and last name to construct a new object with, give an instruction that creates a new object of type FullName containing the name "Yu Huang."
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
37
Give the __str__ method for a class named FullName that contains the first and last name of an individual, such that the name is displayed (when printed) in the form lastname, firstname. Assume that the class contains (private) instance variables first_name and last_name.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
38
For a class named Money that stores a dollar and cent amount, give an appropriate __add__ method. Assume that the class contains (private) instance variables dollars and cents. (Note: the cent amount stored should be in the range 0 to 99.)
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
39
For a class named Money that stores a dollar and cent amount, give an appropriate __eq__ method that determines if two Money values are equal. (Note: the cent amount stored in Money objects is in the range 0 to 99.)
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
40
Inheritance, in object-oriented programming, is the ability of a class to inherit members of another class as part of its own definition.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
41
The can be only one class defined for a given parent class in Python.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
42
There can be multiple levels of subclasses for a given class.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
43
All subclasses can serve as a subtype of its parent class.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
44
Another name for a subclass is a _____________ class or _____________ class.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
45
Another name for a superclass is a _____________ class or _____________ class.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
46
A _____________ is something that can be substituted for and behave as its parent type.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
47
Built-in function _______ can be used to determine the type (class name) of any value in Python.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
48
Built-in function _______ can be used to get the class description of a built-in type in Python.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
49
For class FullName that contains an __init__ method that is passed a first and last name to construct a new object with, define a subclass of the FullName class named FullNamePlus that also stores a person's middle name. The subclass should include an __init__ method, getter/setter methods, and a __str__ methods that displays a name in the form lastname, firstname middlename. (Assume that class FullName contains getter methods accessing the first and last names.)
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
50
In object-oriented programming, polymorphism allows objects of different types, each with their own specific behaviors, to be treated as the same general type.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
51
A class in which one or more methods are unimplemented (or only implemented to raise an exception) is called an abstract class.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
52
The word polymorphism derives from Greek meaning:

A) something of a particular form
B) something with no particular form
C) something that can take many forms
D) something that can take any form
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
53
Duck typing, used in Python, refers to the fact that:

A) all class types can be placed in order
B) all class types are automatically "imprinted" to be of type object
C) any class type can be redefined at runtime
D) any set of classes with a common set of methods, even if not subclasses of a common type,
Can be treated similarly
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
54
A class with one or more unimplemented methods is called an __________ class.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
55
in Python, any set of classes with a common set of methods, even if not subclasses of a common type, can be treated similarly. This kind of typing is called ___________________.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
56
Give the definition of an abstract class named Currency that stores a currency amount (as an integer value). Include in the class an __init__ method and an abstract __str__ method. Define three subclasses of the Currency class named USCurrency (dollars), EuroCurrency (euros), and the ChineseCurrency (yuan). Implement the __str__ method of each so that the proper currency symbol is displayed. The Unicode string for displaying Euro and Chinese currency symbols are '\u20AC' and '\u5143, respectively.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
57
UML is a specification language specifically for specifying the design of Python programs.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
58
UML is a graphical programming language.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
59
A class diagram in UML is used to specify the static aspects of an object-oriented design.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
60
Interaction diagrams in UML are used to represent the interactions of the user of a given program.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
61
The most common relationship between classes is a UML class diagram is association.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
62
Multiplicity in a UML class diagrams refers to the total number of relationships defined between classes.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
63
Aggregation in UML defines a "part of" relationship.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
64
Role names are used to describe an association between two classes.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
65
The + and - symbols in UML class diagrams are used to denote

A) public and private access
B) instance variables and method members
C) built-in and user-defined classes
D) abstract and concrete methods
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
66
Subclass relationships in UML are indicated by use of a solid line with a(n)

A) arrowhead
B) black square
C) closed arrowhead
D) black diamond
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
67
A class that groups together a set of objects that exist independently of that class is referred to as

A) composition
B) aggregation
C) accumulation
D) multiplicity
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
68
Match the descriptions with their terms:

-indicates the direction of method calls made

A) association
B) navigation
C) multiplicity
D) composition
E) aggregation
F) role names
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
69
Match the descriptions with their terms:

-indicates a part-of relationship

A) association
B) navigation
C) multiplicity
D) composition
E) aggregation
F) role names
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
70
Match the descriptions with their terms:

-indicates that the methods of one class are called by the methods of the other

A) association
B) navigation
C) multiplicity
D) composition
E) aggregation
F) role names
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
71
Match the descriptions with their terms:

-indicates a grouping of classes

A) association
B) navigation
C) multiplicity
D) composition
E) aggregation
F) role names
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
72
Match the descriptions with their terms:

-indicates the number of objects that may be associated

A) association
B) navigation
C) multiplicity
D) composition
E) aggregation
F) role names
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
73
Match the descriptions with their terms:

-describes an association between two classes

A) association
B) navigation
C) multiplicity
D) composition
E) aggregation
F) role names
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
74
Two types of diagrams in UML are _________ diagrams that express the static aspects of an object-oriented design, and _________ diagrams that denote the sequence of methods calls at execution time.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
75
The three sections of a class as denoted in UML are ____________, ______________, and __________.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
76
Initialization methods like __init__ in Python are named ______________ in UML.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
77
The direction of method calls between two classes can be optionally specified in UML by the use of ______________.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
78
_______________ in a UML class diagrams is used to indicate the number of objects that may be associated with an object of another type.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
79
____________ in UML class diagrams is indicated by the use of a filled diamond head, while __________ is indicated by use of an unfilled diamond head.
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
80
Denote in UML a Fraction class with private instance variables numer and denom, an __init__ method, setter and getter methods, a method for properly displaying a fraction value, a method for adding two fraction values (such that the '+' symbol can be used, returning a Fraction result), and a method for comparing if two given Fraction objects are equal (using the '==' symbol, returning a Boolean result).
Unlock Deck
Unlock for access to all 81 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 81 flashcards in this deck.