Create a class named Book that includes auto-implemented
properties for the International Standard Book
Number (ISBN), title, author, and price. (An ISBN is a
unique number assigned to each published book.) Create
a child class named TextBook that includes a grade level
and a CoffeeTableBook child class that contains no additional
fields or properties. In the child classes, override
the accessor that sets a Book’s price so that TextBooks
must be priced between $20.00 and $80.00, inclusive, and
CoffeeTableBooks must be priced between $35.00 and
$100.00, inclusive. Write a program that creates a few
objects of each type and demonstrate that all of the methods
and properties work correctly. Be sure to use valid
and invalid values when testing the child class properties.
TaylorS 0 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.