Exemplo n.º 1
0
        public static string encode(OrderClass OrderObject)

        {
            //Console.WriteLine("in encoder");


            string data = OrderObject.getSenderId() + "-" + OrderObject.getcardNo().ToString()


                          + "-" + OrderObject.getAmount().ToString() + "-" + OrderObject.getunitPrice().ToString();


            return(data);
        }
Exemplo n.º 2
0
        public static void processOrder(OrderClass obj, double p)         //initialize a new instance
        {
            Console.WriteLine("Order Processing");

            Console.WriteLine("Credit Card Valid");


            double total = (obj.getunitPrice() * obj.getAmount()) + obj.getTax() + obj.getLocationCharge();



            Console.WriteLine("Order from {0} ", obj.getSenderId(),
                              "ordered ", obj.getAmount(),
                              "book(s).\nCredit Card Number:", obj.getcardNo(),
                              "\nPrice:", obj.getunitPrice());
            Console.WriteLine("The total is:" + total);
        }