1. You want to create a Dog object. Which of the following would you use to describe...
Question:
1. You want to create a Dog object. Which of the following would you use to describe it?
(Choose all that apply.)
A. String breed
B. int age
C. boolean isADog
D. String ownerName
E. String faveColor
2. Which of the following are associated with an object?
(Choose all that apply.)
A. parameter
B. return
C. behavior
D. constructor
E. argument
F. characteristic
G. integrated development environment
H. conditional
I. array
J. instance variable
K. modifier
L. variable scope
M. method
3. The following code is the constructor for a Cat object:
public Cat(String name, int age, boolean likesFish) {
this.name = name;
this.age = age;
this.likesFish = likesFish;
}
In my driver class, the very first thing I will do is to create a Cat object. Which of the following choices is an appropriate way to call the constructor to create a Cat object?
(Choose all that apply.)
A. Cat longCat = new Cat("Longcat is long", true, 18);
B. Cat helloKitty = new Cat("Hello Kitty", 45, true);
C. Cat grumpyCat = new Cat("Grumpy Cat");
D. Cat garfield = new Cat("Garfield", 42, "no");
E. None of these options are correct.
4. You are creating a program that models a store. Which of the following can we make an object for?
A. Customer
B. BuyItem
C. RestockItem
D. Shelf
E. ItemForSale
Corporate Finance Core Principles and Applications
ISBN: 978-0077905200
3rd edition
Authors: Stephen Ross, Randolph Westerfield, Jeffrey Jaffe, Bradford