Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i Need .java file as well Question 1: (15) Create a class Book. Its data members are author (String) chapterNames[100] (String[]) Create two overloaded constructors,

image text in transcribedi Need .java file as well

Question 1: (15) Create a class Book. Its data members are author (String) chapterNames[100] (String[]) Create two overloaded constructors, one with no argument and one with two arguments. Create a method compareBooks that compares the author of two Books and returns true if both books have same author and false otherwise. (This method must manipulate two Book objects) Create a method compare ChapterNames that compares the chapter names of two Books and returns the book with larger chapters. Display the author of the book with greater chapters in main. Create a runner class that declares two objects of type Book. One object should be declared using no argument constructor and then the parameters should be set through the set() methods. The second object should be declared with argument constructor. Finally the CompareBooks()and compareChapterNames method should be called and the result should be displayed in the runner class. Draw a UML Diagram of given above scenario

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

Demystifying Databases A Hands On Guide For Database Management

Authors: Shiva Sukula

1st Edition

8170005345, 978-8170005346

More Books

Students also viewed these Databases questions

Question

List the components of a database.

Answered: 1 week ago