Reference no: EM13331349
Information Presenting Component (Functional Requirement 5, 6)
Subtask 2.1 - Calculating the Total Cost Amount
Your program needs to be able to calculate the total amount of all ordered items in the shopping cart. The calculation can be completed in either of two different ways;
1. Accumulate the amount of each order immediately after the items being added into the cart. For that you need to retrieve the price of a product item from PRICE_LIST in order to calculate the amount by price*quantity. (Hint: A product item and its price have exactly the same index in the respecting arrays.) In this case, the calculation will need to be implemented in the Information Gathering Component; OR
2. After completion of the Information Gathering Phase, in a loop you can visit each of the Product Codes stored in orderedProductCodeArr in order to get the index for the corresponding price in PRICE_LIST. You then access to quantityArr to retrieve the quantity. With the calculation of price*quantity, you can accumulate the amount for total orders. In this case, the calculation is implemented after the Information Gathering Component.
Subtask 2.2 - Finding the Most Expensive Product Item in the Shopping Cart
Your program needs to be able to find the most expensive product item in the shopping cart. To do that, for each of the ordered items you need to firstly retrieve the corresponding price from PRICE_LIST, and then compare the prices one by one. Once you find out the most expensive price, the corresponding product item in PRODUCT_LIST will be the most expensive product item in the shopping cart.
Similarly, you can implement this feature either in or after the Information Gathering Component.
Subtask 2.3 - Finding the Cheapest Product Item in the Shopping Cart
Your program needs to be able to find the cheapest product item in the shopping cart. For it you may adopt the same strategy described in Subtask 2.2.
Subtask 2.4 - Calculating Average Cost Per Unit
Your program needs to be able to calculate the average cost per unit for the ordered product items in the shopping cart. This can be done by total cost divided by the accumulated value of quantities. Note that the program needs to handle "Division by Zero" exception. Only two digits after decimal point are required in display of the calculated average value.
Subtask 2.5 - Presenting the Order Information on a Table
To a table on HTML, your program needs to print out the detailed order information including product name, price, quantity, and cost. You may adopt an iteration plan to visit the elements stored in quantityArr and orderedProductCodeArr in order to get the index to retrieve the product names and prices from PRODUCT_LIST and PRICE_LIST.
Subtask 2.6 - Presenting the Statistic Information on an Unordered List [0 Mark, but it will reflect the result of Subtask 2.1-2.4]
Your program needs to print out the statistic information (total cost, the most expensive item, the cheapest item, and the average cost per unit for the ordered product items) to an unordered list on HTML, following the same format illustrated in Figure 3.
Calculate total income or adjusted gross income
: Calculate total income or adjusted gross income on page 1 of Form 1040 and compute the federal tax liability, or determine the refund or balance due.
|
What is the speed of a point on the belt
: A vacuum cleaner belt is looped over a shaft of radius 0.44cm and a wheel of radius 1.50cm. What is the speed of a point on the belt
|
How much money did the dealer make on the bid-ask spread
: If a bond dealer bought a $100,000 municipal bond at 92% of par and sold it at 96% of par, how much money did the dealer make on the bid-ask spread?
|
Administrative or management commitment risks
: Administrative or management commitment risks is one of the risks associated with commuter-based tools in e-procurement, probably for the reason of their potential impact in an e-procurement process. On the other hand, management knowledge is a trait..
|
Finding the most expensive product item in the shopping cart
: Your program needs to be able to find the cheapest product item in the shopping cart. For it you may adopt the same strategy described in Subtask 2.2.
|
Discuss the relationship between inflation and interest rate
: Discuss the relationship between inflation and interest rate. Do an international relationship exist, yes no HOW?
|
Explain what is the minimum uncertainty
: If the x-component of the velocity of an electron can be measured only to a precision of , what is the minimum uncertainty of the position of the electron in the x-direction. ( )
|
Minimize the current years tax liability
: Minimize the current years tax liability. That is, they would like to defer income when possible and take the largest deductions possible, a practice they have followed in the past.
|
Implementation of information gathering component
: Based on the pseudocode developed in Subtask 1.1, you are to implement the Information Gathering Component in this task.
|