programming

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
field. Also include a displayInfo() method that displays
each of the Book’s data fields with explanations.
b. Design a class named TextBook that is a child class of
Book. Include a new data field for the grade level of the
book. Override the Book class displayInfo() method so
that you accommodate the new grade-level field.
c. Design an application that instantiates an object of each
type and demonstrates all the methods.

  1. 👍 0
  2. 👎 0
  3. 👁 249

Respond to this Question

First Name

Your Response

Similar Questions

  1. Program Design and Development

    Help on Design a class named Book that holds a stock number, author, title, price, and number of pages for a book. Include methods to get and set the values for each data field. Write the pseudocode that defines the class?

    asked by angie on March 20, 2017
  2. programming

    Design a class named Book that holds a stock number, author, title, price, and number of pages for a book. Include a method that sets all the data files and another that prints the values for each data field. Create the class

    asked by hazy on September 1, 2011
  3. Program Design and Development

    Help on Design a class named StockTransaction that holds a stock symbol (typically one to four characters), stock name, number of shares traded, and price per share. Include methods to set and get the values for each data field.

    asked by lisa on March 20, 2017
  4. Design

    Design a class named StockTransaction that holds a stock symbol (typically one to four characters), stock name, number of shares traded, and price per share. Include methods to set and get the values for each data field. Create

    asked by reem on July 16, 2014
  5. Python: Named tuples

    I've been trying to print a list of the book titles within the named tuple in alphabetical order, but I don't know what I'm doing wrong. I've set up my named tuple as so: Book = namedtuple('Book', 'author title genre year price

    asked by Student on January 23, 2014
  6. C#

    The Peterman Publishing Company has decided that no published book should cost more than 10 cents per page. Create a BookException class whose constructor requires three arguments: a string Book title, a double price and an int

    asked by Isaih on August 29, 2012
  7. Python: Creating function

    The value of the inventory of a particular book is the price of that book times the number of copies we have in stock. Write a function called inventory_value that takes a Book as its argument and returns the value of our

    asked by Student on January 24, 2014
  8. English

    Check all that apply. If you are using parenthetical citation for a book, what information needs to be put in parentheses? a) the author's name b) the author's last name c) the book's title d) the publisher e) the page number

    asked by Britttttany on May 28, 2012
  9. Microeconomics - determining how many to sel

    Hi, I would really appreciate it if someone could help me with these questions: An author earns royalties from his book that are specified as 10% of the book's selling price. The demand curve for this is straight and downward

    asked by SuprNova on November 11, 2006
  10. Programming Logic and Design

    Create a class named Year that contains data fields to hold the number of months in a year and the number of days in a year. Include a constructor that sets the number of months to 12 and the number of days to 365, and get and set

    asked by WayneR on April 8, 2015

More Similar Questions