assn3-shopping-cart-v1(1)

Hence it would look like insert electronics ps3 300 1

Info icon This 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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern