Modify the definition of the class Species in Listing 5.19 of Chapter 5 by remov
ID: 3644976 • Letter: M
Question
Modify the definition of the class Species in Listing 5.19 of Chapter 5 by removing the method setSpecies and adding the following methods:
-Five constructors one for each instance variable,one with three parameters for the three instance variables, and a default constructor. Be surethat each constructor sets all of the instance variables.
-Four methods named set that can reset values: one is the same as themethod setSpecies in Listing 5.16, and the other three each reset oneof the instance variables.
Then write a test program to test all the methods you have added. Finally, repeat Programming Project 1 in Chapter 5, but be sure to use some constructor other than the default constructor when you define new objects of the class Species.
Explanation / Answer
not all of us have access to that book please type the question directly here thanks
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.