Question
1. You want to create a Dog object. Which of the following would you use to describe it? (Choose all that apply.) A.
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
Step by Step Solution
3.48 Rating (155 Votes )
There are 3 Steps involved in it
Step: 1
1 The appropriate attributes for describing a Dog object would be A String breed B i...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started