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
The question is in the photo
Anastaziya [24]

Answer:

a

the most suitable answer

8 0
2 years ago
List five characteristics of a series circuit
Paladinen [302]
1. The current is the same everywhere in the circuit. This means that wherever I try to measure
the current, I will obtain the same reading.
2. Each component has an individual Ohm's law Voltage Drop. This means that I can calculate
the voltage using Ohm's Law if I know the current through the component and the resistance.
3. Kirchoff's Voltage Law Applies. This means that the sum of all the voltage sources is equal to
the sum of all the voltage drops or
VS = V1 + V2 + V3 + . . . + VN
4. The total resistance in the circuit is equal to the sum of the individual resistances.
RT = R1 + R2 + R3 + . . . + RN
5. The sum of the power supplied by the source is equal to the sum of the power dissipated in
the components.
<span>PT = P1 + P2 + P3 + . . . + PN</span>
6 0
3 years ago
The processing of data in a computer involves the interplay between its various hardware components.
Ronch [10]

True.

Data processing involves the conversion of raw data and the flow of data through the Central Processing Unit and Memory to output devices. Each CPU in a computer contains two primary elements: the Arithmetic Logic Unit (ALU) and the control unit. The Arithmetic Logic Unit performs complex mathematical calculations and logical comparisons. On the other hand, the control unit accesses computer instructions, decodes them, and controls the flow of data in and out of the Memory, ALU, primary and secondary storage, and various other output devices.  


8 0
3 years ago
Is windows 7 professional faster than home premium?
Olin [163]
Widows 7 is no longer supported for anti virus, I recommend a windows 10 license
8 0
2 years ago
Please answer questions 34, 36 &amp; 37. <br><br>No explanation required. ​
kobusy [5.1K]

Answer:

36.c 37.c 34.d 35.b

Explanation:

these are the answrs

7 0
3 years ago
Other questions:
  • Which of the following criteria would not make a person eligible to receive medicare benefits?Which of the following criteria wo
    12·2 answers
  • When you make a pointer variable im C++, is star label a must?
    9·1 answer
  • "Create a Python program named detect_column_level_data_entry_errors. When complete, you will run this program to produce a diag
    11·1 answer
  • Mr. Perry has bookmarked a large number of webpages in Chrome while researching class topics. Unfortunately, he's bookmarked so
    13·1 answer
  • What is online school like 3 sentences
    8·2 answers
  • The range of an area where users can access the Internet via high frequency radio signals transmitting an Internet signal from a
    8·2 answers
  • Recall the problem of finding the number of inversions. As in the text, we are given a sequence of n numbers a1, . . . , an, whi
    8·1 answer
  • What are the challenges of Cyber Law???? Needed ASAP ​
    5·1 answer
  • Help brainleist giving exam
    15·1 answer
  • How has the internet improved business communication worldwide
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!