Posted by stephanie on .
Design a class named Book that holds a stock number,
author, title, price, and number of pages for a book.
Include methods to set and get the values for each data
ﬁeld. Also include a displayInfo() method that displays
each of the Book’s data ﬁelds with explanations.
b. Design a class named TextBook that is a child class of
Book. Include a new data ﬁeld for the grade level of the
book. Override the Book class displayInfo() method so
that you accommodate the new grade-level ﬁeld.
c. Design an application that instantiates an object of each
type and demonstrates all the methods.