assn3-shopping-cart-v1(1)

Name is a string without spaces price is a real

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: se price, tax (as applicable) and shipping cost for each item. Model Details: Every purchase item (base- class) bought has a name, price, quantity and weight attributes associated with it. Name is a string without spaces; price is a real number in dollars and cents; quantity is a non- negative whole number; weight is in whole pounds. Here are the Standard Pricing Rules for all purchased items: 1) Sales tax rate is 10% for clothing and electronics (with the exception of the below mentioned states). 2) Standard shipping cost is calculated by the following formula1: (20*(weight))*quantity. 3) Premium shipping incurs an additional charge of 20% over the standard shipping cost. 4) Assume that each item is shipped separately; i.e. don’t combine grocery item A and grocery item B into a single package or with clothing item C. You will need a driver class (that contains main) to process the transactions and summarize the shopping cart contents when there are no more transactions to process. 1 Arbitrarily chosen formula for simplicity of...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online