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
What is an examlple of cyberbullying
Alex73 [517]

Answer:

sending rude text messages

Explanation:

3 0
3 years ago
Enumerate five features of Microsoft excel 2016​
Trava [24]

Answer:

Smarter Autocorrect, Improved Functions of Excel Workbook, New Funnel charts, and Smarter insertion of pictures.

Explanation:

For 8 features of Microsoft excel 2016, check out this website:

https://www.educba.com/features-of-2016-excel-workbook/

Hope this helps!

7 0
2 years ago
The Securities and Exchange Commission (SEC) was created to develop and approve a set of common international accounting rules.
Dennis_Churaev [7]

Answer:  

Idk search it on google chrome

Explanation:

3 0
3 years ago
What does obsolete mean?
Alex
No longer produced or used; out of date.
8 0
3 years ago
Read 2 more answers
Write a program which will -
Hitman42 [59]

Answer:

down below

Explanation:

score = input() # gets student's score input

max = input() # gets max number

percent = (score/max)*100 # multiply by a hundred to get percentage

if percent > 52: # checks if percent is greater than 52

  print("well dont you have at least a grade 5")

else # if percent is less than or equal to 52 it will print this instead

  print("Unlucky, you need to revise more for the next test.")

THIS PART IS NOT CODE:

make sure you indent/tab the print statements or else you'll get an error

6 0
3 years ago
Other questions:
  • What would be some long- term goals.
    11·1 answer
  • If the pc­doctor software is installed on a computer's hard drive, what two different ways can the program be started?
    7·1 answer
  • For what purpose is keylogging software used? a. To automatically translate input to another language as the user enters data b.
    10·1 answer
  • An automatic transmission is a mechanism that _
    7·1 answer
  • Array testGrades contains NUM_VALS test scores. Write a for loop that sets sumExtra to the total extra credit received. Full cre
    11·1 answer
  • Power delivered to the hitch of tractors is called
    12·1 answer
  • Choose the tag required for each stated goal.
    12·1 answer
  • You respond to a fire at a pharmaceutical production plant. One of the outside storage tanks is on fire. The placard on the tank
    10·1 answer
  • 1. Identify one modern technology and discuss its development and discuss what future changes might occur that could have an eve
    13·1 answer
  • Briefly explain how Riboflavin deficiency lead to disease state.​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!