Deck 12: Object-Oriented Design

Full screen (f)
exit full mode
Question
After you have identified a set of classes needed for a program, you should now ____.
A.Define the behavior of each class.
B.Look for nouns that describe the tasks.
C.Begin writing the code for the classes.
D.Establish the relationships between the classes.
Use Space or
up arrow
down arrow
to flip the card.
Question
Why is it generally considered good practice to minimize coupling between classes?
A.Low coupling increases the operational efficiency of a program.
B.High coupling implies less interface cohesion.
C.High coupling increases program maintenance and hinders code reuse.
D.Low coupling decreases the probability of code redundancy.
Question
You are designing an application to support an automobile rental agency.Which of the following probably should NOT be represented as an object?
A.Automobile
B.Customer
C.Payment amount
D.Rental contract
Question
A class (ClassOne) is considered to have a dependency on another class (ClassTwo) under which of the following conditions?
A.Each class uses objects of the other.
B.The public interfaces of both classes are cohesive.
C.ClassTwo uses objects of ClassOne.
D.ClassOne uses objects of ClassTwo.
Question
If many classes of a program depend on each other, we say that ____.
A.cohesiveness is high.
B.cohesiveness is low.
C.coupling is high.
D.coupling is low.
Question
Classes often correspond to ____ in a requirements description.
A.Verbs
B.Nouns
C.Dependencies
D.Relationships
Question
In a UML diagram, dependency is denoted by ____.
A.A dotted/dashed line with a closed arrow tip.
B.A solid line with a closed arrow tip.
C.A dotted/dashed line with an open arrow tip.
D.A solid line with an open arrow tip.
Question
Which of the following would be an appropriate name for a class used in an inventory application?
A.Product
B.InitializeInventoryLevel
C.ResetCurrentInventoryLevel
D.ReceiveNewProducts
Question
A UML class diagram would be most useful in visually illustrating which of the following?
A.The cohesiveness of a class's interface.
B.The amount of complexity of a class's interface.
C.Dependencies between classes.
D.Relationships between classes and their interfaces.
Question
What is a general naming convention for a class?
A.The name for such a class should be an adjective that describes the concept
B.The name for such a class should be a noun that describes the concept
C.The name for such a class should be a verb that describes the concept
D.None of the above
Question
A/an ____ is used to create objects with the same behavior.
A.Association
B.Aggregation
C.Dependency
D.Class
Question
When using the CRC method, other classes that are needed to fulfill the responsibilities of a given class are called its ____.
A.Related classes
B.Responsible classes
C.Collaborators
D.Concurrent classes
Question
Dependency between classes denotes that ____.
A.Objects of one class inherit from objects of its superclass.
B.Objects of one class can be inherited by its subclasses.
C.Objects of one class implement an interface.
D.Methods in the objects of one class use an object of another class.
Question
A CRC card describes ____.
A.A class, its responsibilities, and its collaborating classes.
B.A class, its methods, and its constructors.
C.A class, its relationships, and its collaborating classes.
D.A class, its requirements, and its concurrent classes.
Question
Which of the following questions should you ask yourself in order to determine if you have named your class properly?
A.Does the class name contain eight or fewer characters?
B.Is the class name a verb?
C.Can I describe an object of the class?
D.Does the class name describe the tasks that this class will accomplish?
Question
How many responsibilities is/are recommended by researchers on a CRC card?
A.Only one per card.
B.At most two per card.
C.At most three per card.
D.There is no limit of responsibilities per card.
Question
When you begin designing a program, you work from a ____, a description of what your program should do.
A.Requirements specification
B.Blueprint
C.UML Diagram
D.Recipe
Question
Which of the following most likely indicates that you have chosen a good name for your class?
A.The name consists of a single word.
B.You can tell by the name what an object of the class is supposed to represent.
C.You can easily determine by the name how many concepts the class represents.
D.The name describes what task the class will perform.
Question
When using the CRC method, if you determine that a class cannot carry out a particular task by itself and needs the help of another class to complete the task, you should ____.
A.Do nothing on this class's CRC card.The task will be shown on the other class's CRC card.
B.Add this class onto the other class's CRC card as a collaborator.
C.Add the other class onto this class's CRC card as a collaborator.
D.Add each class onto the other class's CRC card as a collaborator.
Question
Which of the following is the most important consideration when designing a class?
A.Each class should represent an appropriate mathematical concept.
B.Each class should represent a single concept or object from the problem domain.
C.Each class should represent no more than three specific concepts.
D.Each class should represent multiple concepts only if they are closely related.
Question
Which of the following code snippets denotes that the Purse class depends on the Wallet class? Which of the following code snippets denotes that the Purse class depends on the Wallet class?  <div style=padding-top: 35px>
Question
Aggregation denotes that ____.
A.Objects of one class inherit from objects of its superclass.
B.Objects of one class can be inherited by its subclasses.
C.Objects of one class contain references to objects of its superclass.
D.Objects of one class contain references to objects of another class.
Question
Consider the following code snippet: Consider the following code snippet:   This code is best described as an example of ____. A.Inheritance. B.Aggregation. C.Polymorphism. D.Association.<div style=padding-top: 35px> This code is best described as an example of ____.
A.Inheritance.
B.Aggregation.
C.Polymorphism.
D.Association.
Question
The dependency relationship is sometimes referred to as the ____ relationship.
A.is-a
B.has-a
C.depends-on
D.knows-about
Question
Which statement correctly describes the class relationship shown in this diagram? Which statement correctly describes the class relationship shown in this diagram?   A.CashRegister class depends on Coin class B.Coin class depends on CashRegister class C.CashRegister class aggregates Coin class. D.Coin class inherits from CashRegister class.<div style=padding-top: 35px>
A.CashRegister class depends on Coin class
B.Coin class depends on CashRegister class
C.CashRegister class aggregates Coin class.
D.Coin class inherits from CashRegister class.
Question
Which of the following code snippets denotes that the Pen class depends on the Ink class? Which of the following code snippets denotes that the Pen class depends on the Ink class?  <div style=padding-top: 35px>
Question
Consider the following code snippet: Consider the following code snippet:   Which of the following statements is correct? A.Purse aggregates Coin. B.Coin depends on Purse. C.The Coin class must be declared as an inner class within Purse. D.Coin inherits from Purse.<div style=padding-top: 35px> Which of the following statements is correct?
A.Purse aggregates Coin.
B.Coin depends on Purse.
C.The Coin class must be declared as an inner class within Purse.
D.Coin inherits from Purse.
Question
____ is often described as the has-a relationship.
A.Inheritance
B.Aggregation
C.Polymorphism
D.Dependency
Question
Consider the following code snippet: Consider the following code snippet:   This code is best described as an example of ____. A.Inheritance. B.Aggregation. C.Polymorphism. D.Association.<div style=padding-top: 35px> This code is best described as an example of ____.
A.Inheritance.
B.Aggregation.
C.Polymorphism.
D.Association.
Question
Which of the following code snippets denotes that the Kitchen class aggregates the Dish class? Which of the following code snippets denotes that the Kitchen class aggregates the Dish class?  <div style=padding-top: 35px>
Question
Which of the following code snippets denotes that the Kitchen class depends on the Stove class? Which of the following code snippets denotes that the Kitchen class depends on the Stove class?  <div style=padding-top: 35px>
Question
In a UML diagram, aggregation is denoted by ____.
A.A solid line with a diamond-shaped symbol next to the aggregating class.
B.An arrow with an open triangle pointing to the aggregating class.
C.A dotted line with a diamond-shaped symbol next to the aggregating class.
D.A dotted line with an open arrow tip pointing to the aggregating class.
Question
Which statement correctly describes the class relationship shown in this diagram? Which statement correctly describes the class relationship shown in this diagram?   A.Quiz class depends on Question class B.Question class aggregates Quiz class C.Quiz class aggregates Question class. D.Question class inherits from Quiz class.<div style=padding-top: 35px>
A.Quiz class depends on Question class
B.Question class aggregates Quiz class
C.Quiz class aggregates Question class.
D.Question class inherits from Quiz class.
Question
A Quiz class contains an array of Question objects.This is best described as an example of ____.
A.Aggregation
B.Cohesiveness
C.Association
D.Inheritance
Question
A CashRegister class contains an array list of Coin objects.This is best described as an example of ____.
A.Association
B.Inheritance
C.Cohesiveness
D.Aggregation
Question
Consider the following code snippet: Consider the following code snippet:   Which of the following statements correctly describes the relationship between the Motorcycle and Tire classes? A.Motorcycle exhibits the has-a relationship with regards to Tire. B.Motorcycle exhibits the is-a relationship with regard to Tire. C.Tire exhibits the has-a relationship with regards to Motorcycle. D.Tire exhibits the is-a relationship with regards to Motorcycle.<div style=padding-top: 35px> Which of the following statements correctly describes the relationship between the Motorcycle and Tire classes?
A.Motorcycle exhibits the has-a relationship with regards to Tire.
B.Motorcycle exhibits the is-a relationship with regard to Tire.
C.Tire exhibits the has-a relationship with regards to Motorcycle.
D.Tire exhibits the is-a relationship with regards to Motorcycle.
Question
Which of the following statements is correct?
A.Dependency is a stronger form of aggregation.
B.Aggregation indicates high cohesiveness.
C.Aggregation indicates low coupling.
D.Aggregation is a stronger form of dependency.
Question
UML means____.
A.Unified Mode Language
B.User Modeling Language
C.User Mode Language.
D.Unified Modeling Language.
Question
In general, you need ____ when an object needs to remember another object between method calls.
A.Inheritance
B.Aggregation
C.Association
D.An interface implementation
Question
____ is often described as the is-a relationship.
A.Inheritance
B.Aggregation
C.Polymorphism
D.Dependency
Question
Consider the following code snippet: Consider the following code snippet:   Which of the following statements describing relationships between the Motorcycle, Tire, Engine and Vehicle classes is NOT correct? A.Motorcycle exhibits the has-a relationship with regards to Tire. B.Motorcycle exhibits the is-a relationship with regard to Vehicle. C.Vehicle exhibits the has-a relationship with regards to Motorcycle. D.Motorcycle exhibits the knows-about relationship with regards to Engine.<div style=padding-top: 35px> Which of the following statements describing relationships between the Motorcycle, Tire, Engine and Vehicle classes is NOT correct?
A.Motorcycle exhibits the has-a relationship with regards to Tire.
B.Motorcycle exhibits the is-a relationship with regard to Vehicle.
C.Vehicle exhibits the has-a relationship with regards to Motorcycle.
D.Motorcycle exhibits the knows-about relationship with regards to Engine.
Question
You have determined a need for an Employee class and a TemporaryEmployee class in your program.Which relationship is most appropriate between these classes?
A.Inheritance
B.Aggregation
C.Dependency
D.Interface implementation
Question
Which of the followings statements about class relationships is correct?
A.Inheritance represents the is-a relationship, while aggregation represents the has-a relationship.
B.Inheritance represents the has-a relationship, while dependency represents the knows about relationship.
C.Aggregation represents the is-a relationship, while inheritance represents the knows about relationship.
D.Aggregation represents the has-a relationship, while dependence represents the is-a relationship.
Question
Consider the following code snippet: Consider the following code snippet:   Which of the following statements is NOT correct? A.SailBoat inherits from Vessel. B.Catamaran inherits from Vessel. C.Catamaran inherits from Sailboat. D.Catamaran depends on SailBoat.<div style=padding-top: 35px> Which of the following statements is NOT correct?
A.SailBoat inherits from Vessel.
B.Catamaran inherits from Vessel.
C.Catamaran inherits from Sailboat.
D.Catamaran depends on SailBoat.
Question
Consider the following code snippet: Consider the following code snippet:   Which of the following statements correctly describes the relationship between the Motorcycle and Vehicle classes? A.Motorcycle exhibits the has-a relationship with regards to Vehicle. B.Motorcycle exhibits the is-a relationship with regard to Vehicle. C.Vehicle exhibits the has-a relationship with regards to Motorcycle. D.Vehicle exhibits the is-a relationship with regards to Motorcycle.<div style=padding-top: 35px> Which of the following statements correctly describes the relationship between the Motorcycle and Vehicle classes?
A.Motorcycle exhibits the has-a relationship with regards to Vehicle.
B.Motorcycle exhibits the is-a relationship with regard to Vehicle.
C.Vehicle exhibits the has-a relationship with regards to Motorcycle.
D.Vehicle exhibits the is-a relationship with regards to Motorcycle.
Question
In a UML diagram, an interface implementation is denoted by ____.
A.A dotted line with a closed arrow tip.
B.A solid line with a closed arrow tip.
C.A dotted line with an open arrow tip.
D.A solid line with an open arrow tip.
Question
Consider the following code snippet: Consider the following code snippet:   This code is best described as an example of ____. A.Inheritance and multiplicities. B.Aggregation and association. C.Inheritance and aggregation. D.Association and multiplicities.<div style=padding-top: 35px> This code is best described as an example of ____.
A.Inheritance and multiplicities.
B.Aggregation and association.
C.Inheritance and aggregation.
D.Association and multiplicities.
Question
Which statement correctly describes the class relationship shown in this diagram? Which statement correctly describes the class relationship shown in this diagram?   A.Vehicle class depends on Car class B.Car class depends on Vehicle class C.Vehicle class inherits from Car class. D.Car class inherits from Vehicle class.<div style=padding-top: 35px>
A.Vehicle class depends on Car class
B.Car class depends on Vehicle class
C.Vehicle class inherits from Car class.
D.Car class inherits from Vehicle class.
Question
In a UML diagram, the relationship symbol shown below denotes ____. In a UML diagram, the relationship symbol shown below denotes ____.   A.Inheritance B.Aggregation C.Dependency D.Interface implementation<div style=padding-top: 35px>
A.Inheritance
B.Aggregation
C.Dependency
D.Interface implementation
Question
In a UML diagram, the relationship symbol shown below denotes ____. In a UML diagram, the relationship symbol shown below denotes ____.   A.Inheritance B.Aggregation C.Dependency D.Interface implementation<div style=padding-top: 35px>
A.Inheritance
B.Aggregation
C.Dependency
D.Interface implementation
Question
Consider the following code snippet: Consider the following code snippet:   Which of the following statements is NOT correct? A.Manager inherits from Employee. B.Address aggregates Manager. C.Manager aggregates Address. D.Manager aggregates Project.<div style=padding-top: 35px> Which of the following statements is NOT correct?
A.Manager inherits from Employee.
B.Address aggregates Manager.
C.Manager aggregates Address.
D.Manager aggregates Project.
Question
In a UML diagram, inheritance is denoted by ____.
A.A solid line with a diamond-shaped symbol next to the superclass.
B.A solid line with a closed arrow tip pointing to the superclass.
C.A dotted line with an open arrow tip pointing to the superclass.
D.A solid line with an open arrow tip pointing to the superclass.
Question
____ relationships come from the collaboration columns on the CRC cards.
A.Association
B.Inheritance
C.Dependency
D.Attribute
Question
Consider the following code snippet: Consider the following code snippet:   Which of the following statements is NOT correct? A.SailBoat inherits from Vessel. B.Sail depends on Sailboat. C.Sailboat aggregates Engine. D.SailBoat aggregates Sail.<div style=padding-top: 35px> Which of the following statements is NOT correct?
A.SailBoat inherits from Vessel.
B.Sail depends on Sailboat.
C.Sailboat aggregates Engine.
D.SailBoat aggregates Sail.
Question
Which of the following code snippets denotes that the Rose class inherits from the Flower class? Which of the following code snippets denotes that the Rose class inherits from the Flower class?  <div style=padding-top: 35px>
Question
Which statement correctly describes the class relationship shown in this diagram? Which statement correctly describes the class relationship shown in this diagram?   A.Tire class aggregates Car class. B.Car class aggregates Tire class. C.Car class inherits from Tire class. D.Tire class inherits from Car class.<div style=padding-top: 35px>
A.Tire class aggregates Car class.
B.Car class aggregates Tire class.
C.Car class inherits from Tire class.
D.Tire class inherits from Car class.
Question
Consider the following code snippet: Consider the following code snippet:   This code is best described as an example of ____. A.Inheritance and multiplicities. B.Aggregation and dependency. C.Inheritance and aggregation. D.Inheritance and interface.<div style=padding-top: 35px> This code is best described as an example of ____.
A.Inheritance and multiplicities.
B.Aggregation and dependency.
C.Inheritance and aggregation.
D.Inheritance and interface.
Question
In a UML diagram, the relationship symbol shown below denotes ____. In a UML diagram, the relationship symbol shown below denotes ____.   A.Inheritance B.Aggregation C.Dependency D.Interface implementation<div style=padding-top: 35px>
A.Inheritance
B.Aggregation
C.Dependency
D.Interface implementation
Question
You have determined a need for a Book class and a Page class in your program.Which relationship is most appropriate between these classes?
A.Inheritance
B.Aggregation
C.Dependency
D.Interface implementation
Question
When designing classes, if you find classes with common behavior you should ____.
A.Combine them all into a single class.
B.Place some common behavior into a superclass.
C.Place the common behavior into a subclass.
D.Give them similar names.
Question
Select a code segment to complete the Name class, so that it reflects a dependency relationship between Name and String. Select a code segment to complete the Name class, so that it reflects a dependency relationship between Name and String.  <div style=padding-top: 35px>
Question
Every dolphin has a fin.Every dolphin is an animal.What kind of relationship would best describe the first and second statements?
A.Dependency : Inheritance
B.Coupling : Dependency
C.Inheritance : Aggregation
D.Aggregation : Inheritance
Question
Which of the following statements about class attributes is true?
A.An attribute always corresponds to an instance variable of the class.
B.An attribute is an externally observable property that objects of the class have.
C.An attribute is used to represent aggregation with another class.
D.Attributes cannot be represented in UML diagrams.
Question
Which of the following statements is true about Coupling?
A.Coupling between classes is high if there are no dependencies between classes
B.Coupling between classes is high if there are few dependencies between classes
C.Coupling between classes is low if there are no dependencies between classes
D.Coupling between classes is low if there are few dependencies between classes
Question
Given the following diagram: Given the following diagram:   What does this diagram indicate about the relationship between the customers and bank accounts? A.A bank account may be owned by only one customer. B.A bank account may be owned by one or more customers. C.A customer may have only one bank account. D.A customer may have one or more bank accounts.<div style=padding-top: 35px> What does this diagram indicate about the relationship between the customers and bank accounts?
A.A bank account may be owned by only one customer.
B.A bank account may be owned by one or more customers.
C.A customer may have only one bank account.
D.A customer may have one or more bank accounts.
Question
You are designing a software solution for a veterinary clinic.The clinic provides various services for each pet on each visit.You have decided that the following nouns apply to the requirements: Customer, Address, Pet, Visit, Visit Date, Service Charge, Total Charge, Next Appointment.Which of these should be represented as classes?
A.All of them.
B.Customer, Address, Pet, Visit.
C.Customer, Address, Pet, Visit, Service Charge.
D.Customer, Address, Pet, Visit, Service Charge, Total Charge, Visit Date, Next Appointment.
Question
When using CRC cards, UML diagrams should be created ___.
A.Prior to discovering classes.
B.After you have discovered classes and their relationships.
C.During the implementation phase.
D.To produce final documentation of the system.
Question
Which of the following statements about associations between classes is true?
A.A class is associated with another class if both classes are in the same package.
B.A class is associated with another class if the class inherits from the other class.
C.A class is associated with another class if the other class inherits from this class.
D.A class is associated with another class if you can navigate from objects of one class to objects of the other class.
Question
Before you begin designing a solution, you should ____.
A.Document the methods that will be needed.
B.Gather and document all requirements for the program in plain English.
C.Determine the classes that will be needed.
D.Create the UML diagrams to represent the classes.
Question
You are designing a software solution for an automobile rental company.A customer may rent only a single auto at a given time.You have decided that the following classes are needed: Auto, Customer, Address, Rental Contract.Which of these should be represented as aggregation?
A.Rental Contract class aggregates Address class
B.Rental Contract class aggregates Customer and Address classes.
C.Rental Contract class aggregates Customer, Address, and Auto classes.
D.Rental Contract class does not aggregate any of the other classes.
Question
You have determined the need for a File class and a Folder class in your program.Which of the following would best describe the relationship between these classes?
A.Aggregation
B.Association
C.Composition
D.Inheritance
Question
You are designing a software solution for an automobile rental company.You have decided that the following nouns apply to the requirements: Auto, Customer, Address, Rental Contract, Mileage, Rental Date, Daily Rate, Total.Which of these should be represented as classes?
A.All of them.
B.Auto, Customer, Address, Rental Contract.
C.Auto, Customer, Address, Rental Contract, Mileage.
D.Auto, Customer, Address, Rental Contract, Mileage, Rental Date, Daily Rate.
Question
Select a code segment to complete the Player class, so that it reflects an inheritance relationship between Player and Person. Select a code segment to complete the Player class, so that it reflects an inheritance relationship between Player and Person.  <div style=padding-top: 35px>
Question
All smartphones are phones, but not all phones are smartphones.This type of relationship is best described by:
A.Aggregation
B.Dependency
C.Inheritance
D.Coupling
Question
Select a code segment to complete the Team class, so that it reflects an aggregation relationship between Team and Player. Select a code segment to complete the Team class, so that it reflects an aggregation relationship between Team and Player.  <div style=padding-top: 35px>
Question
Select a code segment to complete the SmartPhone class, so that it reflects an interface implementation relationship between SmartPhone and MP3Player. Select a code segment to complete the SmartPhone class, so that it reflects an interface implementation relationship between SmartPhone and MP3Player.  <div style=padding-top: 35px>
Question
The textbook recommends a five-part program development process consisting of the following activities:
I Use UML diagrams to record class relationships.
II Gather requirements.
III Implement the program.
IV Use CRC cards to identify classes.
V Use javadoc to document method behavior.
Which is the correct order in which these activities should be completed?
A.IV, II, I, III, V
B.IV, II, I, V, III
C.II, IV, I, III, V
D.II, IV, I, V, III
Question
How does a UML diagram denote a multiplicity of one or more in an aggregation relationship?
A.*
B.1..*
C.*..1
D.1..n
Question
How does a UML diagram denote classes and their attributes and methods?
A.A class rectangle contains the class name in the top, methods in the middle, and attributes in the bottom.
B.A class rectangle contains the class name in the top, attributes in the middle, and methods in the bottom.
C.A class rectangle contains the methods in the top, class name in the middle, and attributes in the bottom.
D.A class rectangle contains the attributes in the top, methods in the middle, and class name in the bottom.
Question
You are designing a software solution for an automobile rental company.You have decided that the following nouns apply to the requirements: Auto, Customer, Address, Rental Contract, Mileage, Rental Date, Daily Rate, Total.Which of these should be represented as instance variables?
A.Mileage
B.Mileage, Daily Rate.
C.Mileage, Rental Date, Daily Rate.
D.Mileage, Rental Date, Daily Rate, Total.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/104
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 12: Object-Oriented Design
1
After you have identified a set of classes needed for a program, you should now ____.
A.Define the behavior of each class.
B.Look for nouns that describe the tasks.
C.Begin writing the code for the classes.
D.Establish the relationships between the classes.
Define the behavior of each class.
2
Why is it generally considered good practice to minimize coupling between classes?
A.Low coupling increases the operational efficiency of a program.
B.High coupling implies less interface cohesion.
C.High coupling increases program maintenance and hinders code reuse.
D.Low coupling decreases the probability of code redundancy.
High coupling increases program maintenance and hinders code reuse.
3
You are designing an application to support an automobile rental agency.Which of the following probably should NOT be represented as an object?
A.Automobile
B.Customer
C.Payment amount
D.Rental contract
Payment amount
4
A class (ClassOne) is considered to have a dependency on another class (ClassTwo) under which of the following conditions?
A.Each class uses objects of the other.
B.The public interfaces of both classes are cohesive.
C.ClassTwo uses objects of ClassOne.
D.ClassOne uses objects of ClassTwo.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
5
If many classes of a program depend on each other, we say that ____.
A.cohesiveness is high.
B.cohesiveness is low.
C.coupling is high.
D.coupling is low.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
6
Classes often correspond to ____ in a requirements description.
A.Verbs
B.Nouns
C.Dependencies
D.Relationships
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
7
In a UML diagram, dependency is denoted by ____.
A.A dotted/dashed line with a closed arrow tip.
B.A solid line with a closed arrow tip.
C.A dotted/dashed line with an open arrow tip.
D.A solid line with an open arrow tip.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
8
Which of the following would be an appropriate name for a class used in an inventory application?
A.Product
B.InitializeInventoryLevel
C.ResetCurrentInventoryLevel
D.ReceiveNewProducts
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
9
A UML class diagram would be most useful in visually illustrating which of the following?
A.The cohesiveness of a class's interface.
B.The amount of complexity of a class's interface.
C.Dependencies between classes.
D.Relationships between classes and their interfaces.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
10
What is a general naming convention for a class?
A.The name for such a class should be an adjective that describes the concept
B.The name for such a class should be a noun that describes the concept
C.The name for such a class should be a verb that describes the concept
D.None of the above
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
11
A/an ____ is used to create objects with the same behavior.
A.Association
B.Aggregation
C.Dependency
D.Class
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
12
When using the CRC method, other classes that are needed to fulfill the responsibilities of a given class are called its ____.
A.Related classes
B.Responsible classes
C.Collaborators
D.Concurrent classes
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
13
Dependency between classes denotes that ____.
A.Objects of one class inherit from objects of its superclass.
B.Objects of one class can be inherited by its subclasses.
C.Objects of one class implement an interface.
D.Methods in the objects of one class use an object of another class.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
14
A CRC card describes ____.
A.A class, its responsibilities, and its collaborating classes.
B.A class, its methods, and its constructors.
C.A class, its relationships, and its collaborating classes.
D.A class, its requirements, and its concurrent classes.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
15
Which of the following questions should you ask yourself in order to determine if you have named your class properly?
A.Does the class name contain eight or fewer characters?
B.Is the class name a verb?
C.Can I describe an object of the class?
D.Does the class name describe the tasks that this class will accomplish?
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
16
How many responsibilities is/are recommended by researchers on a CRC card?
A.Only one per card.
B.At most two per card.
C.At most three per card.
D.There is no limit of responsibilities per card.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
17
When you begin designing a program, you work from a ____, a description of what your program should do.
A.Requirements specification
B.Blueprint
C.UML Diagram
D.Recipe
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
18
Which of the following most likely indicates that you have chosen a good name for your class?
A.The name consists of a single word.
B.You can tell by the name what an object of the class is supposed to represent.
C.You can easily determine by the name how many concepts the class represents.
D.The name describes what task the class will perform.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
19
When using the CRC method, if you determine that a class cannot carry out a particular task by itself and needs the help of another class to complete the task, you should ____.
A.Do nothing on this class's CRC card.The task will be shown on the other class's CRC card.
B.Add this class onto the other class's CRC card as a collaborator.
C.Add the other class onto this class's CRC card as a collaborator.
D.Add each class onto the other class's CRC card as a collaborator.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
20
Which of the following is the most important consideration when designing a class?
A.Each class should represent an appropriate mathematical concept.
B.Each class should represent a single concept or object from the problem domain.
C.Each class should represent no more than three specific concepts.
D.Each class should represent multiple concepts only if they are closely related.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
21
Which of the following code snippets denotes that the Purse class depends on the Wallet class? Which of the following code snippets denotes that the Purse class depends on the Wallet class?
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
22
Aggregation denotes that ____.
A.Objects of one class inherit from objects of its superclass.
B.Objects of one class can be inherited by its subclasses.
C.Objects of one class contain references to objects of its superclass.
D.Objects of one class contain references to objects of another class.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
23
Consider the following code snippet: Consider the following code snippet:   This code is best described as an example of ____. A.Inheritance. B.Aggregation. C.Polymorphism. D.Association. This code is best described as an example of ____.
A.Inheritance.
B.Aggregation.
C.Polymorphism.
D.Association.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
24
The dependency relationship is sometimes referred to as the ____ relationship.
A.is-a
B.has-a
C.depends-on
D.knows-about
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
25
Which statement correctly describes the class relationship shown in this diagram? Which statement correctly describes the class relationship shown in this diagram?   A.CashRegister class depends on Coin class B.Coin class depends on CashRegister class C.CashRegister class aggregates Coin class. D.Coin class inherits from CashRegister class.
A.CashRegister class depends on Coin class
B.Coin class depends on CashRegister class
C.CashRegister class aggregates Coin class.
D.Coin class inherits from CashRegister class.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
26
Which of the following code snippets denotes that the Pen class depends on the Ink class? Which of the following code snippets denotes that the Pen class depends on the Ink class?
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
27
Consider the following code snippet: Consider the following code snippet:   Which of the following statements is correct? A.Purse aggregates Coin. B.Coin depends on Purse. C.The Coin class must be declared as an inner class within Purse. D.Coin inherits from Purse. Which of the following statements is correct?
A.Purse aggregates Coin.
B.Coin depends on Purse.
C.The Coin class must be declared as an inner class within Purse.
D.Coin inherits from Purse.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
28
____ is often described as the has-a relationship.
A.Inheritance
B.Aggregation
C.Polymorphism
D.Dependency
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
29
Consider the following code snippet: Consider the following code snippet:   This code is best described as an example of ____. A.Inheritance. B.Aggregation. C.Polymorphism. D.Association. This code is best described as an example of ____.
A.Inheritance.
B.Aggregation.
C.Polymorphism.
D.Association.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
30
Which of the following code snippets denotes that the Kitchen class aggregates the Dish class? Which of the following code snippets denotes that the Kitchen class aggregates the Dish class?
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
31
Which of the following code snippets denotes that the Kitchen class depends on the Stove class? Which of the following code snippets denotes that the Kitchen class depends on the Stove class?
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
32
In a UML diagram, aggregation is denoted by ____.
A.A solid line with a diamond-shaped symbol next to the aggregating class.
B.An arrow with an open triangle pointing to the aggregating class.
C.A dotted line with a diamond-shaped symbol next to the aggregating class.
D.A dotted line with an open arrow tip pointing to the aggregating class.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
33
Which statement correctly describes the class relationship shown in this diagram? Which statement correctly describes the class relationship shown in this diagram?   A.Quiz class depends on Question class B.Question class aggregates Quiz class C.Quiz class aggregates Question class. D.Question class inherits from Quiz class.
A.Quiz class depends on Question class
B.Question class aggregates Quiz class
C.Quiz class aggregates Question class.
D.Question class inherits from Quiz class.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
34
A Quiz class contains an array of Question objects.This is best described as an example of ____.
A.Aggregation
B.Cohesiveness
C.Association
D.Inheritance
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
35
A CashRegister class contains an array list of Coin objects.This is best described as an example of ____.
A.Association
B.Inheritance
C.Cohesiveness
D.Aggregation
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
36
Consider the following code snippet: Consider the following code snippet:   Which of the following statements correctly describes the relationship between the Motorcycle and Tire classes? A.Motorcycle exhibits the has-a relationship with regards to Tire. B.Motorcycle exhibits the is-a relationship with regard to Tire. C.Tire exhibits the has-a relationship with regards to Motorcycle. D.Tire exhibits the is-a relationship with regards to Motorcycle. Which of the following statements correctly describes the relationship between the Motorcycle and Tire classes?
A.Motorcycle exhibits the has-a relationship with regards to Tire.
B.Motorcycle exhibits the is-a relationship with regard to Tire.
C.Tire exhibits the has-a relationship with regards to Motorcycle.
D.Tire exhibits the is-a relationship with regards to Motorcycle.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
37
Which of the following statements is correct?
A.Dependency is a stronger form of aggregation.
B.Aggregation indicates high cohesiveness.
C.Aggregation indicates low coupling.
D.Aggregation is a stronger form of dependency.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
38
UML means____.
A.Unified Mode Language
B.User Modeling Language
C.User Mode Language.
D.Unified Modeling Language.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
39
In general, you need ____ when an object needs to remember another object between method calls.
A.Inheritance
B.Aggregation
C.Association
D.An interface implementation
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
40
____ is often described as the is-a relationship.
A.Inheritance
B.Aggregation
C.Polymorphism
D.Dependency
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
41
Consider the following code snippet: Consider the following code snippet:   Which of the following statements describing relationships between the Motorcycle, Tire, Engine and Vehicle classes is NOT correct? A.Motorcycle exhibits the has-a relationship with regards to Tire. B.Motorcycle exhibits the is-a relationship with regard to Vehicle. C.Vehicle exhibits the has-a relationship with regards to Motorcycle. D.Motorcycle exhibits the knows-about relationship with regards to Engine. Which of the following statements describing relationships between the Motorcycle, Tire, Engine and Vehicle classes is NOT correct?
A.Motorcycle exhibits the has-a relationship with regards to Tire.
B.Motorcycle exhibits the is-a relationship with regard to Vehicle.
C.Vehicle exhibits the has-a relationship with regards to Motorcycle.
D.Motorcycle exhibits the knows-about relationship with regards to Engine.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
42
You have determined a need for an Employee class and a TemporaryEmployee class in your program.Which relationship is most appropriate between these classes?
A.Inheritance
B.Aggregation
C.Dependency
D.Interface implementation
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
43
Which of the followings statements about class relationships is correct?
A.Inheritance represents the is-a relationship, while aggregation represents the has-a relationship.
B.Inheritance represents the has-a relationship, while dependency represents the knows about relationship.
C.Aggregation represents the is-a relationship, while inheritance represents the knows about relationship.
D.Aggregation represents the has-a relationship, while dependence represents the is-a relationship.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
44
Consider the following code snippet: Consider the following code snippet:   Which of the following statements is NOT correct? A.SailBoat inherits from Vessel. B.Catamaran inherits from Vessel. C.Catamaran inherits from Sailboat. D.Catamaran depends on SailBoat. Which of the following statements is NOT correct?
A.SailBoat inherits from Vessel.
B.Catamaran inherits from Vessel.
C.Catamaran inherits from Sailboat.
D.Catamaran depends on SailBoat.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
45
Consider the following code snippet: Consider the following code snippet:   Which of the following statements correctly describes the relationship between the Motorcycle and Vehicle classes? A.Motorcycle exhibits the has-a relationship with regards to Vehicle. B.Motorcycle exhibits the is-a relationship with regard to Vehicle. C.Vehicle exhibits the has-a relationship with regards to Motorcycle. D.Vehicle exhibits the is-a relationship with regards to Motorcycle. Which of the following statements correctly describes the relationship between the Motorcycle and Vehicle classes?
A.Motorcycle exhibits the has-a relationship with regards to Vehicle.
B.Motorcycle exhibits the is-a relationship with regard to Vehicle.
C.Vehicle exhibits the has-a relationship with regards to Motorcycle.
D.Vehicle exhibits the is-a relationship with regards to Motorcycle.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
46
In a UML diagram, an interface implementation is denoted by ____.
A.A dotted line with a closed arrow tip.
B.A solid line with a closed arrow tip.
C.A dotted line with an open arrow tip.
D.A solid line with an open arrow tip.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
47
Consider the following code snippet: Consider the following code snippet:   This code is best described as an example of ____. A.Inheritance and multiplicities. B.Aggregation and association. C.Inheritance and aggregation. D.Association and multiplicities. This code is best described as an example of ____.
A.Inheritance and multiplicities.
B.Aggregation and association.
C.Inheritance and aggregation.
D.Association and multiplicities.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
48
Which statement correctly describes the class relationship shown in this diagram? Which statement correctly describes the class relationship shown in this diagram?   A.Vehicle class depends on Car class B.Car class depends on Vehicle class C.Vehicle class inherits from Car class. D.Car class inherits from Vehicle class.
A.Vehicle class depends on Car class
B.Car class depends on Vehicle class
C.Vehicle class inherits from Car class.
D.Car class inherits from Vehicle class.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
49
In a UML diagram, the relationship symbol shown below denotes ____. In a UML diagram, the relationship symbol shown below denotes ____.   A.Inheritance B.Aggregation C.Dependency D.Interface implementation
A.Inheritance
B.Aggregation
C.Dependency
D.Interface implementation
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
50
In a UML diagram, the relationship symbol shown below denotes ____. In a UML diagram, the relationship symbol shown below denotes ____.   A.Inheritance B.Aggregation C.Dependency D.Interface implementation
A.Inheritance
B.Aggregation
C.Dependency
D.Interface implementation
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
51
Consider the following code snippet: Consider the following code snippet:   Which of the following statements is NOT correct? A.Manager inherits from Employee. B.Address aggregates Manager. C.Manager aggregates Address. D.Manager aggregates Project. Which of the following statements is NOT correct?
A.Manager inherits from Employee.
B.Address aggregates Manager.
C.Manager aggregates Address.
D.Manager aggregates Project.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
52
In a UML diagram, inheritance is denoted by ____.
A.A solid line with a diamond-shaped symbol next to the superclass.
B.A solid line with a closed arrow tip pointing to the superclass.
C.A dotted line with an open arrow tip pointing to the superclass.
D.A solid line with an open arrow tip pointing to the superclass.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
53
____ relationships come from the collaboration columns on the CRC cards.
A.Association
B.Inheritance
C.Dependency
D.Attribute
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
54
Consider the following code snippet: Consider the following code snippet:   Which of the following statements is NOT correct? A.SailBoat inherits from Vessel. B.Sail depends on Sailboat. C.Sailboat aggregates Engine. D.SailBoat aggregates Sail. Which of the following statements is NOT correct?
A.SailBoat inherits from Vessel.
B.Sail depends on Sailboat.
C.Sailboat aggregates Engine.
D.SailBoat aggregates Sail.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
55
Which of the following code snippets denotes that the Rose class inherits from the Flower class? Which of the following code snippets denotes that the Rose class inherits from the Flower class?
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
56
Which statement correctly describes the class relationship shown in this diagram? Which statement correctly describes the class relationship shown in this diagram?   A.Tire class aggregates Car class. B.Car class aggregates Tire class. C.Car class inherits from Tire class. D.Tire class inherits from Car class.
A.Tire class aggregates Car class.
B.Car class aggregates Tire class.
C.Car class inherits from Tire class.
D.Tire class inherits from Car class.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
57
Consider the following code snippet: Consider the following code snippet:   This code is best described as an example of ____. A.Inheritance and multiplicities. B.Aggregation and dependency. C.Inheritance and aggregation. D.Inheritance and interface. This code is best described as an example of ____.
A.Inheritance and multiplicities.
B.Aggregation and dependency.
C.Inheritance and aggregation.
D.Inheritance and interface.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
58
In a UML diagram, the relationship symbol shown below denotes ____. In a UML diagram, the relationship symbol shown below denotes ____.   A.Inheritance B.Aggregation C.Dependency D.Interface implementation
A.Inheritance
B.Aggregation
C.Dependency
D.Interface implementation
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
59
You have determined a need for a Book class and a Page class in your program.Which relationship is most appropriate between these classes?
A.Inheritance
B.Aggregation
C.Dependency
D.Interface implementation
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
60
When designing classes, if you find classes with common behavior you should ____.
A.Combine them all into a single class.
B.Place some common behavior into a superclass.
C.Place the common behavior into a subclass.
D.Give them similar names.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
61
Select a code segment to complete the Name class, so that it reflects a dependency relationship between Name and String. Select a code segment to complete the Name class, so that it reflects a dependency relationship between Name and String.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
62
Every dolphin has a fin.Every dolphin is an animal.What kind of relationship would best describe the first and second statements?
A.Dependency : Inheritance
B.Coupling : Dependency
C.Inheritance : Aggregation
D.Aggregation : Inheritance
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
63
Which of the following statements about class attributes is true?
A.An attribute always corresponds to an instance variable of the class.
B.An attribute is an externally observable property that objects of the class have.
C.An attribute is used to represent aggregation with another class.
D.Attributes cannot be represented in UML diagrams.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
64
Which of the following statements is true about Coupling?
A.Coupling between classes is high if there are no dependencies between classes
B.Coupling between classes is high if there are few dependencies between classes
C.Coupling between classes is low if there are no dependencies between classes
D.Coupling between classes is low if there are few dependencies between classes
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
65
Given the following diagram: Given the following diagram:   What does this diagram indicate about the relationship between the customers and bank accounts? A.A bank account may be owned by only one customer. B.A bank account may be owned by one or more customers. C.A customer may have only one bank account. D.A customer may have one or more bank accounts. What does this diagram indicate about the relationship between the customers and bank accounts?
A.A bank account may be owned by only one customer.
B.A bank account may be owned by one or more customers.
C.A customer may have only one bank account.
D.A customer may have one or more bank accounts.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
66
You are designing a software solution for a veterinary clinic.The clinic provides various services for each pet on each visit.You have decided that the following nouns apply to the requirements: Customer, Address, Pet, Visit, Visit Date, Service Charge, Total Charge, Next Appointment.Which of these should be represented as classes?
A.All of them.
B.Customer, Address, Pet, Visit.
C.Customer, Address, Pet, Visit, Service Charge.
D.Customer, Address, Pet, Visit, Service Charge, Total Charge, Visit Date, Next Appointment.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
67
When using CRC cards, UML diagrams should be created ___.
A.Prior to discovering classes.
B.After you have discovered classes and their relationships.
C.During the implementation phase.
D.To produce final documentation of the system.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
68
Which of the following statements about associations between classes is true?
A.A class is associated with another class if both classes are in the same package.
B.A class is associated with another class if the class inherits from the other class.
C.A class is associated with another class if the other class inherits from this class.
D.A class is associated with another class if you can navigate from objects of one class to objects of the other class.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
69
Before you begin designing a solution, you should ____.
A.Document the methods that will be needed.
B.Gather and document all requirements for the program in plain English.
C.Determine the classes that will be needed.
D.Create the UML diagrams to represent the classes.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
70
You are designing a software solution for an automobile rental company.A customer may rent only a single auto at a given time.You have decided that the following classes are needed: Auto, Customer, Address, Rental Contract.Which of these should be represented as aggregation?
A.Rental Contract class aggregates Address class
B.Rental Contract class aggregates Customer and Address classes.
C.Rental Contract class aggregates Customer, Address, and Auto classes.
D.Rental Contract class does not aggregate any of the other classes.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
71
You have determined the need for a File class and a Folder class in your program.Which of the following would best describe the relationship between these classes?
A.Aggregation
B.Association
C.Composition
D.Inheritance
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
72
You are designing a software solution for an automobile rental company.You have decided that the following nouns apply to the requirements: Auto, Customer, Address, Rental Contract, Mileage, Rental Date, Daily Rate, Total.Which of these should be represented as classes?
A.All of them.
B.Auto, Customer, Address, Rental Contract.
C.Auto, Customer, Address, Rental Contract, Mileage.
D.Auto, Customer, Address, Rental Contract, Mileage, Rental Date, Daily Rate.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
73
Select a code segment to complete the Player class, so that it reflects an inheritance relationship between Player and Person. Select a code segment to complete the Player class, so that it reflects an inheritance relationship between Player and Person.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
74
All smartphones are phones, but not all phones are smartphones.This type of relationship is best described by:
A.Aggregation
B.Dependency
C.Inheritance
D.Coupling
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
75
Select a code segment to complete the Team class, so that it reflects an aggregation relationship between Team and Player. Select a code segment to complete the Team class, so that it reflects an aggregation relationship between Team and Player.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
76
Select a code segment to complete the SmartPhone class, so that it reflects an interface implementation relationship between SmartPhone and MP3Player. Select a code segment to complete the SmartPhone class, so that it reflects an interface implementation relationship between SmartPhone and MP3Player.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
77
The textbook recommends a five-part program development process consisting of the following activities:
I Use UML diagrams to record class relationships.
II Gather requirements.
III Implement the program.
IV Use CRC cards to identify classes.
V Use javadoc to document method behavior.
Which is the correct order in which these activities should be completed?
A.IV, II, I, III, V
B.IV, II, I, V, III
C.II, IV, I, III, V
D.II, IV, I, V, III
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
78
How does a UML diagram denote a multiplicity of one or more in an aggregation relationship?
A.*
B.1..*
C.*..1
D.1..n
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
79
How does a UML diagram denote classes and their attributes and methods?
A.A class rectangle contains the class name in the top, methods in the middle, and attributes in the bottom.
B.A class rectangle contains the class name in the top, attributes in the middle, and methods in the bottom.
C.A class rectangle contains the methods in the top, class name in the middle, and attributes in the bottom.
D.A class rectangle contains the attributes in the top, methods in the middle, and class name in the bottom.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
80
You are designing a software solution for an automobile rental company.You have decided that the following nouns apply to the requirements: Auto, Customer, Address, Rental Contract, Mileage, Rental Date, Daily Rate, Total.Which of these should be represented as instance variables?
A.Mileage
B.Mileage, Daily Rate.
C.Mileage, Rental Date, Daily Rate.
D.Mileage, Rental Date, Daily Rate, Total.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 104 flashcards in this deck.