Question: 4 a. Create a class named Book that includes auto implemented properties for the International Standard Book Number (ISBN), title, author, and price. Include properties

4 a. Create a class named Book that includes auto implemented properties for the International Standard Book Number (ISBN), title, author, and price. Include properties for each field. create a child class named TextBook that includes a greade level and a CoffeeTableBook child class that contains no additional fields. in the child classes, override the accessor that sets a Book's price so that TextBooks must be priced between $20 and $80, inclusive and CoffeeTableBooks must be priced between $35 and $100, 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. save the file as BookDemo.cs.

b. in the Book class you created in excercise 4a, overload the object class equals() method to conside two books equal if they have the same isbn. create a program that declares three books; two should have the same isbn and one should have different one. Demonstrate that equals() method works correctly to compare the Books. same the program as BookDemo2.cs.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!