Question: for ImageElement class I need to extends the TagElement class print out my output as same as the third picture i posted this.attributes =


for ImageElement class I need to extends the TagElement class print out my output as same as the third picture i posted
this.attributes = " src="+'"'+ getImageURL() + " width="+'"'+width+'"'+" "
+ "height="+'"'+height+'"'+" alt="student submitted image, transcription available below"'+alt+'"'; for this part, I need to get result print out as
1 package model; 3 public class Inagetlenent extends TagElement( s int width, height; 6 String imagURL,alt, attributes public InageElenent (java. lang.String inageURL, 8- 18 12 int width, int height, java.lang.String alt, java.lang.String attributes) ( super("ing, false, new TextElement(),attributes): this.width wwidth; this.height height this.imagURL -imageURL; this.alt alt; this.attributes srgetImageURLwidth+with 13 16 17 +"height.+heightalt+alt+ineed to make this class output come out to match the pub18nageElement Testi public java.lang.String getInageURLO 20- 21 return imagURL 23 24 25 1 package model; 3 public class Inagetlenent extends TagElement( s int width, height; 6 String imagURL,alt, attributes public InageElenent (java. lang.String inageURL, 8- 18 12 int width, int height, java.lang.String alt, java.lang.String attributes) ( super("ing, false, new TextElement(),attributes): this.width wwidth; this.height height this.imagURL -imageURL; this.alt alt; this.attributes srgetImageURLwidth+with 13 16 17 +"height.+heightalt+alt+ineed to make this class output come out to match the pub18nageElement Testi public java.lang.String getInageURLO 20- 21 return imagURL 23 24 25
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
