SHARE
TWEET

Untitled

a guest Jun 17th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module shoppingCart{
  2.     struct Product{
  3.         long productId;
  4.         string productName;
  5.         double productPrice;
  6.         long productQuanity;
  7.     };
  8.  
  9.     struct ProductOrder {
  10.         long productOrderId;
  11.         Product product;
  12.         long productOrderQuanity;
  13.     };
  14.  
  15.     typedef sequence<Product> ListOfProducts;
  16.     typedef sequence<ProductOrder> Orders;
  17.     struct Cart {
  18.      Orders orders;
  19.     };
  20.  
  21.     interface Shop {
  22.         ListOfProducts showAvailableProducts();
  23.         string createNewCart();
  24.     };
  25.  
  26.     interface CartManager {
  27.         Cart showCart(out Cart cart);
  28.         Cart addToCart(in ProductOrder productOrder, out Cart cart);
  29.         Cart removeFromCart(in ProductOrder productOrder, out Cart cart);
  30.         Cart checkOutCart(out Cart cart);
  31.     };
  32. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top