Activity diagram for information gathering component

Assignment Help Database Management System
Reference no: EM13187308

In online marketing, a shopping cart is a piece of e-commerce software on a web server that allows visitors to an internet site to select items for eventual purchase, analogous to the American English term "shopping cart." In British English it is generally known as a shopping basket, almost exclusively shortened on websites to 'basket'.

The software allows online shopping customers to accumulate a list of items for purchase, described metaphorically as "placing items in the shopping cart" or "adding to cart". Upon checkout, the software typically calculates a total for the order, including shipping and handling (i.e. postage and packing) charges and the associated taxes, as applicable.

The development of web shop systems took place directly after the Internet or the World Wide Web had become a mass medium. This was a result of the launch of the browser Mosaic in 1993 and Netscape in 1994. It created an environment in which web shops were possible. The Internet and WWW therefore acted as the key infrastructure developments that contributed to the rapid diffusion of the e-commerce. E-commerce (as a subset of e-business) describes all computer-aided business transactions. In 1998 a total of 11 e-business models were observed, one of which was the e-shop business model for a B2C (Business-to-consumer) business - also called the "online shop". The two terms "online shop" and "electronic" or "e-shop" are used inter changeably. The term "online shopping" was invented much earlier in 1984; for example TV shopping often used the term before the popularity of the online method. Today the term primarily refers to the B2C transactional business model. In order to enable "online shopping" a software system is needed. Since "online shopping", in the context of the B2C business model, became broadly available to the end consumer, WWW-based "online shops" evolved.

These applications typically provide a means of capturing a client's payment information, but in the case of a credit card they rely on the software module of the secure gateway provider, in conjunction with the secure payment gateway, in order to conduct secure credit card transactions online.

Although the most simple shopping carts strictly allow for an item to be added to a basket to start a checkout process (e.g. the free PayPal shopping cart), most shopping cart software provides additional features that an Internet merchant uses to fully manage an online store. Data (products, categories, discounts, orders, customers, etc.) is normally stored in a database and accessed in real time by the software.

Shopping Cart Software is also known as e-commerce software, e-store software, online store software or storefront software and online shop.

Scenario

KitchenwareCity is a fast growing family business in Toowoomba. For the past five years, KitchenwareCity has served Toowoomba local community well. Aiming to provide high quality shopping experience and answering to the needs of many busy, aged, or disability customers, the management level of KitchenwareCity has decided to introduce online shopping facility to Toowoomba local community and develop a shopping cart software to allow customers to shop at home.

Against a group of talented, competitive programmers, you deadly want to win the contract of KitchenwareCity system development project. To first get into the short list, you need to develop a prototype program to demonstrate the main functions delivered in the shopping cart, as required by KitchenwareCity.

Functional Requirement Specification

As the prototype for web-based shopping cart system, the program is to be implemented in JavaScript and running on Firefox, an Operating System independent web browser. KitchenwareCity has specified detailed requirements as follows:

1. The prototype program should be running without errors throughout the two Phases: Information Gathering and Information Presenting.

2. In the Information Gathering Phase, each time the user adds one ordered product item into the shopping cart. The program should first confirm with the user before proceeding to gather information regarding the ordered product item.

3. When gathering the order information, the program should prompt and ask the user to enter the Product Code when adding a product item into the shopping cart.

o If the user entered something invalid, for example, a non-number value or a non-existing Product Code, the program should alert an error message on screen and terminate the current product-adding process. It then loops back to request user confirmation to proceed with adding a new item or moving to the next Information Presenting Phase.

o If the entered Product Code is valid, the program should then prompt the user to input the ordered quantity. Again, if an invalid value is input, such as a non-number value, a negative number or zero, the program should terminate the current product-adding process and loop back to request user confirmation to proceed with adding a new item or moving to the next Information Presenting Phase.

o If the entered quantity is valid, the ordered product item is successfully added into the shopping cart. The program then loops back to request user confirmation to proceed with adding a new item or moving to the next Information Presenting Phase.

4. In confirmation if the user confirms not to shop anymore, the program should then complete the Information Gathering Phase and moves to the Information Presenting Phase.

5. In the Information Presenting Phase, the program presents on the HTML a table listing the product items in the shopping cart, including product names, prices, quantity, and cost;

6. To make the Shopping Cart System user-friendly, KitchenwareCity also expects the program to display some statistic information:
o The total amount for ordered items in the shopping cart;
o The most expensive product item;
o The cheapest product item;
o The average cost per item in the cart.

Task Design

Against the Requirement Specification, you have made the following design to guide your implementation of the prototype. In respect wtih the two phases specified by KitchenwareCity, your program also consists of two components; Information Gathering Component and Information Presenting Component.

The first thing in the program will be two arrays, one for the list of products (namely PRODUCT_LIST in this document) and the other for the corresponding prices (namely PRICE_LIST). Thus, a product item and its price will have exactly the same index in the respecting arrays. (Hint: there is no need for an array to store the Product Codes. They can be just the index in PRODUCT_LIST .)

Task 1 - Information Gathering Component

You first need to create two arrays; one (namely orderedProductCodeArr) to store the Product Code of ordered items; the other to store the quantity of ordered item (namely quantityArr). Just like PRODUCT_LIST and PRICE_LIST, an ordered item's Product Code and quantity will be stored at exactly the same index in the respecting arrays. A diagram defining the relationships between PRODUCT_LIST, PRICE_LIST, orderedProductCodeArr, and quantityArr has been drawn in Figure 1.

62_Shopping Cart System.png

Figure 1: Relationship Diagram for Arrays

Subtask 1.1 - Pseudocode for Information Gathering Component
Information Gathering Component is very important to a shopping cart system. You really want to develop a good algorithm for it. As a professional practice, you decided to first make a working plan in pseudocode before putting hands on coding implementation for the Information Gathering component. After the consultation with an experienced software engineer, you have obtained an Activity Diagram (Figure 2). Now lets decipher the flowchart and input the pseudocode as multi-line comments into the program to guide implementation.

601_Shopping Cart System1.png

Figure 2: Activity Diagram for Information Gathering Component

Subtask 1.2 - 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.
Subtask 1.3 - Duplicate Order Detection [Challenging task for only extensive study, no extra mark gained. You can skip the task if you like]
KitchenwareCity will appreciate it if an extra feature can be delivered to detect duplicate orders. If an ordered item has already been in the cart, the system should detect the case, and then ask for user confirmation for updating the quantity or not. If the user confirms 'Yes', the stored quantity will then be replaced by the newly entered value; otherwise, the program terminates the current product-adding process and loop back to ask user confirmation for adding a new item or not. Note that the user is not allowed to completely remove an ordered item from the shopping cart.

Task 2 - 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.

303_Shopping Cart System2.png

Figure 3: Sample Information Presented in the Shopping Cart

Task 3 - Program Integration Testing

You need to test the implementation of all functions and features thoroughly before delivering the prototype program to KitchenwareCity. The program should be running appropriately without any errors. The testing strategy will help you assure the product quality and increase your chance to win the contract of KitchenwareCity Shopping Cart System project.
Non-Functional Requirement Specification
• Constants should appear before variable declarations which should appear before other statements.
• Variable and constant identifiers should use an appropriate convention.
• Identifiers should be written consistently throughout the code.
• Code is indented appropriately and grouped in blocks according to the common tasks attempting to.
• Appropriate comments should be added to all blocks of code.


Attachment:- ShoppingCart.rar

Reference no: EM13187308

Questions Cloud

Discuss quantitative and qualitative measures : Discuss quantitative and qualitative measures that improve performance and keep morale high. 150 words please cite your sources if you use them.
Calculate the population growth rate in the period : The table below presents the populations of Uganda, Ghana, India and Brazil in 2000 and 2010. For each of these countries, calculate the population growth rate in the period. What is the rank of countries with respect to their population growth rat..
Discuss how the new technology works : Discuss how the new technology works, what method or product the new technology is designed to replace, why the new technology is preferable to the old method or product, how this new technology benefits a print media corporation, the public, or both..
State solid copper hydroxide from copper nitrate : Solid copper (II) hydroxide from copper nitrate. First, add 30 mL of 3.0M sodium hydroxide to the solution in the Erlenmeyer Flask.Take a stirring rod and place the end about 1 cm into the solution; then tough the end to a 2 cm piece of red litmus..
Activity diagram for information gathering component : The prototype program should be running without errors throughout the two Phases: Information Gathering and Information Presenting.
Supposing the various solutions are used without dilution : Assuming the various solutions are used without dilution with water,how would you prepare 50ml of a buffered medium to keep pH essentially constant at 5.40 in an enzyme experimement in which acid will be produced?
Environmental issues of database management system : discuss five Indirect or direct environmental issues of database management system. discuss five Positive or negative economic effects of database management system.
Determine loan without interest for four years : The market interest rate is 10 percent and is expected to stay at that level. Explain your choice in each of the following situation: a. Would you prefer $500 gift today or $540 gift next year b. Would you prefer a $100 gift now or $500 loan without..
Compute ph and the concentration of acetate ion : Calculate pH and the concentration of acetate ion resulting from the mixtureof 400ml of 0.1M formic acid and 100ml 0.1 sodium acetate.

Reviews

Write a Review

Database Management System Questions & Answers

  List all pair of products names which are in same city

List the names of agents that placed an order for customer C003 or customer C006. List all pair of products names that are in the same city, along with their city name.

  Explaining uses for views

Views are integral part of virtual private databases, yet views are utilized for many other reasons. Find out many other uses for views.

  Developing a database

You have been asked to develop a database utilizing only the written problem description given by the client. In reviewing the description.

  Calculate canonical cover for set of functional dependencies

Calculate a canonical cover for above set of functional dependencies (show each step of your derivation with an explanation).

  Analyzing hard-to-obtain data from two separate databases

You are interested in analyzing some hard-to-obtain data from two separate databases. Each database contains n numerical values.

  Criteria selecting a life-cycle model for the project

What criteria would you use in selecting a life-cycle model for the project?

  Explain the datawarehouse and data mining concepts

There are six major types of information systems which organisations use in their operations. Discuss how these information systems support managers in their decision making role Explain the datawarehouse and data mining concepts using appropria..

  Information-gathering techniques for the project

Explain the information-gathering techniques and design methods you would suggest to use for project. Recognize the key factors that help ensure the information required for the project.

  Based on the schema write sql statements

Based on the schema write SQL statements and provide the equivalent relational algebra expressions - relational algebra expressions return and give the equivalent SQL statements.

  Data modelling in organizational intelligence

Data Modelling (database) require 8 page essay covering the following subjects: Organizational Intelligence. It must specifically talk about organizational intellignece being outcome of organization's efforts.

  Relational algebra expressions for names of salespeople

Illustrate relational algebra expressions for names of all salespeople, names of all salespeople having ORDER row and names of salespeople not having ORDER row.

  Write the sql ddl to create the database

The appropriate SQL commands, which should be copied from your source code in MySQL, and pasted into your submission file; and The resultant tables, which must be screenshots to show the change due to the execution of commands

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd