Presentation is loading. Please wait.

Presentation is loading. Please wait.

Object programming Properties Method. cart.html with the following functions: 1.addcart(desc, price) 2.additem(desc, price, itemcnt) 3.viewcart() 4.prtitem(where)

Similar presentations


Presentation on theme: "Object programming Properties Method. cart.html with the following functions: 1.addcart(desc, price) 2.additem(desc, price, itemcnt) 3.viewcart() 4.prtitem(where)"— Presentation transcript:

1 Object programming Properties Method

2 cart.html with the following functions: 1.addcart(desc, price) 2.additem(desc, price, itemcnt) 3.viewcart() 4.prtitem(where) 5.delitem(itemcnt) top.hidden top.main jackson.html with the following buttons: Place order View order Jackson electronic example

3 Shopping cart logic 1.cart.html is always accessible in top.hidden frame 2.jackson.html is displayed in top.main frame 3.When the [Place Order] button is clicked, the addcart function is called, passing along the product description and price from the order 4.The addcart function will call the additem function to store the description, price, and current count of the item onto the shopping cart  an alert message is issued as confirmation that the additem function is successfully executed 5.Steps 3 and 4 will be repeated until the user clicks the [View Order] button which triggers the viewcart function 6.The viewcart function will display the content of the cart object in top.main frame as a table by calling the display method of the cart object  prtitem function with a delitem function link

4 banner.html with image map: banner.jpg brkfst.html lunch.html dinner.html cart.html with the following functions: 1.additem(desc, price, itemcnt) 2.delitem(itemcnt) 3.addcart(desc, price) 4.prtitem(where) 5.viewcart() top.hidden top.main Kelsey’s Diner example

5 Shopping cart logic 1.cart.html is always accessible in top.hidden frame 2.Assume brkfst.html is displayed in top.main frame 3.user selected an item off the menu by clicking on the Order link which triggers the addcart function with its description and price 4.The addcart function will call the additem function to store the description, price, and current count of the item onto the shopping cart  an alert message is issued as confirmation that the additem function is successfully executed 5.Steps 3 and 4 will be repeated until the user clicks the View Order link which triggers the viewcart function 6.The viewcart function will display the content of the cart object in top.main frame as a table by calling the display method of the cart object  prtitem function with a delitem function link


Download ppt "Object programming Properties Method. cart.html with the following functions: 1.addcart(desc, price) 2.additem(desc, price, itemcnt) 3.viewcart() 4.prtitem(where)"

Similar presentations


Ads by Google