Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I want dicumntation for this class please: public class Book { public String author; public int numberOfPages; public String title; public int isbn; public Book
I want dicumntation for this class please:
public class Book
{
public String author;
public int numberOfPages;
public String title;
public int isbn;
public Book (String author,int numberOfPages,String title,int isbn) //this is constructor
{
this.author = author;
this.numberOfPages = numberOfPages;
this.title = title;
this.isbn = isbn;
}
public Book()
{
}
public void setAuthor(String author)
{
this.author = author;
}
public void setTitle(String title)
{
this.title = title;
}
public void setNumberOfPages(int numberOfPages)
{
this.numberOfPages = numberOfPages;
}
public void setIsbn(int isbn)
{
this.isbn = isbn;
}
public String getAuthor()
{
return author;
}
public String getTitle()
{
return title;
}
public int getNumberOfPages()
{
return numberOfPages;
}
public int getIsbn()
{
return isbn;
}
public void displayBook()
{
System.out.println("Book Author:"+author);
System.out.println("Book NumberOfPages:"+numberOfPages);
System.out.println("Book Title:"+title);
System.out.println("Book Isbn:"+isbn);
}
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started