Question: Create a Book object. The same two options for creating a Book object apply here as well. package bookisbnlookup; public class Book { private long
Create a Book object. The same two options for creating a Book object apply here as well. package bookisbnlookup;
public class Book
private long isbn;
private String title;
private String description;
public Book
this;
public Booklong inIsbn
isbn inIsbn;
title ;
description ;
public void setIsbnlong inIsbn
isbn inIsbn;
public void setTitleString inTitle
title inTitle;
public void setDescriptionString inDescription
description inDescription;
public long getIsbn
return isbn;
public String getTitle
return title;
public String getDescription
return description;
@Override
public String toString
String text Book Information
;
text "ISBN: isbn
;
text "Title: title
;
text "Description: description
;
return text;
Output the results by printing your Book object to the console. The Book class contains a toString method, you just print your object directly to the console.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
