Each class should have their own file. Codetheclass Publicationwith the twodata members titleand price(a double). Make the class an abstract class by declaring the abstract method display(), which should havea Graphics object as itsfirst parameter. It shouldhave twomore parameters: onefor the x-coordinate , and one for the y-coordinate wherethe display will take place. Declare and define a two-argumentconstructor that accepts two arguments - one toinitializethe title and one toinitialize theprice. Codethe class Book,whichextends Publication. Class Book hasthe addedinteger data member pageCount. Declare anddefine a three-argument constructorthat accepts the title, price, and pageCount of the book. Thisconstructor should call theconstructor of its publications. The method display() should be defined in this class. The method should display on a Graphics object the title, price, and pageCount of the book. Code the class Tape, which extends Publication. Class Tape has the added integer data member playingTime. Declare and define a three-argument constructor that accepts the title, price, and playingTime of the tape. This constructor should call theconstructor ofpublication. The method display() should be defined in this class. The method should display on aGraphics object the title, price, and playingTime of the tape. Code an Applet class, Project5, in its own file. (a) Declare an array inventory of threePublication references. (b) In init(),makethe first referenceof inventory referto aBook object, created using new, for the title "C++ for Business Programming" with a price of 54.95, and a page count of 815. (c) In init(), makethe second referenceof inventory refer to aBook object, created using new, for the title "The Killer Angles" with a price of 5.99, and a page count of 355.
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. (d) In init(), make the third reference of inventory refer to a Tape object, created using new, for the title "The Beatles Anthology II", with a price of 34.95, and a playing time of 137. (e) In paint(), code a for loop to display the data for the three objects referred to by the references of inventory by executing the display() method for the targets of the references. The applet does not have to handle events.
Any windows. jcreator as the text editor