Hence it would look like insert electronics ps3 300 1

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: e. Each part of the transaction (i.e. the input values) will be delimited by one or more spaces between the fields. Valid operations are: insert, search, delete, update, and print. For the insert operation, you will need to instantiate an object of the appropriate type (Groceries, Clothing or Electronics), and add it into an arraylist. For the other transaction operations you will search for name, delete an item based on its name, update the quantity of an item, or print the current contents of the shopping cart (for each item, it’s: name, quantity, price after tax and shipping charges in ascending order by name) This is followed by the total charges for the shopping cart. The insert transaction will appear as follows: For clothing, it would look like insert clothing shirt 20.50 1 1 For electronics, we also need to indicate if it is fragile (F/NF) and the state to ship it to. Hence, it would look like insert electronics PS3 300 1 5.2 F NM For groceries, we need to indicate perishable (P/NP) and hence it would look like insert groceries cabbage 2.00 5 1 NP The delete transaction would...
View Full Document

This document was uploaded on 03/16/2014 for the course EE 422c at University of Texas.

Ask a homework question - tutors are online