using System;

namespace File_serialize_Book
{
/// <summary>
/// Summary description for Book.
/// </summary>
[Serializable] public class Book
{
private string strTitle;
private int intQty;
private decimal decPrice, decTotal;

public Book(string Title, int Qty, decimal Price)
{
//
// TODO: Add constructor logic here
//set the private fields and compute the total
strTitle = Title;
intQty = Qty;
decPrice = Price;
ComputeTotal();
//
}

public string Title
{
get
{
return strTitle;
}
set
{
strTitle = value;
}
}

public int Qty
{
get
{
return intQty;
}
set
{
intQty = value;
}
}

public decimal Price
{
get
{
return decPrice;
}
set
{
decPrice = value;
}
}

public decimal Total
{
get
{
return decTotal;
}
set
{
decTotal = value;
}
}

private void ComputeTotal()
{
decTotal = intQty * decPrice;
}
}
}