Question: Write a program in java eclipse IDE for a publisher. The Publisher class will have a name, number of staff members, types of publications (books,
Write a program in java eclipse IDE for a publisher. The Publisher class will have a name, number of staff members, types of publications (books, magazines, videos). Book and Magazine are subclasses of Publisher. The instance variables of Book class are title, price, type (fiction or non-fiction), and year of publication. Magazine should have name of the magazine, type (monthly, weekly, yearly), and price per magazine. Each of the classes must have constructors, get() & set() methods, and toString() method. Book and Magazine classes must each have a charge() method that will accept either the number of books bought or number of subscriptions in the case of magazines and return the total charges. Book class must have a search() method which accepts a title and an array of Book objects, and prints a message as the book is available or not. Magazine class must also have a search() method that receives a type and an array of Magazine objects and print all the magazines with that type (if the type is weekly, it should print all the weekly magazines available from this publisher). Include a driver to test the classes. You should have two text files: one of the books and the other of magazines. The driver should read these into appropriate arrays. The main() should print a menu of all the choices. I will really appreciate if someone send me the text file along with it.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
