java code Fields and methods given Book Fields String title String author int copies Methods Book(String title,String author,int copies) Book() getTitle()String setTitle(String title) getCopies()int setCopies(int copies) toString Question create a method called destroyCopy which will decrement the copies field create a method called newCopy which will increment the copies field create method called upSize which will receive through a number representing the percentage in which the library is going to expand,this method should then return the number of copies that need to be purchased to adhire to the upsizing. put a comment in the line above these three methods destroCopy,newCopy and upsize.The comment should read Unused method.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 10PE
icon
Related questions
Question

java code

Fields and methods given

Book
Fields
  • String title
  • String author
  • int copies

Methods

  • Book(String title,String author,int copies)
  • Book()
  • getTitle()String
  • setTitle(String title)
  • getCopies()int
  • setCopies(int copies)
  • toString

Question

  • create a method called destroyCopy which will decrement the copies field
  • create a method called newCopy which will increment the copies field
  • create method called upSize which will receive through a number representing the percentage in which the library is going to expand,this method should then return the number of copies that need to be purchased to adhire to the upsizing.
  • put a comment in the line above these three methods destroCopy,newCopy and upsize.The comment should read Unused method.

 

Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT