Question: Create a Java project called BookStore. The project has the class Publication. Publication has two data members: genre (protected), a string to store the publication's

 Create a Java project called BookStore. The project has the class

Create a Java project called BookStore. The project has the class Publication. Publication has two data members: genre (protected), a string to store the publication's genre (for example, sports, fiction, science, entrainment, etc.), and a string title (protected) to hold the publication's title. The class has a constructor to initialize these two attributes. Publications are sorted based on genre first and then title. At The project has the class Book. This class extends Publication. The class has also the data member author, a string to hold the book's author name. The class has a constructor to initialize its data members. The class overrides Publication's get In fo() to add the author's name, such as: Atomic Habits, Self-help. Written by James Clear The project has the class Magazine. This class extends Publication. The class has also the data member publisher, a string to hold the magazine's publisher name. The class has a constructor to initialize its data members. It overrides Publication's get In fo () to add the publisher's name, such as: Vogue, Lifestyle. Published by Conde Nast Copy and paste the following code into your main method. The output should look like: Tun : Hooked, Behavioeral aelerice. Mrltoten ty Nit Kya? tndistraetable, Sehavicural gelener, Written by Nil Ayal Atomie uabits, tiele-he ip. Jports 111ustrsted, aports and Outdoors. Fubilohed by the Arena oroup goslu gucreberuL (totod timel 0 secondsi

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!