Constructor Overloading Add Two Constructors Empty Constructor Constructor Takes One Int I Q43858000
Use Java 8

Constructor overloading Add two constructors: an empty constructor, and a constructor that takes one int and initializes the seed instance variable. Add a method called hash so that 1) if it takes String as an argument, it returns the sum of the ASCII values of the characters in the String. 2) if it takes int as an argument, it stores the input value into seed and returns the previous value of seed. 1 public class MyHashing { 2 private int seed = 100; ie w NP Show transcribed image text Constructor overloading Add two constructors: an empty constructor, and a constructor that takes one int and initializes the seed instance variable. Add a method called hash so that 1) if it takes String as an argument, it returns the sum of the ASCII values of the characters in the String. 2) if it takes int as an argument, it stores the input value into seed and returns the previous value of seed. 1 public class MyHashing { 2 private int seed = 100; ie w NP
Expert Answer
Answer to Constructor overloading Add two constructors: an empty constructor, and a constructor that takes one int and initializes…
OR