Monday 22 April 2013

book


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace book
{
    class Book
    {
        string BookCat;
        string FirstName;
        string LastName;
        int IsbnNo;
        int NoOfCopies;
    }
        public void Display();
        {
        Console.WriteLine("\nThe followingare the details of the book");
        Console.Write("Category of the Book: ");
        Console.WriteLine("BookCat");
        Console.Write("Name of the Author: ");
        Console.WriteLine("FirstName");
        Console.Writeline("{0},LastName");
        Console.write("ISBN Number");
        Console.WriteLine("IsbnNo");
        Console.Write("No of Copies: ");
        Console.Write("NoOfCopies");
        }
    public void Get()
        {
            Console.WriteLine("Please enter the details of the Book");
            Console.writeLine("Enter the Category of the Book(Fiction/Nonficition): ");
            BookCat=Console.ReadLine();
            Console.WriteLine("First Name of The Author: ");
            FirstName=Console.ReadLine();
            Console.WriteLine("Last Name of Author: ");
            LastName=Console.ReadLine();
            Console.WriteLine("ISBN Number");
            IsbnNo=Convert.ToInt32(COnsole.ReadLine());
            Console.WriteLine("Number of Copies; ");
            NoOfCopies=Convert.ToInt32(Console.ReadLine());
        }
    }
    class MyClass
    {
        static void Main(string[] args);
        {
        Book My_Fav= new Book();
        My_Fav.Get();
        My_Fav.Display();
        Console.ReadLine();
        }
    }

No comments:

Post a Comment