Question: JAVA public class Music extends Product { // the Music subclass adds one field private String artist; private String style; private String medium; // the

JAVA

public class Music extends Product { // the Music subclass adds one field private String artist; private String style; private String medium; // the Music subclass has one constructor public Music(int productNumber, String productTitle, String artist, String style, String medium) { super(productNumber, productTitle); this.artist = artist; this.style = style; this.medium = medium; } // the Music subclass adds three method // the Book subclass adds three method public void setArtist(String artist) { this.artist = artist; } public void setStyle(String style) { this.style = style; } public void setMedium(String medium) { this.medium = medium; } }

I need help I don't understand how to incorporate get and setters into my code. can a 5Head genius please spare some of their daily time for a peasant like me. also I need 2 constructors and I dont get it :(

"Each class will have at least two constructors and access (getter) methods and modifier (setter) methods for each instance variable.

Each class will override the Object class toString() and equals() methods.

The Product class will declare an abstract method with the this signature: public String getDisplayText()

The implemented abstract method will return the string specified in the example output provided by the project lead."

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!