Pre-conditions - West Virginia University

advertisement
Contact: ecaynor@gmail.com;
jmusgrov@mix.wvu.edu
E-Commerce
Super
Solutions
Design Specification:
CS 430
E. Christopher Caynor
Jesse Musgrove
Tyler Sigley
Emerson Sklar
Contents
1.0 Introduction ............................................................................................................................................ 4
1.1 Project Explanation ............................................................................................................................. 4
1.2 Scope ................................................................................................................................................... 4
1.3 Context ................................................................................................................................................ 4
1.4 Constraints .......................................................................................................................................... 4
1.5 Desired Outcome ................................................................................................................................ 5
2.0 Data Design ............................................................................................................................................. 5
2.1 Global Data Structure ......................................................................................................................... 5
2.1.1 Context Diagram .......................................................................................................................... 5
2.1.2 Level 1 Data Flow Diagram........................................................................................................... 6
2.2 Database Structure ............................................................................................................................. 7
2.2.1 SalesItem ...................................................................................................................................... 7
2.2.2 CustomerAccount ........................................................................................................................ 8
2.2.3 Feedback ...................................................................................................................................... 8
2.2.4 Warehouse Statistics.................................................................................................................... 9
2.2.5 Order Information ........................................................................................................................ 9
2.2.6 Shopping Cart ............................................................................................................................... 9
3.0 Architecture and Program Design ......................................................................................................... 10
3.1 Program Architecture ....................................................................................................................... 10
3.2 Component Descriptions .................................................................................................................. 10
3.2.1 Administrative Functions ........................................................................................................... 10
3.2.2 Shipping Functions ..................................................................................................................... 25
3.2.3 System Functions ....................................................................................................................... 31
3.2.4 Customer Functions ................................................................................................................... 33
3.3 Interface Descriptions ....................................................................................................................... 47
3.3.1 Internal Interfaces ...................................................................................................................... 47
3.3.2 Customer Interfaces................................................................................................................... 48
3.3.3 Warehouse Interfaces ................................................................................................................ 49
3.3.4 Website Connectivity Layout ..................................................................................................... 50
2
4.0 Restrictions and Constraints ................................................................................................................. 51
4.1 Anticipated Areas of Concern ........................................................................................................... 51
5.0 Testing and Validation .......................................................................................................................... 52
5.1 Test Types and Expected Responses ................................................................................................. 52
5.2 Breakdown of Individual Tests .......................................................................................................... 52
5.2.1 Search Items............................................................................................................................... 52
5.2.2 Browse Website ......................................................................................................................... 52
5.2.3 Create Account........................................................................................................................... 52
5.2.4 Modify Account .......................................................................................................................... 52
5.2.5 Add Item to Cart......................................................................................................................... 52
5.2.6 Remove Item from Cart ............................................................................................................. 52
5.2.7 Change Quantity in Cart ............................................................................................................. 52
5.2.8 Order Product ............................................................................................................................ 53
5.2.9 Check for Confirmation .............................................................................................................. 53
5.2.10 Check Order ............................................................................................................................. 53
5.2.11 Update Tracking Information ................................................................................................... 53
5.2.12 Check Tracking Information ..................................................................................................... 53
5.2.13 Add Feedback ........................................................................................................................... 53
5.2.14 Modify Feedback...................................................................................................................... 53
5.2.15 Delete Feedback....................................................................................................................... 53
5.2.16 Delete Account......................................................................................................................... 53
5.2.17 Add an Item .............................................................................................................................. 53
5.2.18 Modify an Item......................................................................................................................... 53
5.2.19 Delete an Item.......................................................................................................................... 53
6.0 Appendixes and Additional Content ..................................................................................................... 54
6.1 Traceability Matrix ............................................................................................................................ 54
6.1.1 A: Customer Account Concerns ................................................................................................. 54
6.1.2 B: Order Concerns ...................................................................................................................... 54
6.1.3 C: Administrative Concerns ........................................................................................................ 54
6.1.4 D: Warehouse Concerns ............................................................................................................ 54
6.1.5 Traceability Matrix Graph .......................................................................................................... 54
6.2 Packaging/Installation Plan ............................................................................................................... 55
3
6.3 State Transition Diagrams ................................................................................................................. 56
6.3.1 Customer Diagram ..................................................................................................................... 56
6.3.2 Sales Manager Diagram ............................................................................................................. 57
6.3.3 Warehouse Manager Diagram ................................................................................................... 58
1.0 Introduction
1.1 Project Explanation
We have been contracted to develop a streamlined sales solution for a corporate partner of the West
Virginia University Bookstores. We will not only manage the current supply of books available in the
system through our database solution, but also complete sales transactions on the web interface for the
company.
1.2 Scope
The system will be required to accept sales orders from customers. It will also need to return
information from the databases to customers and employees wishing to search the products. It will be
required to display sales information and allow for the modification of product information by a sales
manager. It will also have to access the warehouse system to display orders and to allow for the status
of the order to change upon shipping.
It is important to realize that data will be almost exclusively modified, added, and deleted through the
use of SQL Queries and Results. These commands will be hidden in the HTML code built through the use
of Visual C.
1.3 Context
The system is going to be centralized within the company infrastructure at a main location. This system
will be accessible through a web-based interface. Warehouses must be able to individually interact with
the databases from external locations.
The software will be reliant on user input. The credit system will be automated; sales processed by the
system will use an HTML structure. The software itself is very reliant on communication with the
system's database that will store all books and records. The system itself is primarily a link between that
database and the customers or bookstore employees.
1.4 Constraints
A great deal of data is processed by the system. This will require advanced hardware to handle to
amount of data transfer and regular interfaces from the internet. The stock will regularly change as
individual universities make changes to their course curriculum. There is also a security concern which
must be addressed. The database and web-server must be carefully managed to prevent outside
individuals from accessing the data without permission.
4
1.5 Desired Outcome
We wish, through the use of a rapid prototyping design model, to produce a working web-based ecommerce solution by the end of April 2008. Our system will access a database on the company’s
servers to control and manage stock information. All sales will be completed through the web-based
interface and the warehouse will be able to access information about sales in need of shipping through
their database control. To allow for expansion, our system will be developed with ease of updating in
mind. Ideally, updating a single set of files on the company’s server will allow the entire system to be
modified and improved.
2.0 Data Design
2.1 Global Data Structure
2.1.1 Context Diagram
Login
Sales
Administration
Login
Logout
Register
Search
Checkout
Browse
Add Item
Logout
Query Books
Add Book
Remove Book
Modify Book
Remove Item
Request Sales
Reset Sales
Import Data
Search Customers
Remove Customer
Modify Customer
Empty Cart
Change Quantity
Modify Feedback
Remove Feedback
Book Information
Customer Information
Functionality
Query Sold
Query Incoming
Acknowledge Receipt
Book Shipped
Customer
E-Commerce
System
Save Cart
Feedback
Restock Notice
Book Information
Detailed Book Information
Functionality
E-Mail
Credit Passed
Warehouse
Administration
Login
Logout
Functionality
Sold Books
Incoming Books
5
Billing Request
Banking
System
2.1.2 Level 1 Data Flow Diagram
Remove Customer
Search Customer
School XML
Import File
Open File
Import Data
Importing
Modify Customer
Request
Sales
Reset Sales
Administrative
Customer
Functions
Customer
Information
Administrative
Sales
Read File
SQL Command
Remove Feedback
Modify Feedback
Modify Book
Query Books
Add Book
Remove Book
SQL Command
SQL Query
Administrative
Book
Functions
Results SQL
Query
SQL Query
Logout
Results
Functionality
Login
Logout
Results
SQL Query
SQL Command
Results
SQL Command
System
Database
SQL Query
Results
Sales
Administrative
SQL
Login/out
Query
Login
SQL
Command
SQL Command
Book Information
Customer
Login/out
Detailed Book Information
SQL Command
SQL Query
Results
Book Information
Feedback
Sold Books
Query
Sold
Register
Functionality
Warehouse
Sales and
Shipping
Searching
SQL
Query
Results
Results
Results
SQL
Command
SQL
Query
SQL Command
SQL Query
Results
Login
Purchasing
Credit
Passed
Warehouse
Administrative
Login/out
Restock Notice
E-Mail
Checkout
Automated
Functions
Inventory
Logout
Functionality
Browse
Billing Request
Book Shipped
Acknowledge
Receipt
Query
Incoming
Incoming
Books
Billing
Credit
Request
Passed
6
Search
Add Item
Change
Quantity
Remove
Empty
Item
Cart
Save
Cart
2.2 Database Structure
SalesItem
PK
itemid
itemname
isbn
quantityinstock
new
author
publisher
copyright
edition
coursenumbers
ordercost
restock
feedbackids
warehouseids
WarehouseStatistics
PK
warehouseid
pendingorders
statusreport
contactphone
contactaddress
CustomerAccount
PK
customerid
FK1
customername
creditcardinfo
mailingaddress
billingaddress
phonenumber
cartid
restocktitles
email
pendingorderids
pastorderids
feedbackids
OrderInformation
PK
orderid
FK1
customerid
orderdate
shippingdate
orderstatus
comments
trackingnumbers
itemids
Feedback
PK
feedbackid
FK1
customerid
information
rating
ShoppingCart
PK
cartid
FK1
customerid
itemids
2.2.1 SalesItem
The sales items will be made up of the following collection of information.
ItemID – The ID number used by the system.
ItemName – The title of the product.
ISBN – The ISBN used to identify the product.
QuantityInStock – The quantity in stock, this must be attached to the individual warehouse.
New – This is a true/false for whether the book is new or used.
Author – The author(s) of the product.
Publisher – The publisher of the product.
7
Copyright – The copyright date of the product.
Edition – The edition of the product.
CourseNumbers – The course numbers that are identified with the product. The courses that will
require the text.
OrderCost – The price the product costs the company.
Restock – When the book is restocked, this is set to true. The system will notify all users who wished to
be notified upon restocking of the product and this will then be set to false.
FeedbackIDs – The ID number used by the system. There can be multiples of these.
WarehouseIDs – The ID number used by the system. There can be multiples of these.
2.2.2 CustomerAccount
Customer accounts will be made up of the following information.
CustomerID – The ID number used by the system.
CustomerName – The customer’s name.
CreditCardInfo – The customer’s stored credit card information. This is optional information.
MailingAddress – The customer’s mailing address.
BillingAddress – The customer’s billing address.
PhoneNumber – The customer’s phone number.
CartID – The ID number used by the system.
RestockTitles – A list of products that the customer has requested to be informed when they return to
stock.
E-mail – The customer’s e-mail.
PendingOrderIDs – The ID number used by the system. There can be many of these.
PastOrderIDs – The ID number used by the system. There can be many of these.
FeedbackIDs – The ID number used by the system. There can be many of these.
2.2.3 Feedback
The feedback will be created from the following items.
FeedbackID – The ID number used by the system.
8
CustomerID – The ID number used by the system.
ItemID – The ID of the item the feedback refers to.
Information – The text the customer wishes to associate with the product.
Rating – The rating the customer wishes to associate with the product.
2.2.4 Warehouse Statistics
The warehouse will be referenced by the following database category.
WarehouseID – The ID number used by the system.
PendingOrders – OrderIDs that have yet to be shipped from the warehouse.
StatusReport – The current orders pending for the site and those orders filled by the site.
ContactPhone – The contact phone number for the warehouse.
ContactAddress – The contact address for the warehouse.
2.2.5 Order Information
The order is the key piece of information and must be accessed by multiple areas of the system. It is
made up of the following data.
OrderID – The ID number used by the system.
CustomerID – The ID number used by the system.
OrderDate – The date the order was placed.
ShippingDate – The date the order was shipped.
OrderStatus – The order may be “Pending” or “Shipped.”
Comments – Any comments associated with the order by the customer.
TrackingNumbers – The tracking number of the package once shipped. There may be more than one of
these if multiple warehouses shipped parts of the product.
ItemIDs – The ID number used by the system. Multiple items may exist in one order.
2.2.6 Shopping Cart
The shopping cart is unique for each customer. It will be saved and stored on the database for the user.
It is made up of the following data.
CartID – The ID number used by the system.
9
CustomerID – The ID number used by the system.
ItemIDs – The ID number used by the system. Multiple items may exist in one order.
3.0 Architecture and Program Design
3.1 Program Architecture
The program is structured into two separate components. The database structure is a repository as laid
out in the concept of data-centered design. The actual control software can be controlled through three
individual interfaces. The customer uses an e-commerce web solution to access the functions that drive
their typical actions. The sales manager and warehouse manager(s) use web-based interfaces designed
specifically for the functionality needed by each position. These interfaces interact with the SQL-based
code, which in turn, accesses the database to make queries or modify the data within.
Sales
Administration
Website/Customer Interaction
Database
Warehouse
Administration
3.2 Component Descriptions
3.2.1 Administrative Functions
Only the administrator has access to these functions. These functions allow the administrator to
communicate with the other systems and the database server.
10
3.2.1.1 login
Description
This function allows the Administrator to attempt to login to the system.
Input
Username and Password
Source of Input
Administrator
Output
Administrative GUI and functionality or error message
Destination of Output
To the interface that attempted to log in
Processing
Queries the database comparing the input to any employee entry with administrative access
Requirements
In order to have access to the login function, the user logging in must have access to a computer on the
network. No device that is not directly connected to the network may access this function.
Pre-conditions
None
Post Conditions
Administrative access
Side Effects
User status will be shown as active.
Stability
Stable
Necessity
Mandatory
11
3.2.1.2 logout
Description
This function allows the Administrator to log out of the system.
Input
Logout signal (mouse or keyboard input)
Source of Input
Administrator
Output
None
Destination of Output
N/A
Processing
This function removes current administrative functionality from the device of the user who was logged
in.
Requirements
The user must be logged in.
Pre-conditions
User logged on.
Post Conditions
Administrative access removed.
Side Effects
User status will be shown as inactive
Stability
Stable
Necessity
Mandatory
12
3.2.1.3 importSchoolData
Description
This function allows the Administrator to import data from a file into the system. The data must consist
of the appropriate format for class and section numbers linked to books.
Input
Import signal (mouse or keyboard input)
Class and Book data
Source of Input
Administrator
CSV file (Comma Separated Value file) of the data
Output
Current school data
Destination of Output
Database Server
Processing
This function imports data from a CSV file, processes it, and generates SQL commands to put the
information into the database.
Requirements
The file must be of the appropriate format. The user must have administrative functionality to access
this function (must be logged in).
Pre-conditions
The required books must already be in the system.
Post Conditions
SQL database updated with new information.
Side Effects
N/A
Stability
13
Stable
Necessity
Optional
3.2.1.4 addNewBook
Description
This function allows the Administrator to log enter a new book entry into the database
Input
Relevant book information
Source of Input
Administrator
Output
SQL Command
Destination of Output
Database server
Processing
This function takes the input from the user and generates a SQL command to send to the database.
Requirements
The user must be logged in with administrative functionality.
Pre-conditions
N/A
Post Conditions
New book in the database
Side Effects
Customers will be able to view, inform of, or purchase the new book from the website.
Stability
Stable
14
Necessity
Mandatory
3.2.1.5 searchBooks
Description
This function allows the Administrator to search for books in the system
Input
Search criteria for books
List of books
Source of Input
Administrator
Database
Output
SQL Command
List of Books
Destination of Output
Database
Administrator
Processing
This function converts the search criteria into a SQL query to send to the database. The function then
takes the information received from the database and displays it to the administrator.
Requirements
The user must be logged in with administrative functionality.
Pre-conditions
N/A
Post Conditions
Books that match the search criteria (if they exist) are displayed.
15
Side Effects
N/A
Stability
Stable
Necessity
Mandatory
3.2.1.6 modifyBook
Description
This function allows the Administrator to modify a book’s information.
Input
New book values
Source of Input
Administrator
Output
SQL Command
Destination of Output
Database
Processing
This function converts user input into SQL commands to update the database.
Requirements
The user must be logged in with administrative privileges. Also, a book must be selected from the search
results.
Pre-conditions
N/A
Post Conditions
Updated book information
Side Effects
16
N/A
Stability
Stable
Necessity
Optional
3.2.1.7 removeBook
Description
This function allows the Administrator to remove a book’s entry from the database.
Input
Removal signal (mouse or keyboard input).
Source of Input
Administrator
Output
SQL Command
Destination of Output
Database server
Processing
This function sent the database a SQL command to delete the book entry corresponding to the selected
book.
Requirements
The user must be logged in with administrative privileges, and a book must be selected.
Pre-conditions
Selected book must exist.
Post Conditions
Book is removed from the database.
Side Effects
N/A
17
Stability
Stable
Necessity
Mandatory
3.2.1.8 searchCustomers
Description
This function allows the Administrator to search for customers in the system
Input
Search criteria for customers
List of customers
Source of Input
Administrator
Database
Output
SQL Command
List of Books
Destination of Output
Database
Administrator
Processing
This function converts the search criteria into a SQL query to send to the database. The function then
takes the information received from the database and displays it to the administrator.
Requirements
The user must be logged in with administrative functionality.
Pre-conditions
N/A
18
Post Conditions
Customers that match the search criteria (if they exist) are displayed.
Side Effects
N/A
Stability
Stable
Necessity
Mandatory
3.2.1.9 modifyBook
Description
This function allows the Administrator to modify a customer’s information.
Input
New customer information
Source of Input
Administrator
Output
SQL Command
Destination of Output
Database
Processing
This function converts user input into SQL commands to update the database.
Requirements
The user must be logged in with administrative privileges. Also, a customer must be selected from the
search results.
Pre-conditions
N/A
Post Conditions
19
Updated customer information
Side Effects
N/A
Stability
Stable
Necessity
Optional
3.2.1.10 removeBook
Description
This function allows the Administrator to remove a customer’s entry from the database.
Input
Removal signal (mouse or keyboard input).
Source of Input
Administrator
Output
SQL Command
Destination of Output
Database server
Processing
This function sent the database a SQL command to delete the customer entry corresponding to the
selected customer.
Requirements
The user must be logged in with administrative privileges, and a customer must be selected.
Pre-conditions
Selected customer must exist in the database.
Post Conditions
Customer is removed from the database.
20
Side Effects
N/A
Stability
Stable
Necessity
Mandatory
3.2.1.11 requestSalesSummary
Description
This function allows the Administrator to view a sales report.
Input
Request Sales Summary signal (mouse or keyboard input)
Source of Input
Administrator
Output
Sales information
Destination of Output
Administrator
Processing
This function pulls the sales information from the sales file to be displayed to the administrator
Requirements
The user must be logged in with administrative privileges.
Pre-conditions
Sales file exists
Post Conditions
Sales information displayed
Side Effects
21
N/A
Stability
Stable
Necessity
Optional
3.2.1.12 resetSales
Description
This function allows the Administrator to delete the contents of the sales file.
Input
Reset Sales signal (mouse or keyboard input)
Source of Input
Administrator
Output
None
Destination of Output
N/A
Processing
This function deletes the contents of the sales file
Requirements
The user must be logged in with administrative privileges.
Pre-conditions
N/A
Post Conditions
Empty sales file
Side Effects
N/A
22
Stability
Stable
Necessity
Optional
3.2.1.13 modifyFeedback
Description
This function allows the Administrator to change comments on a book.
Input
New comment string
Source of Input
Administrator
Output
SQL Command
Destination of Output
Database
Processing
This function updates the feedback of a given entry by generating the user input into a SQL command
and sending it to the database.
Requirements
The user must be logged in with administrative privileges. A book and comment must be selected.
Pre-conditions
Comment exists
Post Conditions
Comment is updated
Side Effects
N/A
Stability
23
Stable
Necessity
Optional
3.2.1.14 removeFeedback
Description
This function allows the Administrator to remove comments from books
Input
Removal signal (mouse or keyboard input)
Source of Input
Administrator
Output
SQL Command
Destination of Output
Database
Processing
This function removes the selected comment from the database
Requirements
The user must be logged in with administrative privileges.
Pre-conditions
Comment exists
Post Conditions
Comment is removed
Side Effects
N/A
Stability
Stable
24
Necessity
Optional
3.2.2 Shipping Functions
Only employees with shipping privileges have access to these functions. These functions allow the
employee to communicate with the other systems and the database server.
3.2.2.1 login
Description
This function allows the employee to attempt to login to the system.
Input
Username and Password
Source of Input
Employee
Output
Employee GUI and functionality or error message
Destination of Output
To the interface that attempted to log in
Processing
Queries the database comparing the input to any employee entry with shipping access
Requirements
In order to have access to the login function, the user logging in must have access to a computer on the
network. No device that is not directly connected to the network may access this function.
Pre-conditions
None
Post Conditions
Shipping access
Side Effects
User status will be shown as active. System will activate querySoldBooks.
25
Stability
Stable
Necessity
Mandatory
3.2.2.2 logout
Description
This function allows the employee to log out of the system.
Input
Logout signal (mouse or keyboard input)
Source of Input
Employee
Output
None
Destination of Output
N/A
Processing
This function removes current shipping functionality from the device of the user who was logged in.
Requirements
The user must be logged in.
Pre-conditions
User logged on.
Post Conditions
Shipping functionality removed.
Side Effects
User status will be shown as inactive
Stability
26
Stable
Necessity
Mandatory
3.2.2.3 querySoldBooks
Description
This function automatically displays books that need to be shipped to
Input
Book list
Source of Input
Database
Output
SQL Query
Destination of Output
Database
Processing
This function sends the database a SQL Query requesting a list of all books that have completed
processing and need to be shipped that match the location of the employee.
Requirements
The user must be logged in with shipping privileges.
Pre-conditions
N/A
Post Conditions
List of sold, unshipped books received.
Side Effects
N/A
Stability
Stable
27
Necessity
Mandatory
3.2.2.4 shipBook
Description
This function allows the employee to acknowledge that a book has been shipped.
Input
Shipped signal (mouse or keyboard input)
Tracking Number
Source of Input
Employee
Output
SQL Command
E-Mail
Destination of Output
Database
Customer
Processing
This function generates a SQL command that tells the database that a book has been shipped. It also
generates an E-Mail that tells the customer that the book has been shipped, as well as giving him
tracking information.
Requirements
The user must be logged in with shipping privileges. A book must be selected.
Pre-conditions
Book is marked as processed but not shipped.
Post Conditions
Book is marked as ‘Shipped’, customer is sent E-Mail.
Side Effects
28
N/A
Stability
Stable
Necessity
Mandatory
3.2.2.5 queryIncomingBooks
Description
This function displays a list of books that will be arriving to the facility.
Input
Book list
Source of Input
Database
Output
SQL Query
Destination of Output
Database
Processing
This function sends the database a SQL Query requesting a list of all books that are in transit to the
facility that matches the location of the employee.
Requirements
The user must be logged in with shipping privileges.
Pre-conditions
N/A
Post Conditions
List of incoming books received.
Side Effects
N/A
29
Stability
Stable
Necessity
Mandatory
3.2.2.6 receivedBooks
Description
This function allows the employee to acknowledge that books have been received.
Input
Shipped signal (mouse or keyboard input)
Quantity
Source of Input
Employee
Output
SQL Command
E-Mail
Destination of Output
Database
Customers
Processing
This function generates a SQL command that tells the database that books have arrived. The quantity is
then subtracted from ‘Ordered’ and added to ‘In Stock’. The system then generates E-Mail for each
individual customer who has chosen to monitor the given book. If the quantity input is greater than the
value in ‘Ordered’, an error occurs.
Requirements
The user must be logged in with shipping privileges. A book must be selected.
Pre-conditions
Book has a positive ‘Ordered’ value matching the location of the employee
30
Post Conditions
Book has a lower ‘Ordered’ value and higher ‘In Stock’ value
Side Effects
N/A
Stability
Stable
Necessity
Mandatory
3.2.3 System Functions
These functions are used by the system handle different aspects of transactions and processes. They are
accessed by the system automatically when certain events or triggers occur.
3.2.3.1 creditcheck
Description
This function communicates with an external service to verify credit card information.
Input
Credit card type, credit card number, credit card expiration date, CVV2 code, customer name,
Source of Input
System
Output
Verified or not verified message to be processed by system
Destination of Output
To another system function
Processing
The function takes the input and converts it to a request to an external interface. Then processes the
response provided by that interface.
Requirements
The connection to the external interface must be available and the external system must be functioning.
31
Pre-conditions
None
Post Conditions
Verification or non-verification of credit card information
Side Effects
Request will not be validated.
Stability
Stable
Necessity
Mandatory
3.2.3.2 verifysale
Description
This function accepts input in the form of payment verification.
Input
Verification message for payment information
Source of Input
Internal function
Output
Order processing information
Destination of Output
Database
Processing
The function will receive a message from a separate internal function that processes payment
information. This input message will be checked and the order status will be changed based on the
presence of a verification of the payment information.
Requirements
This function has no internal/external requirements.
32
Pre-conditions
None
Post Conditions
Order information is sent to database.
Side Effects
Order will not be confirmed or entered into the database.
Stability
Stable
Necessity
Mandatory
3.2.4 Customer Functions
These functions are accessed from the website. Anyone who views the website will have access to these
functions.
3.2.4.1 login
Description
This function allows the customer to attempt to login to his User Account on the website.
Input
Username and Password
Source of Input
Customer
Output
User Account functionality
Destination of Output
To the user
Processing
Queries the database comparing the input to any customer entry with an account. The user is then given
an error message, or login functionality. If the user does log in, the system checks to see if there is a cart
saved to that account, and automatically attempts to load the cart if so.
33
Requirements
None
Pre-conditions
User not already logged in.
Post Conditions
User functionality
Side Effects
None
Stability
Stable
Necessity
Mandatory
3.2.4.2 logout
Description
This function allows the customer to log out of the website
Input
Logout signal (mouse or keyboard input)
Source of Input
Customer
Output
None
Destination of Output
N/A
Processing
This function removes current user functionality from the device of the user who was logged in.
Requirements
34
The user must be logged in.
Pre-conditions
User logged on.
Post Conditions
User functionality removed.
Side Effects
None.
Stability
Stable
Necessity
Mandatory
3.2.4.3 Register
Description
This function allows the customer to attempt to register a new user account on the website.
Input
All relevant registration information (Name, Address, E-Mail, ect.)
Source of Input
Customer
Output
SQL Query
SQL Command
Destination of Output
Database
Processing
This function takes the data input by the user and generates a SQL Query to determine if the user has
already tried to register. If it determines that he hasn’t, the system generates a SQL command to put the
new user into the system, and the website automatically logs the user in.
35
Requirements
All information must be in the appropriate format. The E-Mail provided must not already be in the
system.
Pre-conditions
User not already logged in.
Post Conditions
User logged in with new information in the database.
Side Effects
None.
Stability
Stable
Necessity
Mandatory
3.2.4.4 search
Description
This function allows the user to search for books in the system
Input
Search criteria for books
List of books
Source of Input
Customer
Database
Output
SQL Command
List of Books
Destination of Output
Database
36
Customer
Processing
This function converts the search criteria into a SQL query to send to the database. The function then
takes the information received from the database and displays it to the customer. This information is
displayed in a special format allowing the customer to see all relevant information and have access to
more specific book functions, not in a list like other search results.
Requirements
None.
Pre-conditions
None
Post Conditions
Books that match the search criteria (if they exist) are displayed.
Side Effects
N/A
Stability
Stable
Necessity
Mandatory
3.2.4.5 checkOut
Description
This function allows the customer to attempt to purchase all books in cart.
Input
Credit Information
List of Books
Source of Input
Customer
Output
37
SQL Commands
Credit Check
Destination of Output
Database
Banking System
Processing
This function first creates a SQL Query to check to see if the quantity requested is less than or equal to
the number of that particular book in stock. This function then creates the appropriate SQL command to
‘reserve’ the selected books while setting up a joint process to react to any flag sent back from the
banking system. This flag will activate the processing function when necessary.
Requirements
The user must be logged in with user account privileges. Also, the user must have at least one book in
their cart.
Pre-conditions
Selected books will be marked as ‘In Stock’
Post Conditions
Selected books will be marked as ‘Processing’, and the processing process will begin.
Side Effects
The selected books may be removed from the active list if their quantity drops to zero.
Stability
Stable
Necessity
Mandatory
3.2.4.6 browse
Description
This function allows the user to view a list of randomly selected books from the database.
Input
None.
38
Source of Input
N/A
Output
List of books in customer format (increased functionality)
Destination of Output
Customer
Processing
This function is accessed when a customer attempts to view the main page of the site. A random list of
books will immediately display without any further user input.
Requirements
None.
Pre-conditions
None.
Post Conditions
Books displayed
Side Effects
None.
Stability
Stable
Necessity
Optional
3.2.4.7 emptyCart
Description
This function allows the user to remove all books from his/her cart.
Input
Empty command (mouse or keyboard input)
Source of Input
39
Customer
Output
None
Destination of Output
None
Processing
This function removes all of the current books from the customer’s cart.
Requirements
None.
Pre-conditions
N/A
Post Conditions
Customer has an empty cart.
Side Effects
N/A
Stability
Stable
Necessity
Optional
3.2.4.8 addItem
Description
This function allows the user to add a selected book to their cart
Input
Add item command (mouse or keyboard input)
Source of Input
Customer
40
Output
None.
Destination of Output
N/A
Processing
This function stores the item ID of the selected book into the user’s cookies so that the item is displayed
in his cart.
Requirements
None.
Pre-conditions
N/A
Post Conditions
New item in cart
Side Effects
N/A
Stability
Stable
Necessity
Mandatory
3.2.4.9 removeItem
Description
This function allows the user to remove an item from their cart.
Input
Removal signal (mouse or keyboard input).
Source of Input
Customer
Output
41
None
Destination of Output
N/A
Processing
This function removes the selected Item ID from the customer’s cookies
Requirements
The user must have an item in their cart to remove.
Pre-conditions
Item is listed in the customer’s cart
Post Conditions
Item is removed from the customer’s cart
Side Effects
N/A
Stability
Stable
Necessity
Optional
3.2.4.10 modifyQuantity
Description
This function allows the customer to modify the number of requested books in their cart.
Input
Integer value
Source of Input
Customer
Output
None
42
Destination of Output
N/A
Processing
The user enters the number of any particular book that he wishes to buy, and the website updates the
price.
Requirements
The user must have the book in their cart
Pre-conditions
Old quantity value in cart
Post Conditions
New quantity value in cart
Side Effects
none
Stability
Stable
Necessity
Optional
3.2.4.11 saveCart
Description
This function allows the user to save their currently selected items to their username.
Input
Save Cart signal (mouse or keyboard input)
Source of Input
Customer
Output
SQL Command
Destination of Output
43
Database
Processing
This function saves all currently selected items to the database, and links the object to the user’
Requirements
The user must be logged in with user account privileges.
Pre-conditions
N/A
Post Conditions
Saved cart
Side Effects
N/A
Stability
Stable
Necessity
Optional
3.2.4.12 feedback
Description
This function allows the user to comment on a book
Input
New comment string
Source of Input
Customer
Output
SQL Command
Destination of Output
Database
44
Processing
This function adds the feedback of a given entry by generating the user input into a SQL command and
sending it to the database.
Requirements
The user must be logged in with user account privileges. A book and comment must be selected.
Pre-conditions
User logged in
Post Conditions
Comment is created
Side Effects
N/A
Stability
Stable
Necessity
Optional
3.2.4.13 detailedBook
Description
This function allows the user to view a more detailed version of the book’s entry
Input
Select Book signal (mouse or keyboard input)
Source of Input
Customer
Output
SQL Query
Destination of Output
Database
Processing
45
When a customer selects a book from the Browse/Search results, they get to view a more detailed
analysis of the book with information such as feedback, and other options.
Requirements
None.
Pre-conditions
None.
Post Conditions
Detailed information displayed.
Side Effects
N/A
Stability
Stable
Necessity
Optional
3.2.4.14 informOfBook
Description
This function allows the customer to select to be informed of a book’s availability
Input
Inform signal (mouse or keyboard input)
Source of Input
Customer
Output
SQL Command
Destination of Output
Database
Processing
46
This function generates a SQL command using the logged in user’s E-Mail to add the E-Mail to the list of
people to inform when a books quantity is increased.
Requirements
The book must be out of stock
The user must be logged in
Pre-conditions
User logged in
Post Conditions
User added to list of informed customers of selected book’s availability
Side Effects
None
Stability
Stable
Necessity
Optional
3.3 Interface Descriptions
All interfaces for the system will be web-based applications. They will allow the user to interact with the
system in a way that is most appropriate for the common goals their position presents for them. This
will allow the customers to expand and update easily, without relying on client-side patches.
3.3.1 Internal Interfaces
The sales manager must interface a set series of functions presented by the system. These are to be
exclusive to the sales manager and must be hidden from the public for safety and security reasons.
Different activities will be separated by tabs. Each tab will have specific tasks that the administrator can
perform such as running a query on the database to look up items or customers, or adding new items or
employees.
47
3.3.2 Customer Interfaces
The customer will access the web-based front of the system. From there, they will be able to browse,
search, select, and purchase merchandise from the company.
48
3.3.3 Warehouse Interfaces
The warehouse manager must have the ability to view the stock that is supposed to exist within their
warehouse. They must be able to report missing or damaged stock. They must also receive information
on orders from the system so that they can fill and ship these items.
49
3.3.4 Website Connectivity Layout
The website will be designed by the following metric. This will allow the user to always return to the
homepage and from there, to access any relevant part of the website. Please note that on any path that
there is a “Login/Logout Option,” the user will be required to login to their account to access the full
functionality of the page. In the case of feedback, purchasing, and account modification this will be a
requirement.
50
Account Creation Page
Account Management Page
Login/Logout Option
Company Contact Page
Homepage
Search Page
Login/Logout Option
Detailed Product Page
Shopping Cart Page
Login/Logout Option
Login/Logout Option
Feedback Add Page
Purchase Page
4.0 Restrictions and Constraints
4.1 Anticipated Areas of Concern
A great deal of data is processed by the system. This will require advanced hardware to handle to
amount of data transfer and regular interfaces from the internet. The stock will regularly change as
individual universities make changes to their course curriculum. There is also a security concern which
must be addressed. The database and web-server must be carefully managed to prevent outside
individuals from accessing the data without permission.
The interaction between the three system users and the order item in the database may lead to
misrepresentation of data or unintended modifications of information. There is also some concern over
the automatic production of web-based views of products as this will be done through interactions
between the web-based application side and the database itself.
51
5.0 Testing and Validation
5.1 Test Types and Expected Responses
The system must be tested from each of three areas.
The customer functions must be tested through the web-based interface. Through a series of mock
sales and searches, we can test their capabilities.
The warehouse manager’s functions are tested through a sample order completed during the customer
testing phase. The warehouse must update its inventory, print a shipping label, and update the order
status. They must also submit a mock report of lost or damaged stock to the sales manager.
The sales manager’s functions must be tested through the addition, removal, and modification of items
associated with the system. After the customer testing, it is to be assumed that data will be present on
the mock sales and updates that can be viewed by the sales manager.
5.2 Breakdown of Individual Tests
5.2.1 Search Items
To test the search capabilities of the website, each possible criterion will be searched for using a sample
item in the system.
5.2.2 Browse Website
Testing the website will require a simple browsing of the pages of the website. It is import to make sure
an item can be located through browsing as well as searching.
5.2.3 Create Account
A sample account will be created for a fictional customer.
5.2.4 Modify Account
Information of the sample account will be changed and checked to make sure it updates.
5.2.5 Add Item to Cart
A sample item will be added to the cart of the sample account.
5.2.6 Remove Item from Cart
The same item will be removed from the cart and re-added, testing this capability.
5.2.7 Change Quantity in Cart
The sample item in the cart will have the quantity changed to a number greater than that in stock, to a
high number of those in stock, and back to an individual item. Changing the quantity to 0 should call the
remove item commands.
52
5.2.8 Order Product
The product in the cart will be ordered using the sample account. This will allow us to test the ordering
system and also have test data for other areas of the system such as the warehouse and confirmation emails.
5.2.9 Check for Confirmation
The e-mail address used for the sample account will be checked for a confirmation e-mail.
5.2.10 Check Order
The order status will be checked on the website by the customer account and the sales manager
account.
5.2.11 Update Tracking Information
The warehouse manager will check the order. They will then provide a sample tracking number to the
system.
5.2.12 Check Tracking Information
The tracking number will be checked by the customer account and the warehouse manager account.
5.2.13 Add Feedback
The customer account will be used to add feedback on the sample product.
5.2.14 Modify Feedback
The feedback will be modified by the customer account. It will then be modified by the sales manager
account.
5.2.15 Delete Feedback
The sales manager will delete the feedback left by the customer.
5.2.16 Delete Account
The sales manager will delete the sample customer account.
5.2.17 Add an Item
The sales manager will add a sample item to the system.
5.2.18 Modify an Item
The sales manager will modify the sample item. Each field will be updated and checked for correctness.
5.2.19 Delete an Item
The sales manager will delete the sample item.
53
6.0 Appendixes and Additional Content
6.1 Traceability Matrix
Because of the formatting we have chosen for our requirements, I will specify the series of concerns we
have for the program and in what tests they will be addressed.
6.1.1 A: Customer Account Concerns
We need to test certain features of the customer account. We must be sure that an account can be
created by the customer and that it is properly saved into the database. We must then attempt logging
in and out of the account to make sure the system properly reads it. We must test the ability of the user
to change information in their account. We must also test the administrative ability to remove an
account.
6.1.2 B: Order Concerns
We must test the entire shopping cart system. We must add and remove items, change quantities, and
test to see that the shopping cart is saved for an account. Items must be attributed to the proper
warehouse and inform the correct shipping center that they have been ordered. We must also test the
automated sales system that is built into the webpage. This will include testing the ability of the
customer account to save purchase information and shipping addresses.
6.1.3 C: Administrative Concerns
The administrator must have control over the system. We must be assured that items can be created,
modified, and deleted from the system. We must test to see that quantities can be checked by the
administrator. Feedback must be able to be modified or deleted.
6.1.4 D: Warehouse Concerns
The warehouse must be informed when an order is made. They must be able to update that order’s
status to shipped and add a tracking number to the order. It is important that the warehouse also be
able to view what they are said to have in stock and inform the sales manager of any changes in stock
quantities.
6.1.5 Traceability Matrix Graph
A:
Account
B:
5.2.1
X
5.2.2
X
5.2.3
X
5.2.4
X
Order
54
C: Administrative
D:
Warehouse
5.2.5
X
5.2.6
X
5.2.7
X
5.2.8
X
5.2.9
X
5.2.10
X
X
5.2.11
X
X
X
5.2.12
X
X
X
5.2.13
X
5.2.14
X
X
5.2.15
X
X
5.2.16
X
X
5.2.17
X
5.2.18
X
5.2.19
X
6.2 Packaging/Installation Plan
The program will be installed on a central mainframe server. It will need to be protected by a firewall.
Any updates that are to be made to the system will simply require a reinstallation on this central server.
The newer files will copy over older ones and the database will remain largely unaffected. This will allow
for efficient updates that do not affect the data in the system.
55
6.3 State Transition Diagrams
6.3.1 Customer Diagram
View
Website
Browse
Login
Search
Load Cart
Inform of
Book
Provide
Feedback
Save Cart
Add to Cart
Logout
Remove
From Cart
56
Checkout
Change
Quantity
Register
6.3.2 Sales Manager Diagram
System Idle
Login
Sales
Manager
Administrative
Functions
Import Data
Add Book
Sales
Functions
Search Book
Modify Book
Remove Book
Logout
57
Modify
Feedback
Remove
Feedback
Reset
Sales
Request
Sales
6.3.3 Warehouse Manager Diagram
System Idle
Login
Warehouse
Administrative
Functions
Shipping
Functions
Logout
Query
Purchased
Books
Inventory
Functions
Acknowledge
Shipped
Book
58
Query
Incoming
Acknowledge
Receipt
of Books
Download