Page 291 - IT-802_class_12
P. 291

//Add functionally to insert a row of wishpayment named

                  / / payment_tuple

                 //SQL command to be used: insert

                       QUESTION
                       Suppose if the buyer cancels the order, payment should be refunded to him.

                       For achieving this, is there any need to make changes in PAYMENT table. If yes, specify those
                       changes. Also, write a function


            12.  All the details of order are stored in table ORDER using function insert_order of class Order. If the user wishes to
                cancel an order, he can do so by choosing cancel order option. In such case, function delete_order will be invoked.
                If user wants to track his order, he can do so by providing the order_id. After doing so, function display_order will
                display all the relevant details of his order along with current status.

               package shopping_application;
               public class Order{ public void insert_order (String order_tuple[])

               //Add functionally to insert a row of wishpayment named / [order_ tuple.
                 //SQL command co be used: insert

               public void delete_order (int order_id)
                 //Add functionally to delete a order with id order_id

                 //SQL command to be used: delete

               public void display_order (int Order_id)
                 //Add functionally to display display of the order with

                 //id order_id
                 //SQL command to be used: select
            13.  Finally, details of shipment of order are stored in the table SHIPMENT using function insert_shipment_details of
                class Shipment.

               package shopping_application;

               public class Shipment{
               public void insert_shipment_details(String order_shipment[])

               {
                 //Add functionally to insert a row of wishpayment named

                 //order_tuple

                 //SQL command to be used: insert
               }
              4.3 Work eXPerIence


            Let us now look at the different information that must be kept in the database in order to create any application. A
            separate table must be established for each entity using the create SQL statement. Example:


                                                                                 Work-Integrated Learning IT-DMA  289
   286   287   288   289   290   291   292   293   294   295   296