You are given four classes — Publication, Newspaper, Article and Announcement. You need to override the methods getType() and getDetails() in classes inherited from the class Publication. getType() should show the kind of publication, like a newspaper, and getDetails() should show the class attribute, such as the source.
Then you need to implement getInfo() in the class Publication using getType() and getDetails(). The method should return a String with a type of publication in the first place, then details in round brackets and the title after a colon. Examples are shown below.