1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
SVEN [57.7K]
2 years ago
5

We need an equals method for the Dog class. It needs to give back to the caller a boolean value indicating whether another objec

t of the same type's attributes are all of the same value as the calling object's. Provide the entire method (header and code), and only the method.
public class Dog {
private String name;
private int age;
private int [] healthScores;
}
Computers and Technology
1 answer:
Nadusha1986 [10]2 years ago
3 0

Answer and Explanation:

Using Javascript:

Class Dog{

var healthScores=[];

Constructor(name, age, ...healthScores) {this.name=name;

this.age=age;

this.healthsScores=healthScores;

}

checkObject(new Dog){

If(new Dog.name===this.name,new Dog.age===this.age, new Dog.healthScores===this.healthScores){return true;

}

else{

console.log("objects are not equal");

}

}

}

To call the method checkObject:

var Tesa = new Dog(Tes,1,[45,46,82]);

var Bingo = new Dog(bing,2,[43,46,82]);

Bingo.checkObject(Tesa);

Note: we have used ES6(latest version of Javascript) where we passed the healthScore parameter(which is an array) to our constructor using the spread operator.

You might be interested in
As important as it is to plan ahead, sometimes you_____.
timama [110]

Answer:

B. Can't stop things from doing wrong.

Explanation:

Life is never for certain there are so many unpredictable things that can happen like at one moment you are turning onto the street and you get into a car accident you didn't plan for that to happen. Anything can happen on a day to day basis that's why something can go wrong and all your plans won't work anymore.

4 0
3 years ago
Read 2 more answers
What was the job of the Committee of Correspondence? WILL GIVE BRANLEST AND 40 POINT
Wewaii [24]

Answer:

how many of these information have you shared

5 0
2 years ago
Bakit mahalaga na marunong tayong gumamit ng makina?
jeka94

Answer:

para mabilis ang gawa

Explanation:

hope it helps

5 0
3 years ago
Suppose that the format for license plates in a certain state is two letters followed by four numbers. (a) How many different pl
Ymorist [56]

Answer:

(a) 6,760,000 plates

(b) 3,407,040 plates

(c) 6,084,000 plates

Explanation:

The very first thing to note about this question is the number of characters involved in the license plate format (6 characters in this case; 2 letters and 4 numbers). The letters come first and then the numbers follow.

There are a total of 26 possible letters (A-Z) and 10 possible numbers (0 - 9) that can be chosen. We can then proceed to the first question;

(a) Here, the total number of possible plates is to be determined. This is done as follows:

Character 1 (Letter): There are 26 possible letters

Character 2 (Letter): There are 26 possible letters

Character 3 (number): There are 10 possible numbers

Character 4 (number): There are 10 possible numbers

Character 5 (number): There are 10 possible numbers

Character 6 (number): There are 10 possible numbers

So, total number of different plates will be obtained by multiplying all the possibilities: 26 × 26 × 10 × 10 × 10 × 10 = 6,760,000 plates

(b) This second part puts a constraint on the usage of the numbers, unlike the question (a), where there was no constraint at all.

Since there is no constraint on the letters, we can write that:

Character 1 (Letter): There are 26 possible letters

Character 2 (Letter): There are 26 possible letters

For the first number as well, we can write:

Character 3 (number): There are 10 possible numbers

However, for the remaining characters, the possibilities will continually reduce by a value of 1, since we can not use a number that has been used before. So,

Character 4 (number): There are 9 possible numbers

Character 5 (number): There are 8 possible numbers

Character 6 (number): There are 7 possible numbers

So, total number of different plates will be: 26 × 26 × 10 × 9 × 8 × 7 = 3,407,040 plates

(c) Here, repetitions are allowed as in questions (a), but there can not be four zeros. This implies that the maximum number of zeros in any plate will be three. Thus, there will be maximum possibilities on all characters until the last one which will be constrained.

Character 1 (Letter): There are 26 possible letters

Character 2 (Letter): There are 26 possible letters

Character 3 (number): There are 10 possible numbers

Character 4 (number): There are 10 possible numbers

Character 5 (number): There are 10 possible numbers

Character 6 (number): There are 9 possible numbers

Total number of plates will therefore be: 26 × 26 × 10 × 10 × 10 × 9 = 6,084,000 plates.

7 0
3 years ago
The faster an object is moving, the ________ the shutter speed needs to be in order to freeze motion.
statuscvo [17]

Answer:

jkdsdjdshj,dfh.jhdfbhjf

Explanation:

bchSDCMHCXZ NHCXHBDSVCHDH,KC NBDBSDMJCBDBFD,JHCDSMNBBNCSCBFDNJCFJKC FMNSDNMSDFCH ĐS,CJDBS,CBSJBV,FJNDBFDSFDVBFĐDVFBVJFDCDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDHCD

5 0
3 years ago
Read 2 more answers
Other questions:
  • Doe's anyone know how to access developer mode on a Chromebook laptop if enterprise enrollment blocks it?
    14·2 answers
  • An engine you're servicing has electronically controlled cooling fans. Cooling fan 1 doesn't work but cooling fan 2 does. Which
    15·1 answer
  • Text, numbers,graphics, sounds entered into a computer's memory during input operations are referred to as
    11·1 answer
  • What is constructive criticism?
    9·1 answer
  • What are the different ways one can adjust their communication in order to decrease noise?
    9·2 answers
  • Creating a call conversion in Google Ads and adding a phone snippet to a web page allows advertisers to use a Google forwarding
    11·1 answer
  • How is science and technology used in the society​
    11·1 answer
  • Setting up a desktop computer for anAutoCADspecialist who needs a minimum of 125 GBram which operating system would be the best
    5·1 answer
  • Research and build a chroot jail that isolates ssh users who belong to the restrictssh group. (You will also need to create the
    9·1 answer
  • Edit the program provided so that it receives a series of numbers from the user and allows the user to press the enter key to in
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!