Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Corporate Finance Core Principles and Applications

Authors: Stephen Ross, Randolph Westerfield, Jeffrey Jaffe, Bradford

3rd edition

978-0077971304, 77971302, 978-0073530680, 73530689, 978-0071221160, 71221166, 978-0077905200

More Books

Students also viewed these Programming questions

Question

1. What are the goals of institutional advertising?

Answered: 1 week ago