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
Use the drop down menus to describe how adman can add shapes to his presentation
alina1380 [7]

Answer:

✔ Illustrations

✔ a crosshair

✔ left-click and drag

Explanation:

6 0
3 years ago
Jamal is installing new software and would like a step-by-step guide to teach him how. Which resource would be best, and why?
ratelena [41]
The answer is D because it will explain and show how to install the software.
3 0
3 years ago
Read 2 more answers
If you were looking for a record in a very large database and you knew the ID number, which of the following commands would be t
OLga [1]

Answer:

The Correct answer is Find.

Explanation:

7 0
3 years ago
Match the following unit 6 terms with their descriptions
Romashka [77]

Answer:

what are the followin six terms

Explanation:

6 0
3 years ago
Desirable characteristics of designs include:
polet [3.4K]

Answer: High cohesion

Explanation: Cohesion in general refers to make a couple of the functions or characteristics to share the functions and content . In the field of computer science , cohesion is the best characteristic that can be included in the design because it connect the  various software so that they can share the responsibilities , function and can achieve better output through this. Thus high cohesion is the most preferred factor.

8 0
3 years ago
Other questions:
  • What are the elements of an autobiographical narrative similar to those of a short story?
    7·1 answer
  • ROM is designed for _________
    6·1 answer
  • Amazon Web Services and Microsoft Azure are some of the most widely used _______.
    7·1 answer
  • What happens when a dataset includes records with missing data?
    9·1 answer
  • Write a Java program called Decision that includes a while loop to prompt the user to enter 5 marks using the
    12·1 answer
  • Ramjac Company wants to set up k independent file servers, each capable of running the company's intranet. Each server has avera
    9·1 answer
  • I only put one answer and didn’t specify what it answered
    14·2 answers
  • Explain the principles of computer applications ​
    11·1 answer
  • Please help me on this coding problem :)
    6·1 answer
  • What type of malicious software technology is used to download and install software without the user's interaction?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!