Page 289 - IT-802_class_12
P. 289

7.   Whenever a buyer visits the shopping website, he can either sign in or specify the details while placing the order.
              If he is an existing user, he may login using the interface. If the customer is not yet registered and wants to get
              registered, he may use the other interface. It may be noted that almost same interface (excluding password field) is
              used when unregistered user specifies his details during placement of order.






































            8.   The details specified by the user are saved into BUYER table using function insert_buyer of class Buyer. These details
              are used whenever buyer places any order. For example, package address specified can be used for courier purpose.
              At any point in time, buyer may change his personal details. Function modify_buyer may be used for the same.

              package shopping_application;

              public class BUyER

              { public void insert_buyer (String buyer_tuple[])

                   //Add functionally to insert a row of buyer named / buyer_tuple
                   //SQL command to be used: insert

              public void modify_buyer(int vendor_li, String actr, String new)

                   //Add functionally to change value of attribute attr
                   //of commodity with id buyer_id to new

                   //SQL command to be used: update

                       QUESTION
                       Suppose a buyer wants to delete his account. What kind of functionality needs to be added
                       to the class Buyer? Specify the routine for it.





                                                                                 Work-Integrated Learning IT-DMA  287
   284   285   286   287   288   289   290   291   292   293   294