Deck 12: Object-Oriented Design

Full screen (f)
exit full mode
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.
Use Space or
up arrow
down arrow
to flip the card.
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 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
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 would be an appropriate name for a game-related class?

A) FinalizeLevelOne
B) InitialLevel
C) ResetTheCurrentLevel
D) AscendToFinalLevel
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 questions should you ask yourself in order to determine if you have named your class properly?

A) Does the class name contain 8 or fewer characters?
B) Is the class name a verb?
C) Can I visualize an object of the class?
D) Does the class name describe the tasks that this class will accomplish?
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) Auto
B) Customer
C) Payment amount
D) Rental contract
Question
Classes often correspond to ____ in a requirements description.

A) Verbs
B) Nouns
C) Dependencies
D) Relationships
Question
Under which of the following conditions would the public interface of a class be considered cohesive?

A) All of its features are public and none of its features are static.
B) The quality of the public interface is rated as moderate to high.
C) All of its features are related to the concept that the class represents.
D) It is obvious that the public interface refers to multiple concepts.
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
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
You are designing an application to support a veterinary clinic. Which of the following probably should NOT be represented as an object?

A) Pet
B) Customer
C) Medical service performed
D) Drug dosage
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.
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
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
A/an ____ represents a set of objects with the same behavior.

A) Association
B) Aggregation
C) Dependency
D) Class
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
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
____ is often described as the has-a relationship.

A) Inheritance.
B) Aggregation.
C) Polymorphism.
D) Dependency.
Question
Which statement correctly describes the class relationship shown in this diagram? <strong>Which statement correctly describes the class relationship shown in this diagram?  </strong> 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
UML means____.

A) Unified Mode Language
B) User Modeling Language
C) User Mode Language.
D) Unified Modeling Language.
Question
Which of the following code snippets denotes that the Fleet class aggregates the Taxi class?

A) public class Fleet extends Taxi
B) public class Taxi extends Fleet
C) public class Fleet
{
Private ArrayList taxicabs;
}
D) public class Taxi
{
Private Fleet myFleet;
}
Question
Consider the following code snippet: public class Motorcycle
{
Private Tire[] tires;
) . .
}
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
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: public class Motorcycle
{
Private Tire[] tires;
) . .
}
This code is best described as an example of ____.

A) Inheritance.
B) Aggregation.
C) Polymorphism.
D) Association.
Question
Consider the following code snippet: public class Purse
{
Private Coin[] coins;
) . .
}
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
Which statement correctly describes the class relationship shown in this diagram? <strong>Which statement correctly describes the class relationship shown in this diagram?  </strong> 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 Kitchen class depends on the Stove class?

A) public class Kitchen extends Stove
B) public class Stove
{
Private Kitchen[] kitchens;
}
C) public class Kitchen
{
Private Stove aStove;
}
D) public class Kitchen implements Stove
Question
The dependency relationship is sometimes referred to as the ____ relationship.

A) is-a
B) has-a
C) depends-on
D) knows-about
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 of the following code snippets denotes that the Kitchen class aggregates the Dish class?

A) public class Kitchen extends Dish
B) public class Dish extends Kitchen
C) public class Kitchen
{
Private Dish[] dishes;
}
D) public class Dish
{
Private Kitchen myKitchen;
}
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
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
Which of the following code snippets denotes that the Purse class depends on the Wallet class?

A) public class Purse extends Wallet
B) public class Wallet extends Purse
C) public class Wallet
{
Private Purse aPurse;
}
D) public class Purse
{
Private Wallet aWallet;
}
Question
Which of the following code snippets denotes that the Pen class depends on the Ink class?

A) public class Pen extends Ink
B) public class Ink extends Pen
C) public class Pen
{
Private Ink anInk;
}
D) public class Ink
{
Private Pen aPen;
}
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
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
Consider the following code snippet: public class Purse
{
Private Coin[] coins;
) . .
}
This code is best described as an example of ____.

A) Inheritance.
B) Aggregation.
C) Polymorphism.
D) Association.
Question
Which statement correctly describes the class relationship shown in this diagram? <strong>Which statement correctly describes the class relationship shown in this diagram?  </strong> 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: public class SailBoat extends Vessel
{ ) . . }
Public class Catamaran extends 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.
Question
Which statement correctly describes the class relationship shown in this diagram? <strong>Which statement correctly describes the class relationship shown in this diagram?  </strong> 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
____ is often described as the is-a relationship.

A) Inheritance.
B) Aggregation.
C) Polymorphism.
D) Dependency.
Question
Consider the following code snippet: public class SailBoat extends Vessel
{
Private Engine[] engines;
Private Sail mainsail;
) . .
}
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
Consider the following code snippet: public class Motorcycle extends Vehicle
{
Private Tire[] tires;
) . .
}
This code is best described as an example of ____.

A) Inheritance and multiplicities.
B) Aggregation and dependency.
C) Inheritance and aggregation.
D) Inheritance and association.
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
Consider the following code snippet: public class Manager extends Employee
{
Private Project[] projects;
Private Address address;
) . .
}
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
Consider the following code snippet: public class PowerBoat extends Vessel
{
Private Engine[] engines;
) . .
}
This code is best described as an example of ____.

A) Inheritance and multiplicities.
B) Aggregation and association.
C) Inheritance and aggregation.
D) Inheritance and dependency.
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 uses relationship.
C) Aggregation represents the is-a relationship, while inheritance represents the uses relationship.
D) Aggregation represents the has-a relationship, while dependence represents the is-a relationship.
Question
Which of the following code snippets denotes that the Lime class inherits from the Citrus class?

A) public class Lime extends Citrus
B) public class Citrus extends Lime
C) public class Lime
{
Private ArrayList fruits;
}
D) public class Citrus
{
Private ArrayList limes;
}
Question
Consider the following code snippet: public class Motorcycle extends Vehicle
{ ) . . }
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, the relationship symbol shown below denotes ____. <strong>In a UML diagram, the relationship symbol shown below denotes ____.  </strong> 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 ____. <strong>In a UML diagram, the relationship symbol shown below denotes ____.  </strong> A) inheritance B) aggregation C) dependency D) interface implementation <div style=padding-top: 35px>

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 the common behavior into a superclass.
C) Place the common behavior into a subclass.
D) Give them similar names.
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
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
Which of the following code snippets denotes that the Rose class inherits from the Flower class?

A) public class Flower extends Rose
B) public class Rose extends Flower
C) public class Rose
{
Private Flower[] flowers;
}
D) public class Flower
{
Private Rose[] limes;
}
Question
Consider the following code snippet: public class Motorcycle extends Vehicle
{
Private Tire[] tires;
Private Engine anEngine;
) . .
}
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
In a UML diagram, the relationship symbol shown below denotes ____. <strong>In a UML diagram, the relationship symbol shown below denotes ____.  </strong> A) inheritance B) aggregation C) dependency D) interface implementation <div style=padding-top: 35px>

A) inheritance
B) aggregation
C) dependency
D) interface implementation
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
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
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
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
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
____ relationships come from the collaboration columns on the CRC cards.

A) Association
B) Inheritance
C) Dependency
D) Attribute
Question
Parallel arrays are ____.

A) Two or more arrays or array lists of the same length which each store a part of what could be considered an object.
B) Two or more arrays or array lists of the same length.
C) Two or more arrays or array lists of the same data type.
D) Two or more arrays or array lists that are declared one after the other in a program.
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
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. public class Player ___________________________

A) extends Person
{

}
B) {
Private Person thePlayer;

}
C) implements Person
{

}
D) {
Private ArrayList players;

}
Question
Select a code segment to complete the SmartPhone class, so that it reflects an interface implementation relationship between SmartPhone and MP3Player. public class SmartPhone ___________________________

A) extends MP3Player
{

}
B) {
Private MP3Player musicPlayer;

}
C) implements MP3Player
{

}
D) implements interface MP3Player
{

}
Question
Select a code segment to complete the Name class, so that it reflects a dependency relationship between Name and String. public class Name ___________________________

A) extends String
{

}
B) {
Private String first;
Private String second;

}
C) implements String
{

}
D) {
Private ArrayList names;

}
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
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
To improve the quality of the public interface of a class, ____.

A) You should maximize cohesion and minimize inheritance.
B) You should minimize cohesion and maximize coupling.
C) You should maximize cohesion and minimize coupling.
D) You should minimize cohesion and maximize aggregation.
Question
Given the following diagram: <strong>Given the following diagram:   What does this diagram indicate about the relationship between the customers and bank accounts?</strong> 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
Select a code segment to complete the Team class, so that it reflects an aggregation relationship between Team and Player. public class Team ___________________________

A) extends Player
{

}
B) {
Private Player aPlayer;

}
C) implements Player
{

}
D) {
Private ArrayList players;

}
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
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.
Question
If you have parallel arrays or array lists of the same length which each store a part of what could be considered an object, ____.

A) You should rewrite the program to use a two-dimensional array.
B) You should rewrite the program to use a two-dimensional array list.
C) You should create a class to hold the related data in the ith slice of each array, and then create an arraylist of objects.
D) There are no alternatives to this type of program design.
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
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.
C
2
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.
C
3
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.
D
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
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
6
Which of the following would be an appropriate name for a game-related class?

A) FinalizeLevelOne
B) InitialLevel
C) ResetTheCurrentLevel
D) AscendToFinalLevel
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 questions should you ask yourself in order to determine if you have named your class properly?

A) Does the class name contain 8 or fewer characters?
B) Is the class name a verb?
C) Can I visualize 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
9
You are designing an application to support an automobile rental agency. Which of the following probably should NOT be represented as an object?

A) Auto
B) Customer
C) Payment amount
D) Rental contract
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
10
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
11
Under which of the following conditions would the public interface of a class be considered cohesive?

A) All of its features are public and none of its features are static.
B) The quality of the public interface is rated as moderate to high.
C) All of its features are related to the concept that the class represents.
D) It is obvious that the public interface refers to multiple concepts.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
12
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
13
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
14
You are designing an application to support a veterinary clinic. Which of the following probably should NOT be represented as an object?

A) Pet
B) Customer
C) Medical service performed
D) Drug dosage
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
15
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.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
16
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
17
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
18
A/an ____ represents a set of 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
19
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
20
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
21
____ 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
22
Which statement correctly describes the class relationship shown in this diagram? <strong>Which statement correctly describes the class relationship shown in this diagram?  </strong> 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
23
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
24
Which of the following code snippets denotes that the Fleet class aggregates the Taxi class?

A) public class Fleet extends Taxi
B) public class Taxi extends Fleet
C) public class Fleet
{
Private ArrayList taxicabs;
}
D) public class Taxi
{
Private Fleet myFleet;
}
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
25
Consider the following code snippet: public class Motorcycle
{
Private Tire[] tires;
) . .
}
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
26
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
27
Consider the following code snippet: public class Motorcycle
{
Private Tire[] tires;
) . .
}
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
28
Consider the following code snippet: public class Purse
{
Private Coin[] coins;
) . .
}
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
29
Which statement correctly describes the class relationship shown in this diagram? <strong>Which statement correctly describes the class relationship shown in this diagram?  </strong> 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
30
Which of the following code snippets denotes that the Kitchen class depends on the Stove class?

A) public class Kitchen extends Stove
B) public class Stove
{
Private Kitchen[] kitchens;
}
C) public class Kitchen
{
Private Stove aStove;
}
D) public class Kitchen implements Stove
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
31
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
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 of the following code snippets denotes that the Kitchen class aggregates the Dish class?

A) public class Kitchen extends Dish
B) public class Dish extends Kitchen
C) public class Kitchen
{
Private Dish[] dishes;
}
D) public class Dish
{
Private Kitchen myKitchen;
}
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
34
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
35
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
36
Which of the following code snippets denotes that the Purse class depends on the Wallet class?

A) public class Purse extends Wallet
B) public class Wallet extends Purse
C) public class Wallet
{
Private Purse aPurse;
}
D) public class Purse
{
Private Wallet aWallet;
}
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
37
Which of the following code snippets denotes that the Pen class depends on the Ink class?

A) public class Pen extends Ink
B) public class Ink extends Pen
C) public class Pen
{
Private Ink anInk;
}
D) public class Ink
{
Private Pen aPen;
}
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
38
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
39
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
40
Consider the following code snippet: public class Purse
{
Private Coin[] coins;
) . .
}
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
41
Which statement correctly describes the class relationship shown in this diagram? <strong>Which statement correctly describes the class relationship shown in this diagram?  </strong> 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
42
Consider the following code snippet: public class SailBoat extends Vessel
{ ) . . }
Public class Catamaran extends 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
43
Which statement correctly describes the class relationship shown in this diagram? <strong>Which statement correctly describes the class relationship shown in this diagram?  </strong> 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
44
____ 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
45
Consider the following code snippet: public class SailBoat extends Vessel
{
Private Engine[] engines;
Private Sail mainsail;
) . .
}
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
46
Consider the following code snippet: public class Motorcycle extends Vehicle
{
Private Tire[] tires;
) . .
}
This code is best described as an example of ____.

A) Inheritance and multiplicities.
B) Aggregation and dependency.
C) Inheritance and aggregation.
D) Inheritance and association.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
47
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
48
Consider the following code snippet: public class Manager extends Employee
{
Private Project[] projects;
Private Address address;
) . .
}
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
49
Consider the following code snippet: public class PowerBoat extends Vessel
{
Private Engine[] engines;
) . .
}
This code is best described as an example of ____.

A) Inheritance and multiplicities.
B) Aggregation and association.
C) Inheritance and aggregation.
D) Inheritance and dependency.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
50
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 uses relationship.
C) Aggregation represents the is-a relationship, while inheritance represents the uses 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
51
Which of the following code snippets denotes that the Lime class inherits from the Citrus class?

A) public class Lime extends Citrus
B) public class Citrus extends Lime
C) public class Lime
{
Private ArrayList fruits;
}
D) public class Citrus
{
Private ArrayList limes;
}
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
52
Consider the following code snippet: public class Motorcycle extends Vehicle
{ ) . . }
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
53
In a UML diagram, the relationship symbol shown below denotes ____. <strong>In a UML diagram, the relationship symbol shown below denotes ____.  </strong> 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
54
In a UML diagram, the relationship symbol shown below denotes ____. <strong>In a UML diagram, the relationship symbol shown below denotes ____.  </strong> 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
55
When designing classes, if you find classes with common behavior you should ____.

A) Combine them all into a single class.
B) Place the 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
56
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
57
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
58
Which of the following code snippets denotes that the Rose class inherits from the Flower class?

A) public class Flower extends Rose
B) public class Rose extends Flower
C) public class Rose
{
Private Flower[] flowers;
}
D) public class Flower
{
Private Rose[] limes;
}
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
59
Consider the following code snippet: public class Motorcycle extends Vehicle
{
Private Tire[] tires;
Private Engine anEngine;
) . .
}
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
60
In a UML diagram, the relationship symbol shown below denotes ____. <strong>In a UML diagram, the relationship symbol shown below denotes ____.  </strong> 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
61
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
62
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
63
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
64
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
65
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
66
____ 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
67
Parallel arrays are ____.

A) Two or more arrays or array lists of the same length which each store a part of what could be considered an object.
B) Two or more arrays or array lists of the same length.
C) Two or more arrays or array lists of the same data type.
D) Two or more arrays or array lists that are declared one after the other in a program.
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
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
70
Select a code segment to complete the Player class, so that it reflects an inheritance relationship between Player and Person. public class Player ___________________________

A) extends Person
{

}
B) {
Private Person thePlayer;

}
C) implements Person
{

}
D) {
Private ArrayList players;

}
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
71
Select a code segment to complete the SmartPhone class, so that it reflects an interface implementation relationship between SmartPhone and MP3Player. public class SmartPhone ___________________________

A) extends MP3Player
{

}
B) {
Private MP3Player musicPlayer;

}
C) implements MP3Player
{

}
D) implements interface MP3Player
{

}
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
72
Select a code segment to complete the Name class, so that it reflects a dependency relationship between Name and String. public class Name ___________________________

A) extends String
{

}
B) {
Private String first;
Private String second;

}
C) implements String
{

}
D) {
Private ArrayList names;

}
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
73
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
74
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
75
To improve the quality of the public interface of a class, ____.

A) You should maximize cohesion and minimize inheritance.
B) You should minimize cohesion and maximize coupling.
C) You should maximize cohesion and minimize coupling.
D) You should minimize cohesion and maximize aggregation.
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
76
Given the following diagram: <strong>Given the following diagram:   What does this diagram indicate about the relationship between the customers and bank accounts?</strong> 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
77
Select a code segment to complete the Team class, so that it reflects an aggregation relationship between Team and Player. public class Team ___________________________

A) extends Player
{

}
B) {
Private Player aPlayer;

}
C) implements Player
{

}
D) {
Private ArrayList players;

}
Unlock Deck
Unlock for access to all 104 flashcards in this deck.
Unlock Deck
k this deck
78
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
79
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
80
If you have parallel arrays or array lists of the same length which each store a part of what could be considered an object, ____.

A) You should rewrite the program to use a two-dimensional array.
B) You should rewrite the program to use a two-dimensional array list.
C) You should create a class to hold the related data in the ith slice of each array, and then create an arraylist of objects.
D) There are no alternatives to this type of program design.
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.