Question: You read the following (sparsely commented) Java code written by somebody else (in several files), with irrelevant details omitted: a) Write the UML class diagram

You read the following (sparsely commented) Java code written by somebody else (in several files), with irrelevant details omitted:

a) Write the UML class diagram for the design used in the above code. Include multiplicity, attributes and operations.

b) What design pattern is at work in this application? Analyze the intent of the pattern and look at how objects interact. Explain your answer in detail.

You read the following (sparsely commented) Java code written by somebody else

1 public interface Videoclip t 2 void play (JComponent comp) 3 void stop() // start playing the videoclip // stop playing the videoclip 6 7 public class Lecturevideo implements Videoclip f 8 public LectureVideo (LecturePDFFile notes, Date whenRecorded, Instructor who) / details not relevant 10 12 public void play (JComponent comp) f 13 14 15 16 public void stop) // details not relevant /t details not relevant 18 19 : 20 21 22// class Captionedvideo is a videoclip that also plays closed captions 23 // (stored in class CaptionInfo) 24 public class Captionedvideo implenents Videoclip t 25 public CaptionedVideo(Videoclip clip, CaptionInfo captionsInfo) f 26 27 28 29 30 this. clip clip: this.capInfo captionsInfo; // details omitted 31 public void play (JComponent comp) 32 this.clip.play(comp); this.capInfo.play (comp) 34 35 36 public void stop() 37 38 39 40 41 private Videoclip clip; 42 private CaptionInfo capInfo; 43 this.clip.stop( this.capInfo.stop) 45 46 public class Player [ 47 public static void main(Stringl args) f 48 49 59 Caption Info capinfo-..... // not relevant LectureVideo Lecturevid .. .. CaptionedVideo capLecturevid new CaptionedVideo(lecturevid, capInfo) 52 53 54 JComponent wnd -.... capLecturevid. play (wnd) l not relevant 56 57 H

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!