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 field or properties. In the child classes, override the accessor that sets a Book 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. Save the file as BookDemo.cs

In the Book class you created in Exercise 4a, overload the Object class Equals() method to consider 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 a different one. Demonstrate that the Equals() method works correctly to compare the books. Save the program as BookDemo2.cs

Write an application that declares two Book objects and uses extension method named DisplayTitleAndAuthor() with each. The method displays a Books title, the word “by”, and the author’s name.

Recommended Answers

What are the coding issues you have.
Tell us that and we will try to solve them.

Jump to Post

All 3 Replies

What are the coding issues you have.
Tell us that and we will try to solve them.

See the rules: "provide evidence of having done some work yourself if posting questions from school or work assignments"

Cutting and pasting your assignment does not count...

I can help you- whatsapp me +99560477385

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.