Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions