Question: Slove the following in java Question 7 Scenario:Create a class named LibraryBook that has fields for the book title, author, and ISBN number. Include methods

Slove the following in java
Question 7Scenario:Create a class named LibraryBook that has fields for the book title, author, and ISBN number. Include methods to display the book details and check if two books have the same ISBN.Task:Create a class LibraryBook with appropriate fields and methods.Create two objects of this class and compare their ISBN numbers.
Question 8Scenario:Create a base class Employee with fields for name and salary, and a method to display details. Create derived classes Manager and Engineer, each with additional fields and overridden methods.Task:Create the Employee class with appropriate fields and methods.Create derived classes Manager and Engineer with additional fields and overridden methods.Create objects of Manager and Engineer and call their methods.
Question 9Scenario:Create a base class Shape with a method draw. Create derived classes Circle, Square, and Triangle that override the draw method. Use polymorphism to call the draw method on an array of different shapes.Task:Create the Shape base class with the draw method.Create derived classes Circle, Square, and Triangle that override the draw method.Create an array of Shape objects and demonstrate polymorphism.
Question 10: InterfacesScenario:Create an interface Printable with a method print. Create classes Document and Photo that implement this interface. Use the interface to call the print method on an array of Printable objects.Task:Create the Printable interface with the print method.Create classes Document and Photo that implement the print method.Create an array of Printable objects and demonstrate polymorphism.

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 Programming Questions!