subject

Consider the following code segment for a class that models a fish:

public class Fish
{
private int age;
private double weight;
private boolean isAlive;
private Location location; // (x, y) location in a lake
...
}

Which of the following methods in the Fish class is the best candidate for being a instance method?

A. swim() // swim to a different location
B. eat() // fish eats
C. getLakeTemp() // get lake temperature
D. getAge() // returns age of fish
E. getWeight() // returns weight of fish

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:30
There is a simple pattern for determining if a binary number is odd. what is it and why does this pattern occur? how many bits would you need if you wanted to have the ability to count up to 1000? how high could you count in binary if you used all 10 of your fingers as bits? (finger up means 1, finger down means 0)
Answers: 3
question
Computers and Technology, 22.06.2019 11:00
What are two of the most common reasons that peolpe who need mental health care do not access it?
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
Which demographic challenge is europe currently experiencing? a. an aging and decreasing population b. a baby boomc. an unequal distribution between males and females d. a large group of teenagers moving through the school system(i chose a but i'm unsure)
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
What is the name of the sound effect that danny hears
Answers: 1
You know the right answer?
Consider the following code segment for a class that models a fish:

public class Fish
Questions
question
Mathematics, 03.05.2021 14:50
question
Mathematics, 03.05.2021 14:50
Questions on the website: 13722367