using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

 

namespace Lab2

{

    class InvoiceTest

    {

        static void Main(string[] args)

        {

            Invoice myInvoice = new Invoice();

 

            Console.WriteLine("Enter Part Number: ");

            myInvoice.PartNumber = Console.ReadLine();

            Console.WriteLine();

 

            Console.WriteLine("Enter Part Description: ");

            myInvoice.PartDescription = Console.ReadLine();

            Console.WriteLine();

 

            Console.WriteLine("Enter Quantity Purchased: ");

            myInvoice.QuantityPurchased = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine();

 

            Console.WriteLine("Enter Price Per Item: ");

            myInvoice.PricePerItem = Convert.ToDecimal(Console.ReadLine());

            Console.WriteLine();

 

            decimal total = myInvoice.QuantityPurchased * myInvoice.PricePerItem;

            Console.WriteLine("Amount is ${0}", total);

 

            Console.ReadLine();

        }

    }

}

 

Homepage