Ask DBMS Expert


Home >> DBMS

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

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M9477361

Have any Question?


Related Questions in DBMS

Data mining assignment -in this assignment you are asked to

Data Mining Assignment - In this assignment you are asked to explore the use of neural networks for classification and numeric prediction. You are also asked to carry out a data mining investigation on a real-world data ...

Sql query assignment -for this assignment you are to write

SQL Query Assignment - For this assignment you are to write your answers in a word document. This assignment is in three parts: Part A (reporting queries), Part B (query performance), Part C (query design). For this assi ...

The groceries datasetimagine 10000 receipts sitting on your

The groceries Dataset Imagine 10000 receipts sitting on your table. Each receipt represents a transaction with items that were purchased. The receipt is a representation of stuff that went into a customer's basket. That ...

You are in a real estate business renting apartments to

You are in a real estate business renting apartments to customers. Your job is to define an appropriate schema using SQL DDL in MySQL. The relations are Property(Id, Address, NumberOfUnits), Unit(ApartmentNumber, Propert ...

Objectivethe objective of this lab is to be familiar with a

OBJECTIVE: The objective of this lab is to be familiar with a process in big data modeling. You're required to produce three big data models using the MS PowerPoint software. This tool is available on UMUC Virtual Deskto ...

The relation memberstudentid organizationid roleid stores

The relation Member(StudentId, OrganizationId, RoleId) stores the membership information of student joining organization. For example, ('S1', 'O2', 'R3') indicates that student with Id 'S1' joined the organization with i ...

Relational database exerciseyou have been assigned to a new

Relational Database Exercise: You have been assigned to a new development team. A client is requesting a relational database system to manage their present store with the anticipation of adding more stores in the future. ...

Relational database design a given the following business

Relational Database Design A) Given the following business rules, identify entity types, attributes (at least two attributes for each entity, including the primary key) and relationships, and then draw an Entity-Relation ...

We can represent a data set as a collection of object nodes

We can represent a data set as a collection of object nodes and a collection of attribute nodes, where there is a link between each object and each attribute, and where the weight of that link is the value of the object ...

Data model development and implementationpurpose of the

Data model development and implementation Purpose of the assessment (with ULO Mapping) The purpose of this assignment is to develop data models and map Database System into a standard development environment to gain unde ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As