Help in c# - C sharp?

Sarahlee May

New member
Help in c# - C sharp?
This my first time working with C sharp and I need help to code this program - please assist

here is the program

Create an abstract class named Book that includes fields for the International Standard Book Number (ISBN), title, author, and price. Include properties for each field. Create a method DisplayTitleAndAuthor() that will display the title and author for a given book.

Create a sub-class named TextBook that includes a grade level and a CoffeeTableBook sub-class that contains no additional fields. In the sub-classes, override the accessor that sets a Book's price so that TextBooks must be priced between $35 and $100, and CoffeeTableBooks must be priced between $41 and $120.

Create a windows form with one button that will create TextBooks and another button to create CoffeeTableBooks. Demonstrate that all the methods and properties work correctly.
I really need help on this one
it is due Wednesday.
I started the form and completed the design
here is what I did write in the book class
I am getting this error

'Book': member names cannot be the same as their enclosing type



class Book
{
public abstract class book

{

String title = new String();

double price;

public Book(String t)
{

title = t;



}

public String getTitle()
{

return title;

}

public double getPrice()
{

return price;

}

public abstract void setPrice();



}
 
Back
Top