DDS_Pegasus_1.1

Document Sample
DDS_Pegasus_1.1 Powered By Docstoc
					Senior Design Documentation Library                        University Of Texas At Arlington




                  Maverick Vending Solutions, INC




                    Detailed Design Specifications

                     Maverick Vending Machine




                                  Team Pegasus
                                    Essa Haddad
                                    Jay Rektorik
                                     Lisa Xiong
                                   Luis Hernandez
                                   Michael Jacobsen




      Late Updated: 18 April 2011 @ 11:07:00 AM




                               Architecture Design Specification
Senior Design Documentation Library                                                             University Of Texas At Arlington




                                                    Table of Contents
1     Introduction ........................................................................................................................1
      1.1        Purpose................................................................................................................................ 1
      1.1        Project Scope ...................................................................................................................... 1
      1.2        Definitions, Acronyms and Abbreviations.......................................................................... 2
2     Architecture Overview ......................................................................................................4
      2.1        High Level Architectural Layer .......................................................................................... 4
      2.2        Inter-Subsystem Dataflow .................................................................................................. 6
      2.3        Dataflow Definitions........................................................................................................... 6
3     Component Design .............................................................................................................8
      3.1        Decomposition Diagram ..................................................................................................... 8
      3.2        Overview: Detailed Design Components............................................................................ 9
      3.3        Detailed Design Considerations ........................................................................................ 11
      3.4        Subsystem Modules: Customer Page Layouts and Mappings .......................................... 11
      3.5        Subsystem Modules: Beacon Control ............................................................................... 21
      3.6        Subsystem Modules: MVM Management ........................................................................ 22
      3.7        Subsystem Modules: IP Stack Services ............................................................................ 32
      3.8        Subsystem Modules: Touchscreen Interaction Services ................................................... 34
      3.9        Subsystem Modules: Peripheral Interfaces ....................................................................... 35
      3.10       Subsystem Modules: Hardware Management and Control............................................... 40
      3.11       Subsystem Modules: Credit Accounts Control ................................................................. 48
      3.12       Subsystem Modules: MyMav Accounts Control .............................................................. 51
      3.13       Subsystem Modules: Database Services ........................................................................... 53
      3.14       Subsystem Modules: Webpage Layout and Mappings ..................................................... 56
      3.15       Subsystem Modules: Admin Web Controls ...................................................................... 67
4     Quality Assurance ............................................................................................................83
      4.1        Test Plans and Procedures ................................................................................................ 83
      4.2        Hardware Layer ................................................................................................................ 83
      4.3        Processing Layer ............................................................................................................... 84
      4.4        Web Administration Layer ............................................................................................... 85
      4.5        Payment Layer .................................................................................................................. 86
      4.6        External Local Services Layer .......................................................................................... 87
      4.7        External Server Services Layer ......................................................................................... 87
      4.8        Test Cases ......................................................................................................................... 87
5     Requirements Traceability ............................................................................................106
      5.1        Purpose............................................................................................................................ 106
      5.2        Requirements Traceability Matrix .................................................................................. 106
6     Acceptance Plan .............................................................................................................113
      6.1        General ............................................................................................................................ 113
      6.2        Packaging and Installation .............................................................................................. 113
      18 April 2011 @ 11:07:00 AM                                       i                                                   Table of Contents
Senior Design Documentation Library                                                            University Of Texas At Arlington
          6.3        Acceptance Testing ......................................................................................................... 113
          6.4        Acceptance Criteria......................................................................................................... 113
7         Appendices ......................................................................................................................116




                                                        Table of Figures
Figure 1. Context Diagram ............................................................................................................. 1
Figure 2. High Level Architectural Layer Diagram........................................................................ 4
Figure 3. Architectural Subsystem Dataflow Diagram ................................................................... 6
Figure 4 Modules Decomposition Diagram .................................................................................... 8




                                                            List of Tables
Table 1. Inter-Subsystem Data Element Descriptions .................................................................... 7
Table 2. Overview Detailed Design Components......................................................................... 11
Table 3. Requirements Traceability - Hardware Layer .............................................................. 108
Table 4. Requirements Traceability - Processing Layer ............................................................. 108
Table 5. Requirements Traceability - Web Administration Layer ............................................. 110
Table 6. Requirements Traceability - Payment Layer ................................................................ 110
Table 7. Requirements Traceability - External Services ............................................................ 112




          18 April 2011 @ 11:07:00 AM                                   ii
Senior Design Documentation Library                                           University Of Texas At Arlington




                                      1 Introduction
1.1 Purpose
      The purpose of detailed design is to clearly describe the final physical architectures, design
      specifications, and technical requirements of how the Maverick Vending Machine and administrative
      web application will be constructed and complete. Detailed design builds upon the architectural level
      descriptions within the Architectural Design Specification document. This Detailed Design Specification
      deliverable therefore fully defines and describes individual components of the product, and explains how
      Team Pegasus will implement and test these components.

1.1 Project Scope




                                               Figure 1. Context Diagram


18 April 2011 @ 11:07:00 AM                1                   Introduction
Senior Design Documentation Library                                        University Of Texas At Arlington
      This project will develop and deliver a vending machine, Maverick Vending Machine [MVM], which
      will have a touch screen interface to interact with customers. MVM will have a card swipe reader that
      accepts credit cards and students’ Mav Express cards. If MyMav Express Card is selected, the student’s
      “MyMav” account will be charged for the amount of purchased goods.
      MVM will have two product dispensing slots to store products. The motors are controlled by a computer
      that also provides the interface for the touch screen. MVM is limited to two dispensers to meet space
      requirements and to reduce mechanical complications.
      A central administrative web application will provide capabilities such as categorizing inventory,
      monitoring product sales, and managing administrative resources. A database will keep track of the
      products, personnel who are authorized to service and replenish the physical vending machines, and
      individual vending machines. MVM administrative application will keep track of the inventory but will
      not provide data mining capabilities. The server and Maverick Vending Machine will communicate
      through the internet. The Maverick Vending Machine will connect to the internet through a wireless
      network.
      As a future enhancement, customers will be able to create their own accounts on a mobile application or
      on a webpage. Customers can remotely purchase products from the vending machine and control when
      the products are to be dispensed.

1.2 Definitions, Acronyms and Abbreviations
         ADS: Architectural Design Specifications.
         Admins: The people responsible for monitoring the statuses of vending machines, and managing
          Field Agents as well.
         Administrative Resources: Products, Field Agents, and vending machines.
         Beacon Messages: A request message for a network host.
         DDS: Detailed Design Specifications
         D/A: Digital-to-Analog converter. A device that converts digital code into analog signals.
         Field Agents: The people responsible for refilling the vending machines and updating the statuses of
          the vending machine after servicing them.
         IP: Internet Protocol
         MVS: Maverick Vending Solutions.
         MVM: Maverick Vending Machine.
         MyMav: Student university account for UTA.
         SRD: Software Requirements Document.
         Super Admin: An administrative account that has the extra capabilities of adding/removing Admins
          and Field Agents when they are hired. They are also responsible for adding/removing vending
          machine and assigning vending machines to Admins.
         SVN: Subversion. A revision control mechanism.
         TCP: Transmission Control Protocol
         UTA: University of Texas at Arlington

18 April 2011 @ 11:07:00 AM                 2                 Introduction
Senior Design Documentation Library                      University Of Texas At Arlington
       VM: Vending Machine




18 April 2011 @ 11:07:00 AM           3   Introduction
Senior Design Documentation Library                                        University Of Texas At Arlington




                         2 Architecture Overview
2.1 High Level Architectural Layer
      The Maverick Vending Machine architecture contains four layers and two external layers (as seen in
      Figure 2 below):

      1. Hardware Layer
      2. Processing Layer
      3. Web Administration Layer
      4. Payment Layer
      External:
      1. External Local Services Layer
      2. External Server Services Layer




                                 Figure 2. High Level Architectural Layer Diagram




18 April 2011 @ 11:07:00 AM               4                 Architecture Overview
 Senior Design Documentation Library                                          University Of Texas At Arlington
2.1.1 Hardware Layer
      The hardware layer hosts an array of interfaces that are responsible for interacting with external
      hardware components such as the dispensing motors, sensors, and card readers. The hardware layer
      ensures that the raw analog data retrieved from the external devices are translated into meaningful
      variables and commands to the Processing Layer.

2.1.2 Processing Layer
      The Processing Layer controls the main operation of the physical vending machine. It communicates
      with the server to send product purchase updates, sends and receives payment authorization, and tests if
      there is a connection with the server. It controls what shall be displayed, processes user input, and
      coordinates the dispensing of products.

2.1.3 Web Administration Layer
      The Administration Layer allows the user to access the MVM Database. The functionality will be
      supported via the MVM official website hosted at a secure location accessible using the internet over the
      http protocol. This layer allows the user, either an admin or a field agent, access to the MVM database.
      From here, users can update product inventory, add/remove vending machines, and assign field agents
      or admins to specific vending machines.

2.1.4 Payment Layer
      The payment layer is responsible for handling the data necessary to purchase products. It processes
      credit cards as well as MyMav student cards. It receives information from the vending machine and
      connects to the respective database of the card to retrieve information about the card. It also updates the
      Credit Database and MyMav Database.

2.1.5 External Local Services Layer
      The External Local Services Layer consists of services the MVM depends on. This layer will not be
      developed by Team Pegasus as it using already developed services. It is assumed the services run on a
      computer that has an operating system containing these services or is capable of installing and running
      these services. Specific to this layer, it contains services necessary to operate a touchscreen device as
      stated in the SRD, and network IP services to transfer data to and from the server.

2.1.6 External Server Services Layer
      The External Server Services layer contains the services that pertain to the accessing the web server and
      databases over the web. These services will not be developed by Team Pegasus, rather used to
      accomplish the goals set forth in the System Requirements Document. There are two subsystems in the
      Server Services layer.

2.1.7 External Devices and Hardware
      The External Devices and Hardware are devices and hardware that will not be developed by Team
      Pegasus but will be used to create the final product.




18 April 2011 @ 11:07:00 AM                 5                   Architecture Overview
Senior Design Documentation Library                                                    University Of Texas At Arlington
2.2 Inter-Subsystem Dataflow
     The Inter-Subsystem Dataflow defines the dataflow between the layers and between the subsystems (as
     seen in Figure 3 below). The description of the dataflow is in section 2.3.




                                  Figure 3. Architectural Subsystem Dataflow Diagram

2.3 Dataflow Definitions
       Data       Description of Data Element
      Element

                  Bits of data containing card number and card type stored in a magnetic card are collected and passed to the
        H1        Peripheral interface.

        H2        A voltage necessary to operate the dispensing arm is generated by the peripheral Interface.
        H3        An analog signal that hold the reading of the sensor
        H4        A stream of bytes holding the bits of data retrieved by the peripheral interface from the magnetic card
        H5        A number that represents the port number connecting to the selected motor
        H6        A number that represents the reading of the sensor.
                  From MVM Management subsystem to Hardware Management and Control. A numeric value indicating
        P1
                  what slot location to activate for dispensing.
                  From Hardware Management and Control to MVM Management. A response value to indicate if sensor
        P2
                  detected the product was dispensed or was not dispensed.
                  From Hardware Management and Control to MVM Management. Data structure containing the payment card
        P3
                  number and type.

18 April 2011 @ 11:07:00 AM                     6                        Architecture Overview
Senior Design Documentation Library                                                     University Of Texas At Arlington
                 From MVM Management to Customer Page Layouts and Mapping. A data structure containing a message of
                 indicating what screen to generate, and data associated for that screen if applicable. If message to display
                 products, it will contain the product prices and product image. If message to display authorization page, it will
        P4       contain the authorization number. If message there is failure, then no additional data required.
                 From Customer Page Layouts and Mapping to MVM Management. An event describing what button was
                 pushed on the touch screen.
                 From Beacon Control to Customer Page Layouts and Mapping. A message indicating whether or not to
        P5
                 display the out of order page.
                 From Touch Screen Interaction Services to Customer Page Layouts and Mappings. A (x, y) coordinate of
                 where the user touched the screen.
        P6
                 From Customer Page Layouts and Mappings to Touch Screen Interaction Services. A data bit stream
                 containing bitmap images to display.
                 From MVM Management to IP Stack Services. A data structure containing packaged application data which
                 could be a database command or payment card purchase request, and a destination.
        P7
                 From IP Stack Services to MVM Management. A data structure containing data from the server. A
                 authorization approval response and invoice number, and/or product information
                 From Beacon Control to IP Stack Services. A message requesting a response from a destination.
        P8
                 From IP Stack Services to Beacon Control. A message containing a response from the request message.
                 From Touch Screen Interaction Services to Touch Screen device. A data bit stream of a bitmap to display.
        L1
                 From Touch Screen device to Touch Screen Interaction Services. A touch event.
        L2       From IP Stack Services to IP Stack Services. IP data packets packaged by these external services.
                 From user to Webpage Layouts and Mappings. Interaction between the Admin/Field Agent and the
        A1
                 Administrative Web Interface running in a browser
                 Server sends http data over the network to the Administrative Web Interface, the GUI displayed in the user’s
                 browser
        A2       Any requests by the remote user (admin or field agent) such as inventory updates, creating new vending
                 machines, and creating new products are transmitted from the Administrative Web Interface to the server
                 through a http connection
                 Web form data, session state, business logic in the form of http request or response sent IP Stack Services for
        A3
                 processing over the internet or on a local area network.
                 From IP Stack Services to Credit Accounts Control. Credit card information.
        C1
                 From Credit Accounts Control to IP Stack Services. Approval message and invoice number.
                 From IP Stack Services to MyMav Accounts Control. Credit card information.
        C2
                 From MyMav Accounts Control to IP Stack Services. Approval message and invoice number.
                 From MyMav Accounts Control to Database Services. Database query with MyMav card information.
        C3
                 From Database Services to MyMav Accounts Control. Database query result.
                 From Credit Accounts Control to Database Services. Database query with credit card information.
        C4
                 From Database Services to MyMav Accounts Control. Database query result.
        S1       Database query
        S2       Database queries will be sent to MVM Database to update, modify, create, view, etc. Returns query results.
        S3       Database query will request verification that a student’s card number is on file. Returns query results.
        S4       Database query will request verification that a credit card number is on file. Returns query results.
                                  Table 1. Inter-Subsystem Data Element Descriptions

18 April 2011 @ 11:07:00 AM                    7                      Architecture Overview
Senior Design Documentation Library                                  University Of Texas At Arlington




                           3 Component Design
3.1 Decomposition Diagram




                                  Figure 4 Modules Decomposition Diagram

18 April 2011 @ 11:07:00 AM            8                Component Design
Senior Design Documentation Library                                          University Of Texas At Arlington
3.2 Overview: Detailed Design Components
     Name              Description                              Layer              Subsystem
     Layout            Coordinates the switching of             Processing         Customer Page Layouts
     Manager           different screen layouts.                                   and Mappings
     Item Selection    Creates item selection page and          Processing         Customer Page Layouts
     Page              button mappings.                                            and Mappings
     Card Selection    Creates card selection page and          Processing         Customer Page Layouts
     Page              button mappings.                                            and Mappings
     Swipe Page        Creates swipe card page.                 Processing         Customer Page Layouts
                                                                                   and Mappings
     Invoice Page      Creates invoice page with invoice        Processing         Customer Page Layouts
                       number.                                                     and Mappings
     Out of Order      Creates out of order page.               Processing         Customer Page Layouts
     Page                                                                          and Mappings
     Event Handler     When a button is pressed, it sends       Processing         Customer Page Layouts
                       the event to MVM Management for                             and Mappings
                       processing.
     Beacon Control    Tests for network connection with        Processing         Beacon Control
                       the server.
     Payment           Coordinates the payment activities       Processing         MVM Management
     Manager           of a transaction.
     Product           Retrieves updated product list to sell Processing           MVM Management
     Manager           from MVM database.
     Dispenser         Initiates the hardware layer to          Processing         MVM Management
     Manager           dispense and updates MVM
                       database of which product was
                       dispensed.
     Configuration     Configures the server IP address,        Processing         MVM Management
     Manager           database names, and payment
                       servers.
     Event Manager     Receives event and collects              Processing         MVM Management
                       information from that event.
     Beacon IP         External services that create and use    Local External     IP Stack Services
     Services          an IP network connection.                Services
     MVM               External services that create and use    Local External     IP Stack Services
     Connection IP     an IP network connection.                Services
     Services
     Touchscreen       Provides interaction capabilities        Local External     Touchscreen Interaction
     Interaction       with touchscreen device and              Services           Services
     Services          software application.

18 April 2011 @ 11:07:00 AM               9                    Component Design
Senior Design Documentation Library                                     University Of Texas At Arlington
     Proximity        Provides a communication method        Hardware          Peripheral Interfaces
     Sensor Interface between the Proximity sensor and
                      the arduino board
     DC Motor          Provides a mechanism for the DC       Hardware          Peripheral Interfaces
     Interface         motor to be powered by the Arduino
                       board
     Arduino Serial    Allows the MVM application to      Hardware             Hardware Management and
     Interface         communicate with the arduino board                      control
     Card Serial       Allows card reader to communicate     Hardware          Hardware Management and
     Interface         with the MVM application                                Control
     Credit Card       Processes credit card transactions    Payment           Credit Accounts Control
     Processing        for a product being purchased.
     MyMav Card        Processes MyMav card transactions     Payment           MyMav Accounts Control
     Processing        for a product being purchased.
     SQL Server        Provides database access, queries,    External Server   Database Services
     Services          updates, etc.                         Services
     Site Template     Base layout for all web pages.        Web               Webpage Layout and
                                                             Administration    Mappings
                                                             Layer
     CSS Style         Controls look and feel of web         Web               Webpage Layout and
                       application.                          Administration    Mappings
                                                             Layer
     About             Static page providing information     Web               Webpage Layout and
                       about the team and project.           Administration    Mappings
                                                             Layer
     Contact           Static page with contact              Web               Webpage Layout and
                       information.                          Administration    Mappings
                                                             Layer
     Default           User starts on this page and can      Web               Webpage Layout and
                       navigate from here.                   Administration    Mappings
                                                             Layer
     Login             Allows user to log in to web          Web               Admin Web Controls
                       application.                          Administration
                                                             Layer
     Change            Allows user to change their           Web               Admin Web Controls
     Password          password.                             Administration
                                                             Layer
     Profile           Allows user to view their profile.    Web               Admin Web Controls
                                                             Administration
                                                             Layer
     Create New        Allows an admin to create a new       Web               Admin Web Controls

18 April 2011 @ 11:07:00 AM              10                 Component Design
Senior Design Documentation Library                                          University Of Texas At Arlington
     Wizard           admin or field agent in the system.        Administration
                                                                 Layer
     Manage Users        Allows an admin to manage existing Web                     Admin Web Controls
                         users.                             Administration
                                                            Layer
     VM Details          Displays information about all          Web                Admin Web Controls
                         vending machines in the system.         Administration
                                                                 Layer
     Manage VM           Allows admin or field agent to          Web                Admin Web Controls
     Products            manage products in a specific           Administration
                         vending machine.                        Layer
     Products            Allows admin to manage all              Web                Admin Web Controls
                         products in they system.                Administration
                                                                 Layer
                                   Table 2. Overview Detailed Design Components

3.3 Detailed Design Considerations
3.3.1 Programming Language Considerations
      Before developing this Detailed Design document, the programming languages used to develop the
      project were decided. The Processing Layer will be developed by the Java programming language using
      Java SDK 1.6. The detailed design of those subsystem modules will be favored to that language. The
      Web Administrative Layer will be developed using ASP and the detailed design of those subsystem
      modules will be favored to that language.

3.4 Subsystem Modules: Customer Page Layouts and Mappings
3.4.1 Component Design Details: Layout Manager

      3.4.1.1 General Component Description
      A layout manager is a component that can coordinate the switching of different screen layouts. It stores
      a mapping of the layout page reference to a name identifier. It provides a public function that can accept
      a name identifier and it will display that page associated with the name.

      3.4.1.2 Component Functions


          Function Name                Description               Data Required              Data Returned
      add()                      Add a screen to the        Page/Layout/Panel           None
                                 layout manager.            reference and name
                                                            identifier
      showLayout()               Public function that sets Name identifier              None
                                 the active page.



18 April 2011 @ 11:07:00 AM                11                  Component Design
Senior Design Documentation Library                                        University Of Texas At Arlington
      3.4.1.3 Component Producer Interfaces


          Component Name                 Description            Data Produced
      Touchscreen Interaction Using the page reference, Image bitmap of layout
      Services                it sends the page layout
                              through Java paint()
                              method which is invoked
                              automatically by the Java
                              Runtime Environment.

      3.4.1.4 Component Consumer Interfaces


          Component Name                 Description           Data Consumed
      MVM Management:             Receives calls from the   String name of page.
      Payment Manager             showLayout() function.

      3.4.1.5 Component Data Structures
      LayoutManager{
              List<Page> layoutlist;
      }
      Page{
              Reference/Pointer page;
              String name;
      }

      3.4.1.6 Component Pseudo-code
      Fuction add(Page page){
              layoutlist.add(page)
      }


      Function showLayout(String name){
              for each pagei in layoutlist
                     if pagei.name == name
                             setPageVisible(pagei)
      }




18 April 2011 @ 11:07:00 AM                  12              Component Design
 Senior Design Documentation Library                                        University Of Texas At Arlington
3.4.2 Component Design Details: Item Selection Page

      3.4.2.1 General Component Description
      The Item Selection Page is a module that creates the layout for the screen where items are displayed on
      the touch screen device. It will be build using Swing components provided by the Java API.




      3.4.2.2 Component Functions


          Function Name                Description              Data Required              Data Returned
      buildGUI()                 Creates the layout of the List of product objects    None
                                 page to display
      updateItemPage()           Updates created page       List of product objects   None
                                 with new product data

      3.4.2.3 Component Producer Interfaces


        Component Name                 Description              Data Produced
      Touchscreen Interaction Sends the page layout         Image bitmap of layout
      Services                through Java paint()
                              method which is invoked
                              automatically by the Java
                              Runtime Environment.

      3.4.2.4 Component Consumer Interfaces


        Component Name                 Description              Data Consumed
      Product Manager           Sends List of product       List of product objects
      module                    objects containing
                                product information to
                                display on this page.

      3.4.2.5 Component Data Structures
      Product{
18 April 2011 @ 11:07:00 AM                13                 Component Design
Senior Design Documentation Library                                            University Of Texas At Arlington
             String name;
             int id;           // not used here
             float price;
             int qty;
             int slotNum; // not used here
             ImageIcon image;
      }

      3.4.2.6 Component Pseudo-code
      Function buildGUI(List products)
             itemPanel = new panel()
             for each producti in products
                        if producti.quantity == 0
                               continue
                        buttoni = new button
                        buttoni.setImage(proucti.image)
                        buttoni.setLabel(producti.name, producti.price)
                        buttoni.add(new eventListener) // Generates an mapping of button area that responds to
                                                             click in that mapping area
                        itemPanel.add(producti)
             layoutManager.add(itemPanel, “ITEM”)


      Function updateItemPage(List products)
             for each producti in products
                        if proucti.quantity == 0
                               continue
                        buttoni.setImage(proucti.image)
                        buttoni.setLabel(producti.name, producti.price)


3.4.3 Component Design Details: Card Selection Page

      3.4.3.1 General Component Description
      The Card Selection Page module creates a display page to input the method of their payment option
      which is either a credit card or Mav card. It will be build using Swing components provided by the Java
      API.


18 April 2011 @ 11:07:00 AM                    14                Component Design
Senior Design Documentation Library                                            University Of Texas At Arlington




      3.4.3.2 Component Functions


          Function Name               Description               Data Required               Data Returned
      buildGUI()               Creates the layout of the    None                        None
                               page to display

      3.4.3.3 Component Producer Interfaces


        Component Name                Description                Data Produced
      Touchscreen Interaction Sends the page layout         Image bitmap of layout
      Services                through Java paint()
                              method which is invoked
                              automatically by the Java
                              Runtime Environment.

      3.4.3.4 Component Consumer Interfaces
      N/A

      3.4.3.5 Component Data Structures
      N/A

      3.4.3.6 Component Pseudo-code
      Function buildGUI
             cardSelectionPanel = new panel()
             creditButton = new Button()
             creditButton.setText(“Credit Card”)
             creditButton.add(new eventListener) // Generates an mapping of button area that responds to
             click in
                                                           that mapping area
             cardSelectionPanel.add(creditButton)
             mavButton = new Button()
             mavButton.setText(“Mav”)
             mavButton.add(new eventListener)

18 April 2011 @ 11:07:00 AM                15                 Component Design
Senior Design Documentation Library                                        University Of Texas At Arlington
             cardSelectionPanel.add(mavButton)
             layoutManager.add(cardSelectionPanel, “CARD_SELECTION”)


3.4.4 Component Design Details: Swipe Page

      3.4.4.1 General Component Description
      The Swipe Page module creates a display page to direct users to swipe their payment card through the
      card reader. It will be build using Swing components provided by the Java API.




      3.4.4.2 Component Functions


          Function Name               Description              Data Required             Data Returned
      buildGUI()                Creates the layout of the   None                     None
                                page to display

      3.4.4.3 Component Producer Interfaces


        Component Name                  Description             Data Produced
      Touchscreen Interaction Sends the page layout         Image bitmap of layout
      Services                through Java paint()
                              method which is invoked
                              automatically by the Java
                              Runtime Environment.

      3.4.4.4 Component Consumer Interfaces
      N/A

      3.4.4.5 Component Data Structures
      N/A

      3.4.4.6 Component Pseudo-code
      Function buildGUI()
             swipePanel = new panel()
             cancelButton = new Button()
             cancelButton.setText(“Cancel”)
18 April 2011 @ 11:07:00 AM                16                Component Design
Senior Design Documentation Library                                     University Of Texas At Arlington
             cancelButton.add(new eventListener) // Generates an mapping of button area that responds to
                                                           click in that mapping area
             swipePanel.add(cancelButton)
             label = new Label()
             label.setText(“Swipe Now”)
             swipePanel.add(label)
             layoutManager.add(swipePanel, “SWIPE”)


3.4.5 Component Design Details: Invoice Page

      3.4.5.1 General Component Description
      The Invoice Page module creates a display page to indicate the Maverick Vending Machine display the
      results of a payment transaction. It will be build using Swing components provided by the Java API.




      3.4.5.2 Component Functions


          Function Name                 Description              Data Required             Data Returned
      buildGUI()                   Creates the layout of the Invoice Message            None
                                   page to display.          Object
      updateInvoicePage            Updates page with new    Invoice Message             None
                                   data from message.       Object

      3.4.5.3 Component Producer Interfaces


        Component Name                  Description              Data Produced
      Touchscreen Interaction Sends the page layout          Image bitmap of layout
      Services                through Java paint()
                              method which is invoked
                              automatically by the Java
                              Runtime Environment.

      3.4.5.4 Component Consumer Interfaces



18 April 2011 @ 11:07:00 AM                17                 Component Design
Senior Design Documentation Library                                         University Of Texas At Arlington
          Component Name                Description              Data Consumed
      Payment Manager            Sends invoice message        Invoice Message
      module                     object with the results of   Object
                                 the payment transaction.

      3.4.5.5 Component Data Structures
      Invoice Message Object{
             Boolean approved;
             String invoiceNumber;
      }

      3.4.5.6 Component Pseudo-code
      Function buildGUI(Message)
             invoicePanel = new panel()
             if message.approved == TRUE
                    label = new Label()
                    label.setText(message.invoiceNumber)
                    invoicePanel.add(label)
             else
                    label = new Label()
                    label.setText(“Denied”)
             layoutManager.add(invoicePanel, “INVOICE”)


      Function updateInvoicePage(Message)
             if message.approved == TRUE
                    label.setText(message.invoiceNumber)
             else
                    label.setText(“Denied”)


3.4.6 Component Design Details: Out of Order Page

      3.4.6.1 General Component Description
      The Out of Order Page module creates a display page to indicate the Maverick Vending Machine is out
      of service. It will be build using Swing components provided by the Java API.




18 April 2011 @ 11:07:00 AM                 18                 Component Design
Senior Design Documentation Library                                        University Of Texas At Arlington




      3.4.6.2 Component Functions


          Function Name               Description              Data Required            Data Returned
      buildGUI()                Creates the layout of the   None                     None
                                page to display

      3.4.6.3 Component Producer Interfaces


        Component Name                Description               Data Produced
      Touchscreen Interaction Sends the page layout         Image bitmap of layout
      Services                through Java paint()
                              method which is invoked
                              automatically by the Java
                              Runtime Environment.

      3.4.6.4 Component Consumer Interfaces
      N/A

      3.4.6.5 Component Data Structures
      N/A

      3.4.6.6 Component Pseudo-code
      Function buildGUI()
             outOfOrderPanel = new panel()
             label = new Label()
             label.setText(“Out of order”)
             outOfOrderPanel.add(label)
             layoutManager.add(invoicePanel, “OUT_OF_ORDER”)




18 April 2011 @ 11:07:00 AM                  19              Component Design
 Senior Design Documentation Library                                           University Of Texas At Arlington
3.4.7 Component Design Details: Event Handler

      3.4.7.1 General Component Description
      The Event Handler module keeps track of all event listeners created for buttons on the GUI. An event
      listener listens for an action event to occur by pressing a button on the touchscreen device. The Java API
      does this internally by registering a button to an actionListener object. This will continually listen for an
      event (button press) to occur.

      3.4.7.2 Component Functions


            Function Name                Description               Data Required               Data Returned
      actionPerformed()            Sends event to the         Event                       None
                                   MVM Management
                                   subsystem for
                                   processing. This
                                   method is provided by
                                   the Java SDK 1.6.

      3.4.7.3 Component Producer Interfaces


        Component Name                  Description                Data Produced
      MVM Management             Generates an event for       Event object
                                 Event Manager. Gets
                                 component that caused
                                 event to retrieve data
                                 from that component.

      3.4.7.4 Component Consumer Interfaces


        Component Name                  Description               Data Consumed
      Touchscreen Interaction The coordinate that was         Screen coordinate
      Services                touched triggers an event       touch.
                              if pressed over a button
                              mapping area.

      3.4.7.5 Component Data Structures
      ActionEvent – provided by Java SDK 1.6.
              Contains a string field of component that caused event.

      3.4.7.6 Component Pseudo-code
      N/A




18 April 2011 @ 11:07:00 AM                 20                  Component Design
Senior Design Documentation Library                                           University Of Texas At Arlington
3.5 Subsystem Modules: Beacon Control
3.5.1 Component Design Details: Beacon Control Subsystem

      3.5.1.1 General Component Description
      The Beacon Control subsystem’s function is to determine if the machine is available for making
      purchases by probing the server for connectivity. To accomplish this, it relies on external IP services to
      make a connection and send/receive requests. It relies upon the IP services provided by the Java API.
      See Section 3.7.1 for detailed information on the external services.

      3.5.1.2 Component Functions


          Function Name                 Description               Data Required              Data Returned
      checkConnection()           Checks that the MVM        Layout Manager object       None
                                  can communicate with
                                  the server, and notifies
                                  the layout and mapping
                                  subsystem of what page
                                  to display based on the
                                  results.

      3.5.1.3 Component Producer Interfaces


        Component Name                  Description               Data Produced
      Beacon IP Services         Produces an IP address       IP address - String
                                 for the server
      Layout Manager             Produces a page type         Page name - String
                                 name for the layout
                                 manager to display.


      3.5.1.4 Component Consumer Interfaces


        Component Name                  Description              Data Consumed
      Beacon IP Services         Consumes a Boolean           (Object) InetAddress,
                                 value from the               int timeout value
                                 isReachable interface.


      3.5.1.5 Component Data Structures
      The data structures used in this module are:
            A Boolean value of response from server connection request.

18 April 2011 @ 11:07:00 AM                 21                 Component Design
Senior Design Documentation Library                                       University Of Texas At Arlington
          A string of page type to layout manager so it can be displayed by layout manager.

      3.5.1.6 Component Pseudo-code
      Function checkConnection(Object layoutManager)
             InetAddress Server = InetAddress.getByHostName(server IP address)
             lastResponse = FALSE
             while ( TRUE ){
                     if server.isReachable(timeout_value)
                             current = TRUE
                     else
                             current = FALSE
                     if current == TRUE
                             if last == FALSE
                                      layoutManager.setPageLayout(“ITEM”)
                     else
                             layoutManager.setPageLayout(“OUT_OF_ORDER”)
                     last = current
                     wait(time_delay)
             }



3.6 Subsystem Modules: MVM Management
3.6.1 Component Design Details: Payment Manager

      3.6.1.1 General Component Description
      The Payment Management module is part of the MVM Management subsystem. Its purpose is to
      coordinate the payment activities of the vending machine. It will collect card data from the Hardware
      Layer, and then send that data to the proper payment system based on whether Mav or Credit Card
      option was selected. It will wait for a response and forward the response to Invoice Page module of the
      Customer Page Layouts and Mapping subsystem.

      3.6.1.2 Component Functions


          Function Name                  Description             Data Required             Data Returned
      collectPaymentData()        Collect payment card      None                       Card Number – String
                                  data sent from the
                                  Hardware Layer
      sendPaymentData()           Send the collected card   Card number – String       Invoice Message object

18 April 2011 @ 11:07:00 AM                 22                Component Design
Senior Design Documentation Library                                            University Of Texas At Arlington
                               number and amount to           Transaction object
                               the payment server and
                               wait for a message
                               response. Sends
                               response message to
                               Invoice Page module.

      3.6.1.3 Component Producer Interfaces


          Component Name                Description               Data Produced
      IP Stack Services          Creates packets and          Payment Object
                                 connection to transfer the
                                 payment request between
                                 MVM and server.
      Invoice Page module        Updates Invoice Page         Invoice Message
                                 with new Invoice             Object
                                 Message Object from
                                 payment request
                                 response.

      3.6.1.4 Component Consumer Interfaces


          Component Name                Description              Data Consumed
      IP Stack Services          Receives de-packaged         Invoice Message
                                 data from IP Services        Object
                                 containing the payment
                                 request response.
      Hardware Management        Receives card data that      Payment Card number
      and Control Layer          was read from card           – String
                                 reader.

      3.6.1.5 Component Data Structures
      Payment Object{
             String cardNumber;
             Float amount;
      }
      Invoice Message Object{
             Boolean approved;
             String invoiceNumber;
      }
      Transaction Object{

18 April 2011 @ 11:07:00 AM                23                  Component Design
Senior Design Documentation Library                                         University Of Texas At Arlington
             Product productSelected; // Set the product object based on the item button pressed
             String paymentOption;     // Sets to “credit” or “mav” based on the payment option button pressed
      }


      cardNumber – String

      3.6.1.6 Component Pseudo-code
      Function collectPaymentData() returns String
             while( TRUE ){
                    String number = getCardData() // Hardware Layer function call
                    if number != NULL
                            return number
             }


      Function sendPaymentData(String cardNumber, Transaction transaction)
             cardType = transaction.paymentOption
             if cardType == CREDIT
                    payment = new Payment()
                    payment.setCardNumber(cardNumber)
                    payment.setAmount(transaction.product.price)
                    ipConnection.setServer(creditCardServerAddress)
             else if cardType == MAV
                    payment = new Payment()
                    payment.setCardNumber(cardNumber)
                    payment.setAmount(amount)
                    ipConnection.setServer(creditCardServerAddress)
             ipConnection.send(payment);
             InvoiceMessage result = ipConnection.recieve(); // wait for response
             if (result.approved == true)
                    sendDispenseCommand() // function in Dispense Manager module
             updateInvoicePage(result) // Function in InvoicePage module




18 April 2011 @ 11:07:00 AM                 24                Component Design
 Senior Design Documentation Library                                          University Of Texas At Arlington
3.6.2 Component Design Details: Product Manager

      3.6.2.1 General Component Description
      The module gets a new list of products from the MVM database to use for processing and displaying on
      the MVM.

      3.6.2.2 Component Functions


           Function Name                 Description              Data Required             Data Returned
      getProductList()            Creates a query to the    None                        List of products
                                  database to retrieve all
                                  products in the specified
                                  vending machine.

      3.6.2.3 Component Producer Interfaces


          Component Name                 Description              Data Produced
      IP Stack Services           Create a connection to      Database query - String
                                  database server and send
                                  packets of data request.

      3.6.2.4 Component Consumer Interfaces


          Component Name                 Description             Data Consumed
      Item Page module            Receives list of products   List of Product objects
                                  to update item display
                                  page.

      3.6.2.5 Component Data Structures
      Product{
             String name;
             int id;         // not used here
             float price;
             int qty; // not used here
             int slotNum; // not used here
             ImageIcon image;
      }

      3.6.2.6 Component Pseudo-code
      Function getProductList()
             int vmID = get_vmID(); //from config module
18 April 2011 @ 11:07:00 AM                  25                Component Design
Senior Design Documentation Library                                  University Of Texas At Arlington
             String databaseAddress = get_MVM_DB() // from config module
             Connection connection = getConnection(databaseAddress);
             String query = “SELECT * FROM PRODUCTS WHERE VM_ID = ” . vmID .“””;
             results = connection.send(query);
             List<Product> products = new List()
             For each producti in results
                    Products.add(producti)
             updateItemPage(products)


3.6.3 Component Design Details: Dispense Manager

      3.6.3.1 General Component Description
      The Manage Dispense module coordinates the dispensing of a product from the vending machine. It will
      initiate the command to the Hardware Layer, and then it will receive a response from a sensor that
      detects if a product was dispensed. Next it will update the MVM Database with the product that was
      purchased as well as inform the database if there was a malfunction while dispensing.

      3.6.3.2 Component Functions


          Function Name                     Description          Data Required           Data Returned
      sendDispenseCommand()       Tell the hardware layer   Slot Number – int         None
                                  to activate the given
                                  slot number. Stores an
                                  integer indicating the
                                  result from dispense
                                  sensor and then calls
                                  updateMVM()
      updateMVM()                 Send an update to the     Product ID – int          None
                                  MVM database              Malfunction value - int
                                  indicating what product
                                  was purchased and if
                                  there was a
                                  malfunction. Then
                                  updates item page
                                  module.

      3.6.3.3 Component Producer Interfaces


        Component Name                 Description              Data Produced
      IP Stack Services         Create a connection to      Database query - String
                                database server and send

18 April 2011 @ 11:07:00 AM                   26             Component Design
Senior Design Documentation Library                                          University Of Texas At Arlington
                              packets of data request.
      Arduino Serial              Generates a command to Integer value
      Interface                   initiate the activation of a representing command.
                                  dispenser motor.
      MVM Database                Updates data in the        New product quantity
                                  MVM database.              value and set
                                                             malfunction value.

      3.6.3.4 Component Consumer Interfaces


          Component Name                Description              Data Consumed
      Arduino Serial              Consumes data produced     String
      Interface                   by dispense sensor
                                  detector.
      Event Manager               Consumes product object    Transaction object
                                  generated by event from
                                  an item selection.

      3.6.3.5 Component Data Structures
      int ProductID; // The product id value from Product object
      int slotNumber; // Indicates which slot in the vending machine it is located. From Product object.
      int malfunctionValue; // Integer value representing a malfunction. 0 – Normal, 1 – Problem
      Transaction{
             Product productSelected; // Set the product object based on the item button pressed
             String paymentOption;      // Sets to “credit” or “mav” based on the payment option button pressed
      }

      3.6.3.6 Component Pseudo-code
      Function sendDispenseCommand(int slotNum) returns int
             activateDispense(transaction.product.slotNumber) // call to Hardware Layer function
             while(true){
                       int malfunction = getSensorValue() // call to Hardware Layer function
                       if malfunction != NULL // Null indicates no reading yet
                              return malfunction
             }
             updateMVM(transaction.product.id, malfunction)


      Function updateMVM(int productID, int malfunction)


18 April 2011 @ 11:07:00 AM                 27                 Component Design
Senior Design Documentation Library                              University Of Texas At Arlington
             UPDATE table SET value=value+$add WHERE person=$person
             String vmTable = get_vmTable(); //from config module
             String databaseAddress = get_MVM_DB() // from config module
             Connection connection = getConnection(databaseAddress);
             String query = “UPDATE”. vmTable. “SET VALUE=VALUE-1 WHERE PRODUCTID = ” .
                            transaction.product.productID .“””;
             connection.send(query);
             getProductList()       // calls getProductList from Retrive Product module which also updates
                                           item page layout.


3.6.4 Component Design Details: Configuration Manager

      3.6.4.1 General Component Description
      The Configuration module sets the configuration of the vending machine so it can contact the server. It
      configures the vending machines table name in the MVM database, it configures the IP address of the
      server, and the IP addresses of the credit card server and Mav card server.

      3.6.4.2 Component Functions


          Function Name                 Description                Data Required           Data Returned
      setMVMserverAddress()       Set the address of the       IP Address – String     None
                                  MVM server.
      setTableName()              Set the database table       Table Name – String     None
                                  name for the specific
                                  vending machine
      setCreditServerAddress()    Set the address of the       IP Address – String     None
                                  credit card server
      setMavServerAddress()       Set the address of the       IP Address – String     None
                                  Mav card server
      getMVMserverAddress()       Set the address of the       None                    IP Address – String
                                  MVM server.
      getTableName()              Set the database table       None                    Table Name – String
                                  name for the specific
                                  vending machine
      getCreditServerAddress()    Set the address of the       None                    IP Address – String
                                  credit card server
      getMavServerAddress()       Set the address of the       None                    IP Address – String
                                  Mav card server


18 April 2011 @ 11:07:00 AM                28                   Component Design
Senior Design Documentation Library                                        University Of Texas At Arlington
      3.6.4.3 Component Producer Interfaces


        Component Name                 Description             Data Produced
      N/A

      3.6.4.4 Component Consumer Interfaces


        Component Name                 Description             Data Consumed
      N//A

      3.6.4.5 Component Data Structures
      String MVMserverAddress; // IP address
      String creditServerAddress; // IP address
      String mavServerAddress;    // IP address
      String tableName;           // Table name of vending machine in MVM Database

      3.6.4.6 Component Pseudo-code
      Basic get and set methods for each function. Listing only two methods since all methods are same
      except for variable names.


      Function setMVMserverAddress(String ipAddress)
              MVMserverAddress = ipAddress


      Function getMVMserverAddress() returns String
              return MVMserverAddress


3.6.5 Component Design Details: Event Manager

      3.6.5.1 General Component Description
      The Event Manager module takes events from the Event Handler in the Customer Page Layouts and
      Mapping subsystem and processes the event accordingly. The events it receives allows the MVM to start
      all the processing required to dispense products, update databases, and accept payment information.

      3.6.5.2 Component Functions


             Function Name              Description             Data Required            Data Returned
      itemSelection()             If an item button is      Event, Transaction       None
                                  selected, takes the       Object
                                  event associated with
18 April 2011 @ 11:07:00 AM               29                 Component Design
Senior Design Documentation Library                                             University Of Texas At Arlington
                                that button and gets
                                what product was
                                associated with that
                                button. Assigns value
                                to transaction.
      paymentOptionSelection() If a payment option              Event, Transaction        None
                               button was pressed, it           Object
                               receives that event and
                               associates which
                               payment option it was.
                               Assigns value to
                               transaction.
      cancelSelection()             If cancel button was        Transaction object        None
                                    pressed, it will reset
                                    transaction and tells the
                                    layout manager to go to
                                    main screen.
      main()                        Main receives the           None                      None
                                    events and coordinates
                                    the flow for processing
                                    a transaction.

      3.6.5.3 Component Producer Interfaces


          Component Name                Description                 Data Produced
      Layout Manager             Main() controls flow, so       String – Indicates what
                                 the layout manager             page to display
                                 receives a string for what
                                 screen to display

      3.6.5.4 Component Consumer Interfaces


          Component Name                Description                Data Consumed
      Event Handler              Consumes the event             Event – Action Event
                                 produced by the Event
                                 Handler module.

      3.6.5.5 Component Data Structures
      Transaction{
               Product productSelected; // Set the product object based on the item button pressed
               String paymentOption;    // Sets to “credit” or “mav” based on the payment option button pressed
      }


18 April 2011 @ 11:07:00 AM                 30                   Component Design
Senior Design Documentation Library                                        University Of Texas At Arlington
      3.6.5.6 Component Pseudo-code


      Function itemSelection(Event)
             String name = event.Button.product.name
             transaction.Product = prodcutList.get(name) // return product form product list with that name


      Function paymentOptionSelection(Event)
             String type = event.Button.name
             if name == “CREDIT”
                     transaction.paymentOption = “credit”
             if name == “MAV”
                     transaction.paymentOption = “mav”


      Function cancelSelection(Event)
             transaction.productSelected = null;
             transaction.paymentOption = null;


      Function main()
      Transaction tranasaction = new Transaction();
      while (true)
             event = actionPerformed // from Event Handler Module
                     if event == itembutton
                     itemSelection(event, transaction)
                     layoutmanager.show(CARD_SELECTON)
             if event == paymentOptionButton
                     paymentOptionSelection(event, transaction)
                     layoutManager.show(SWIPE)
                     String card = collectPaymentData()
                     InvoiceMessage invoice = sendPaymentData(card)
                     layoutManager.show(INVOICE)
                     time delay
                     layoutManager.show(ITEM)
             if event == cancelButton
                     cancelSelection(transaction)

18 April 2011 @ 11:07:00 AM                31                Component Design
Senior Design Documentation Library                                         University Of Texas At Arlington
                   layoutManager.show(ITEM)




3.7 Subsystem Modules: IP Stack Services
3.7.1 Component Design Details: Beacon IP Services

      3.7.1.1 General Component Description
      This is an external service that is being implemented and not developed. It uses a class called
      InetAddress under java.net which is an IP service provided by the Java API. It performs all the
      necessary actions required to communicate with another host to send connection requests.

      3.7.1.2 Component Functions


          Function Name                Description              Data Required              Data Returned
      isReachable()             Sends a request to the IP (Object) InetAddress,       Boolean
                                address and returns true int timeout value
                                if it can connect to the
                                IP address in a given
                                amount of time,
                                otherwise returns false.
                                IP services from Java
                                API
                                java.net.InetAddress.
      getHostByName()           Creates InetAddress        Host address - String      InetAddress object
                                object given the host
                                name provided to it.

      3.7.1.3 Component Producer Interfaces


        Component Name                 Description               Data Produced
      Beacon Control            Beacon Control              Boolean value
                                subsystem receives a
                                Boolean value returned
                                from the isReachable
                                method.

      3.7.1.4 Component Consumer Interfaces


        Component Name                 Description              Data Consumed


18 April 2011 @ 11:07:00 AM                32                 Component Design
Senior Design Documentation Library                                            University Of Texas At Arlington
      Beacon Control             Sends a request to the IP     IP Address - String
                                 address it receives as a
                                 parameter.

      3.7.1.5 Component Data Structures
      See Component functions for API to interface with object data structure of this external service.

      3.7.1.6 Component Pseudo-code
      N/A – external service


3.7.2 Component Design Details: MVM Connection IP Services

      3.7.2.1 General Component Description
      The MVM Connection module is an external service provided by the Java Development Kit 1.6 and
      Java Runtime Environment. It provides a service to create an internet connection to a remote server
      where it can send and receive data. Data can then be sent and returned over that connection. It uses the
      DriverManager class under java.lang.object, Connection class under java.sql, Statement class under
      java.sql, and Socket class under java.net.

      3.7.2.2 Component Functions


             Function Name                   Description             Data Required           Data Returned
      DriverManger.getConnection() Establishes a                  IP Address and data    Connection object
                                   connection with
                                   remote database
                                   server.
      Connection.createStatement()      Creates a Statement    None                      Statement object
                                        object that can send
                                        data over the network.
                                        Called from
                                        Connection object.
      Statement.executeQuery()          Sends string of           SQL query – String     ResultSet
                                        database over
                                        network.
      Socket()                          Creates a connection      IP Address – String    Socket object
                                        with the payment          Port – int
                                        server to send and
                                        receive data.
      Socket.getOutputStream()          Provides an interface     None                   OutputStream
                                        to send stream of data
                                        over the connection.
      Socket.getInputStream()           Provides an interface     None                   InputStream

18 April 2011 @ 11:07:00 AM                33                    Component Design
Senior Design Documentation Library                                            University Of Texas At Arlington
                                       to receive data over
                                       the connection.

      3.7.2.3 Component Producer Interfaces


        Component Name                 Description                Data Produced
      Payment Manager           Produces an output data       Socket connection,
                                stream that allows the        Output data stream
                                sending of bytes across
                                the internet.
      Dispense Manager          Provides a connection to      Connection object,
                                the database and a            statement object
                                channel to send/receive
                                data.

      3.7.2.4 Component Consumer Interfaces


        Component Name                 Description               Data Consumed
      Payment Manager           Consumes data to send         Bytes of data.
                                over a network
                                connection.
      Dispense Manager          Consumes data to send         String
                                over a network
                                connection.

      3.7.2.5 Component Data Structures
      N/A

      3.7.2.6 Component Pseudo-code
      N/A



3.8 Subsystem Modules: Touchscreen Interaction Services
3.8.1 Component Design Details: Touchscreen Interaction Services

      3.8.1.1 General Component Description
      Touchscreen Interaction Services is an external service which consists of display drivers to operate the
      touchscreen device. The touchscreen device will be Mimo 720-S and it will use the display driver
      provided by Mimo.

      3.8.1.2 Touchscreen Specifications
      Display size: 7”

18 April 2011 @ 11:07:00 AM                34                  Component Design
Senior Design Documentation Library                                          University Of Texas At Arlington
      Display resolution: 800x480
      Brightness: 350 cd/m2
      Connection: USB

      3.8.1.3 Component Producer Interfaces


        Component Name                  Description              Data Produced
      Event Handler module        This service produces an   (x, y) screen coordinate
                                  (x, y) coordinate from a
                                  user touching the screen
                                  which can be used to
                                  create an event.

      3.8.1.4 Component Consumer Interfaces


        Component Name                  Description             Data Consumed
      Customer Page Layouts       Receives the image         Image bitmap
      and Mappings: Page          bitmap from the paint()
      modules                     method in the Java
                                  Runtime Environment.




3.9 Subsystem Modules: Peripheral Interfaces
3.9.1 Component Design Details: Proximity Sensor Interface

      3.9.1.1 General Component Description
      The Proximity Sensor Interface provides an environment for the proximity sensor to operate and send
      feedback to the Hardware Management and control subsystem.

      3.9.1.2 Component Functions
          Function Name                  Description             Data Required              Data Returned
      setup()                     Sets Up baud rate for      Baud rate                  None
                                  serial communication
      loopActivate()              Sets the PWPin as input    Long Pulse                 Long centimeters
                                  and sets the pulse into
                                  HIGH in order to read
                                  sensor Data


               Connect Pin PW on the proximity sensor to digital pin 7 on Arduino Duemilanove in order to
                receive readings from the sensor.
18 April 2011 @ 11:07:00 AM                 35                Component Design
Senior Design Documentation Library                                     University Of Texas At Arlington
          Connect the +5V pin on the proximity sensor to the 5V pin on Arduino Duemilanove to power
             the sensor.
            Connect the Ground pin on the proximity sensor to the Ground Pin on on Arduino Duemilanove.

      3.9.1.3 Component Producer Interfaces
        Component Name                    Description              Data Produced
      Proximity Sensor             Sends the distance         Long centimeters
      Interface                    calculated by the
                                   Arduino to the Serial port


      3.9.1.4 Component Consumer Interfaces
        Component Name                    Description              Data Consumed
      Arduino Serial               A java application that     String True
      Interface                    allows the MVM
                                   application to
                                   communicate with the
                                   Arduino board

      3.9.1.5 Component Data Structures
      Long pulse.
      Long centimeters.
      Long value1.
      Long value2.

      3.9.1.6 Component Pseudo-code
             //Digital pin 7 for reading in the pulse width from the MaxSonar device.
             //This variable is a constant because the pin will not change throughout execution of this code.
             const int pwPin = 7;
             //variables needed to store values
             long pulse, inches, cm;
             long value1, value2;
             void setup() {
                 //This opens up a serial connection to shoot the results back to the PC console
                 Serial.begin(9600);
             }
             void loopActivate() {
                 pinMode(pwPin, INPUT);
                  //Used to read in the pulse that is being sent by the MaxSonar device.
18 April 2011 @ 11:07:00 AM                  36                  Component Design
Senior Design Documentation Library                                          University Of Texas At Arlington
              //Pulse Width representation with a scale factor of 147 uS per Inch.


                    pulse = pulseIn(pwPin, HIGH);
                    //147uS per inch
                    inches = pulse/147;
                    //change inches to centimetres
                    cm = inches * 2.54;
                    value1 = cm;
                    delay(500);


                    pulse = pulseIn(pwPin, HIGH);
                        //147uS per inch
                        inches = pulse/147;
                        //change inches to centimetres
                        cm = inches * 2.54;
                        value2 = cm;


                    delay(500);


                    if(value1 - value2 > 2)
                    {
                            //Serial.print("Product Dispensed successfully");
                            Serial.send (“true”);
                    }
                }

3.9.2 Component Design Details: DC Motor Interface

      3.9.2.1 General Component Description
      This module is responsible for specifying the required circuit components in order to interface with the
      DC motor using the Arduino Duemilanove control board.

      3.9.2.2 Component Functions
          Function Name                          Description            Data Required       Data Returned
      setup()                              Sets Up baud rate for   Baud rate            None
                                           serial communication,   Pin 3
                                           potentiometer pin to

18 April 2011 @ 11:07:00 AM                         37               Component Design
Senior Design Documentation Library                                          University Of Texas At Arlington
                               input, and motoPin1 and        Pin 10
                               2 to output.
                                                              Pin 11
      motorForward1()                Moves the motor in a     voltage                  none
                                     clockwise motion.
      motorForward2()
      getPot()                       Controls the speed of    Analog voltage from the Voltage.
                                     the motor                potentiometer


      Provides a smooth power to operate the DC motor using:
            Arduino
            breadboard
            100K POT,
            1K resistor(2),
            Zener diode,
                tip 120 or similar transistor.
            external voltage source is required in order to operate the DC motor that requires more speed.
      All the components listed above should be utilized to connect the DC motor and the Arduino board with
      an external voltage source. The potentiometer is utilized to control the speed of the DC motor.

      3.9.2.3 Component Producer Interfaces


        Component Name                      Description           Data Produced
      DC Motor Interface            Produces a voltage to     voltage
                                    rotate the motor
                                    clockwise


      3.9.2.4 Component Consumer Interfaces
        Component Name                      Description          Data Consumed
      Arduino Serial                Allows communication      String slot number
      Interface                     between the Arduino and
                                    the MVM management
                                    Subsystem

      3.9.2.5 Component Data Structures
                 Int motoPin: PIN 11.
                 int Voltage = analogRead(pot).
                 Int Slot number.


18 April 2011 @ 11:07:00 AM                       38           Component Design
Senior Design Documentation Library                        University Of Texas At Arlington
              Int pot. PIN 0.

      3.9.2.6 Component Pseudo-code
              Int pot = 0;
              Int motorPin1 = 11;
              Int motorPin = 10;


              Void setup()
              {
              Set baudrate
              Set pot to INPUT
              Set motorPin to OUTPUT.
              }



              Int getPot()
              {
              int v = analogRead(pot);
              return v ;
              }
              Int motorForward1()
              {
              analogWrite(motoPin, getPot())
              delay(1000)
              digitalWrite(motorPin, HIGH)
              delay(1000)
              }
              Int motorForward2()
              {
              analogWrite(motoPin2, getPot())
              delay(1000)
              digitalWrite(motorPin2, HIGH)
              delay(1000)
              }


18 April 2011 @ 11:07:00 AM              39     Component Design
Senior Design Documentation Library                                                 University Of Texas At Arlington
              Void loop()
                 {
                 If (Serial.available() > 0)
                       {
                       Incomingbyte = (String) Serial.read();
                       If incomingbyte == “1”;
                       motorForward1();
                       If incomingbyte == “2”;
                       motorForward2();
                 }

3.10 Subsystem Modules: Hardware Management and Control
3.10.1 Component Design Details: Arduino Serial Interface

      3.10.1.1         General Component Description
      The serial interface allow the arduino board to communicate with the Computer in order to receive
      commands from the MVM application to run a specific slot

      3.10.1.2         Component Functions


          Function Name                    Description              Data Required                Data Returned
      initialize()                  Set serial baud rate and    COM port 6                   None
                                    transfer bit rate and
                                    other serial
                                    communication
                                    requirements. The
                                    function also sets up the
                                    input and output lines
      sendSlotNo()                  Sends a serial output to Slot number                     none
                                    activate a specific motor
                                    slot
      getSensorResult()             Returns the input           none                         sensorResult
                                    received from the
                                    sensor
      close ()                      Closes the serial           None                         None
                                    connection
      serialEvent()                 Listens to the serial       Input.available()            none
                                    input port



18 April 2011 @ 11:07:00 AM                    40                 Component Design
Senior Design Documentation Library                                              University Of Texas At Arlington
      3.10.1.3     Component Producer Interfaces
          Component Name                   Description               Data Produced
       DC Motor Interface           Receives a string that       Slot number
                                    represents a slot number
       Dispense Module              Responsible for selecting    Slot number
                                    the correct MVM slot to
                                    operate and listens to the
                                    sensor to check if the
                                    product was dispensed


       3.10.1.4          Component Consumer Interfaces
          Component Name                   Description              Data Consumed
       Dispense Module              Responsible for selecting    String True or null to
                                    the correct MVM slot to      indicate that a product
                                    operate and listens to the   has been dispensed
                                    sensor to check if the
                                    product was dispensed


       3.10.1.5          Component Data Structures
              Serial Input
              Serial Output
              Int slot
              String Sensor Result.

       3.10.1.6          Component Pseudo-code


public class SerialTest implements SerialPortEventListener {
       SerialPort serialPort;
    /** The port we're normally going to use. */
       private static final String PORT_NAMES[] = {
                         "COM6", // Windows
                         };
       /** Buffered input stream from the port */
       private InputStream input;
       /** The output stream to the port */
       private OutputStream output;
       /** Milliseconds to block while waiting for port open */
18 April 2011 @ 11:07:00 AM                   41                  Component Design
Senior Design Documentation Library                                            University Of Texas At Arlington
      private static final int TIME_OUT = 2000;
      /** Default bits per second for COM port. */
      private static final int DATA_RATE = 9600;


      private String sensorResult;
      public void initialize() {
              CommPortIdentifier portId = null;
              Enumeration portEnum = CommPortIdentifier.getPortIdentifiers();


              // iterate through, looking for the port
              while (portEnum.hasMoreElements()) {
                      CommPortIdentifier currPortId = (CommPortIdentifier) portEnum.nextElement();
                      for (String portName : PORT_NAMES) {
                                if (currPortId.getName().equals(portName)) {
                                       portId = currPortId;
                                       break;
                                }
                      }
              }


              if (portId == null) {
                      System.out.println("Could not find COM port.");
                      return;
              }


              try {
                      // open serial port, and use class name for the appName.
                      serialPort = (SerialPort) portId.open(this.getClass().getName(),
                                       TIME_OUT);


                      // set port parameters
                      serialPort.setSerialPortParams(DATA_RATE,
                                       SerialPort.DATABITS_8,
                                       SerialPort.STOPBITS_1,

18 April 2011 @ 11:07:00 AM                     42              Component Design
Senior Design Documentation Library                                       University Of Texas At Arlington
                                 SerialPort.PARITY_NONE);


                     // open the streams
                     input = serialPort.getInputStream();
                     output = serialPort.getOutputStream();


                     // add event listeners
                     serialPort.addEventListener(this);
                     serialPort.notifyOnDataAvailable(true);
             } catch (Exception e) {
                     System.err.println(e.toString());
             }
      }


      Public void getSensorResult()
      {
             Return sensorResult;
      }


      Public sendSlotNo(int slot)
      {
      Output.writeObject(slot);
      }


      /**
       * This should be called when you stop using the port.
       * This will prevent port locking on platforms like Linux.
       */
      public synchronized void close() {
             if (serialPort != null) {
                     serialPort.removeEventListener();
                     serialPort.close();
             }
      }

18 April 2011 @ 11:07:00 AM                   43               Component Design
Senior Design Documentation Library                                           University Of Texas At Arlington

      /**
       * Handle an event on the serial port. Read the data and print it.
       */
      public synchronized void serialEvent(SerialPortEvent oEvent) {
              if (oEvent.getEventType() == SerialPortEvent.DATA_AVAILABLE) {
                     try {
                             int available = input.available();
                             byte chunk[] = new byte[available];
                             input.read(chunk, 0, available);


                             // Displayed results are codepage dependent
                             //System.out.print(new String(chunk));
                             sensorResult = new String(chunk);


                     } catch (Exception e) {
                             System.err.println(e.toString());
                     }
              }
              // Ignore all the other eventTypes, but you should consider the other ones.
      }
}


3.10.2 Component Design Details: Card Serial Interface

      3.10.2.1       General Component Description
      The serial interface allow the card reader to send the card information to the MVM management in order
      to process the payment.

      3.10.2.2       Component Functions


            Function Name                Description                Data Required              Data Returned
      initialize()                 Set serial baud rate and      COM 7                      None
                                   transfer bit rate and
                                   other serial
                                   communication
                                   requirements. The

18 April 2011 @ 11:07:00 AM                 44                    Component Design
Senior Design Documentation Library                                                University Of Texas At Arlington
                               function also sets up the
                               input and output lines
       getCardReaderInfo()           Retrieves the data         N/A                          cardInfo
                                     received serially from
                                     the MVM application
       close ()                      Closes the serial          None                         None
                                     connection
       serialEvent()                 Listens to the serial      Input.available()            none
                                     input port


       3.10.2.3          Component Producer Interfaces
           Component Name                  Description              Data Produced
       Card Reader                  A magnetic card reader      String cardInfo.
                                    device

       3.10.2.4          Component Consumer Interfaces
           Component Name                  Description             Data Consumed
       Payment Manager              Responsible for             String cardInfo
                                    finalizing financial
                                    transactions as described
                                    above

3.10.2.1          Component Data Structures
                  Serial Input
                  Serial Output
                  cardInfo

       3.10.2.2          Component Pseudo-code


public class SerialTest implements SerialPortEventListener {
       SerialPort serialPort;
    /** The port we're normally going to use. */
       private static final String PORT_NAMES[] = {
                         "COM7", // Windows
                         };
       /** Buffered input stream from the port */
       private InputStream input;
       /** The output stream to the port */

18 April 2011 @ 11:07:00 AM                    45                Component Design
Senior Design Documentation Library                                            University Of Texas At Arlington
      private OutputStream output;
      /** Milliseconds to block while waiting for port open */
      private static final int TIME_OUT = 2000;
      /** Default bits per second for COM port. */
      private static final int DATA_RATE = 9600;


      private String cardInfo;


      public void initialize() {
              CommPortIdentifier portId = null;
              Enumeration portEnum = CommPortIdentifier.getPortIdentifiers();


              // iterate through, looking for the port
              while (portEnum.hasMoreElements()) {
                      CommPortIdentifier currPortId = (CommPortIdentifier) portEnum.nextElement();
                      for (String portName : PORT_NAMES) {
                                if (currPortId.getName().equals(portName)) {
                                       portId = currPortId;
                                       break;
                                }
                      }
              }


              if (portId == null) {
                      System.out.println("Could not find COM port.");
                      return;
              }


              try {
                      // open serial port, and use class name for the appName.
                      serialPort = (SerialPort) portId.open(this.getClass().getName(),
                                       TIME_OUT);


                      // set port parameters

18 April 2011 @ 11:07:00 AM                     46               Component Design
Senior Design Documentation Library                                        University Of Texas At Arlington
                   serialPort.setSerialPortParams(DATA_RATE,
                                      SerialPort.DATABITS_8,
                                      SerialPort.STOPBITS_1,
                                      SerialPort.PARITY_NONE);


                      // open the streams
                      input = serialPort.getInputStream();
                      output = serialPort.getOutputStream();


                      // add event listeners
                      serialPort.addEventListener(this);
                      serialPort.notifyOnDataAvailable(true);
              } catch (Exception e) {
                      System.err.println(e.toString());
              }
      }


      /**
       * This should be called when you stop using the port.
       * This will prevent port locking on platforms like Linux.
       */
      public synchronized void close() {
              if (serialPort != null) {
                      serialPort.removeEventListener();
                      serialPort.close();
              }
      }
      Public String getCardReaderInfo()
      {
              Return cardInfo;
      }


      /**
       * Handle an event on the serial port. Read the data and print it.

18 April 2011 @ 11:07:00 AM                    47               Component Design
Senior Design Documentation Library                                                University Of Texas At Arlington
       */
      public synchronized void serialEvent(SerialPortEvent oEvent) {
             if (oEvent.getEventType() == SerialPortEvent.DATA_AVAILABLE) {
                       try {
                               int available = input.available();
                               byte chunk[] = new byte[available];
                               input.read(chunk, 0, available);


                               // Displayed results are codepage dependent
                               //System.out.print(new String(chunk));
                               cardInfo = (new String(chunk));
                       } catch (Exception e) {
                               System.err.println(e.toString());
                       }
             }
             // Ignore all the other eventTypes, but you should consider the other ones.
      }
}

3.11 Subsystem Modules: Credit Accounts Control
3.11.1 Component Design Details: Credit Card Processing

      3.11.1.1         General Component Description
      The Credit Card Processing module will be responsible for processing credit cards. The module will take
      a credit card number and an amount to process the transaction. It will first get the credit card information
      from the Credit Database and use the necessary information to verity that the credit card is valid for
      making purchases. Then it will process the transaction if the card contains enough balance to purchase
      the product.

      3.11.1.2         Component Functions
      Name                           Description                    Inputs                  Outputs
      validateCard()                 Makes sure credit card         Payment Object          Invoice object
                                     exists and is not
                                     expired.
      processTransaction()           Processes the                  Credit Card, purchase   Invoice object
                                     transaction if card has        amount.
                                     enough balance.
      updateBalance()                Updates the credit card        Credit Card, purchase   N/A

18 April 2011 @ 11:07:00 AM                   48                     Component Design
Senior Design Documentation Library                                             University Of Texas At Arlington
                               balance.                       amount
      getConfirmationNum()         Generates a                N/A                        Confirmation number
                                   confirmation number
                                   for the current
                                   transaction.
      Main()                       Receives the data over   None                         None
                                   the network connection
                                   and sends the data back.
                                   Calls all validate to
                                   process card.


      3.11.1.3       Component Producer Interfaces
      Name                                 Description                          Data Produced
      IP Stack Services                    Creates data packets to be sent to   Invoice Object
                                           the MVM management
                                           subsystem from the Credit Card
                                           Processing Module.
      Database Services                    Creates SQL queries that will be     SQL query commands
                                           retrieved from the Credit
                                           Database.


      3.11.1.4       Component Consumer Interfaces
      Name                                 Description                          Data Consumed
      IP Stack Services                    Receives data from the MVM           Payment object
                                           management module to process a
                                           credit card.
      Database Services                    Receives SQL query results from      SQL query results
                                           the Credit Database.


      3.11.1.5       Component Data Structures
      Credit Card Object { String CCNumber
                           String expirationDate
                           Float balance
                           Float creditLimit }
      Invoice Message Object{
               Boolean approved;
               String invoiceNumber; }

18 April 2011 @ 11:07:00 AM                 49                  Component Design
Senior Design Documentation Library                                         University Of Texas At Arlington
      3.11.1.6     Component Pseudo Code
      validateCard(payment)
         CreditCard creditCard = new CreditCard( payment.getCardNumber ); //get info from payment object
         InvoiceMessage invoice = new InvoiceMessage();
         cardNumber = creditCard.getCardNumber();
         results = statement.executeQuery(
                        “SELECT ExpirationDate, Balance, MaxBalance FROM CreditCard
                         WHERE CC# = cardNumber” );


         //Save card information in CreditCard object
         if ( expirationDate < currentDate )
             expired = false;
         else
             expired = true;
         if ( (results ! = null) && (!expired) )
                invoice = processTransaction( creditCard, purchaseAmount, invoice )
                return invoice;
         else
                invoice.approved = false;
                return invoice


      processTransaction( creditCard, amout, invoice )
         balance = creditCard.getBalance();
         creditLimit = creditCard.getCreditLimit();
         newBalance = balance + amout;
         if ( creditLimit < newBalance )
                invoice.approved = false;
                return invoice // you can’t afford this
         else
                invoice.approved = true;
                updateBalance( creditCard, newBalance);
                invoice.invoiceNumber = getConfirmationNumber();
                return invoice //transaction successful



18 April 2011 @ 11:07:00 AM                   50              Component Design
Senior Design Documentation Library                                              University Of Texas At Arlington
      Function main()
               Payment payment = ipConnection.receive();
               InvoiceMessage invoice = validateCard(payment)
               ipConnection.send(invoice)



3.12 Subsystem Modules: MyMav Accounts Control
3.12.1 Component Design Details: MyMav Card Processing

      3.12.1.1         General Component Description
      The MyMav Card Processing module will be responsible for processing MyMav student cards. The
      module will take a student ID number and an amount to process the transaction. It will first connect to
      the MyMav database and retrieve the necessary information to validate the student card. If card is active
      for making purchases it will process the transaction and update the MyMav database as necessary. It will
      then send a confirmation number back to the MVM management subsystem.

      3.12.1.2         Component Functions
      Name                        Description                  Inputs                     Outputs
      validateCard()              Makes sure MyMav             Payment Object             Invoice object
                                  card exists and is active
                                  for making purchases.
      processTransaction()        Processes the                MyMav Card,                Invoice object
                                  transaction .                purchase amount.
      updateBalance()             Updates the MyMav            MyMav Card,                N/A
                                  card balance on              purchase amount
                                  MyMav database.
      getConfirmationNum()        Generates a                  N/A                        Confirmation number
                                  confirmation number
                                  for the current
                                  transaction.
      Main()                      Receives the data over   None                           None
                                  the network connection
                                  and sends the data back.
                                  Calls all validate to
                                  process card.


      3.12.1.3         Component Producer Interfaces
      IP Stack Services                     Creates data packets to be sent to   Invoice Object
                                            the MVM management
                                            subsystem from the MyMav
                                            Card Processing Module.
18 April 2011 @ 11:07:00 AM                  51                  Component Design
Senior Design Documentation Library                                             University Of Texas At Arlington
      Database Services                      Creates SQL queries that will be   SQL query commands
                                             retrieved from the MyMav
                                             Database.


      3.12.1.4       Component Consumer Interfaces
      Name                                   Description                        Data Consumed
      IP Stack Services                      Receives data from the MVM         Payment object
                                             management module to process a
                                             MyMav student card.
      Database Services                      Receives SQL query results from    SQL query results
                                             the MyMav Database.


      3.12.1.5       Component Data Structures
      Credit Card Object { String studentID
                             Float balance
                             Int active }
      Invoice Message Object{
             Boolean approved;
             String invoiceNumber; }

      3.12.1.6       Component Pseudo Code
      validateCard(payment)
         MyMavCard mavCard = new MyMavCard( payment.getCardNumber() ); //get info from payment
         InvoiceMessage invoice = new InvoiceMessage();                               //object
         cardNumber = mavCard.getStudentID();
         results = statement.executeQuery(
                       “SELECT Balance, Active FROM MyMavCard
                          WHERE StudentID = cardNumber” );


         //Save card information to MyMavCard object


         if ( (results ! = null) && (active) )
              invoice.approved = true;
              invoice = processTransaction( mavCard, purchaseAmount, invoice);
              return invoice;

18 April 2011 @ 11:07:00 AM                      52              Component Design
Senior Design Documentation Library                                           University Of Texas At Arlington
         else
              invoice.approved = false
              return invoice;


      processTransaction( mavCard, amout, invoice )
         balance = mavCard.getBalance();
         newBalance = balance + amount;
         updateBalance( mavCard, newBalance);
         invoice.invoiceNumber = getConfirmationNumber();
         return invoice //transaction successful


      Function main()
             Payment payment = ipConnection.receive();
             InvoiceMessage invoice = validateCard(payment)
             ipConnection.send(invoice)



3.13 Subsystem Modules: Database Services
3.13.1 Component Design Details: SQL Server Services

      3.13.1.1       General Component Description
      Microsoft SQL Server will be used for our database services. SQL Server will connect all parts of our
      system to the following databases: Credit Database, MyMav Database, and MVM Database. It will be
      used to retrieve the necessary data from the respective database. SQL server will also provide the
      necessary facilities to update any of the required databases.

      3.13.1.2       Credit Database
      The Credit Database will store a table that will contain credit cards. The table will contain the following
      information:
      Table Name: CreditCard
      Card Number       Expiration Date First Name             Last Name       Balance           Max Balance

      3.13.1.3       MyMav Database
      The MyMav Database will store a table that will contain the MyMav student cards. The table will
      contain the following information:
      Table Name: MyMavCard
      Student ID            First Name             Last Name            Balance               Active


18 April 2011 @ 11:07:00 AM                 53                   Component Design
Senior Design Documentation Library                                          University Of Texas At Arlington
      3.13.1.4     MVM Database
      The MVM Database will be the host database of the vending machine and the administrative website. It
      will contain all the information required to manage admins, field agents, products, vending machines,
      etc. The following tables will be in the MVM Database:
      Table Name: Agent
      First        Last Name Password          ID          Phone        Email         SuperID      Type
      Name
      Table Name: Product
      ID                  Image                 Name                 Price                Description
      Table Name: Transaction
      VM_ID               ProductID             Cost                ConferenceNumber       DateTime
      Table Name: Vending Machine
      Name          ID            Location          ServiceDate    Total Sales    VMStatus       AgentID
      Table Name: VMProducts
      Product ID          VM_ID                CurrentQuantity       MaxQuantity           SlotNumber

      3.13.1.5      Component Producer Interfaces
      Name                              Description                          Data Produced
      Credit Card Processing            Sends SQL results to the Credit      SQL query results
                                        Card Processing module for
                                        further use.
      MyMav Card Processing             Sends SQL query results to the       SQL query results
                                        MyMav Card Processing module
                                        for further use.
      IP Stack Services                 Sends SQL query results to the       SQL query results
                                        MVM management subsystem
                                        through the IP stack services for
                                        further use.
      Credit Database                   Updates database                     SQL update command
      MyMav Database                    Updates database                     SQL update command
      MVM Database                      Updates database                     SQL update command

      3.13.1.6      Component Consumer Interfaces
      Name                              Description                          Data Consumed
      Credit Card Processing            Credit Card Processing Sends         SQL query commands
                                        SQL query commands.
      MyMav Card Processing             MyMav Card Processing Sends          SQL query commands
                                        SQL query commands.


18 April 2011 @ 11:07:00 AM               54                  Component Design
Senior Design Documentation Library                                      University Of Texas At Arlington
      IP Stack Services                  MVM management sends SQL        SQL query commands
                                         query commands through the IP
                                         Stack Services
      Credit Database                    SQL query results               SQL queries
      MyMav Database                     SQL query results               SQL queries
      MVM Database                       SQL query results               SQL queries

      3.13.1.7        Component Pseudo Code
      Create Product Table
      USE [mvmadmin]
      GO
      /****** Object: Table [mavending].[Product] Script Date: 03/07/2011 15:05:07 ******/
      SET ANSI_NULLS ON
      GO
      SET QUOTED_IDENTIFIER ON
      GO
      CREATE TABLE [mavending].[Product](
              [ID] [nchar](10) NOT NULL,
              [Image] [image] NULL,
              [Name] [nchar](30) NULL,
              [Price] [money] NULL,
              [Description] [nchar](150) NULL
      ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
      GO
      Drop Product Table
      USE [mvmadmin]
      GO
      /****** Object: Table [mavending].[Product] Script Date: 03/07/2011 15:06:31 ******/
      IF EXISTS (SELECT * FROM sys.objects WHERE object_id =
      OBJECT_ID(N'[mavending].[Product]') AND type in (N'U'))
      DROP TABLE [mavending].[Product]
      GO
      Select To Product Table
      SELECT [ID]
           ,[Image]


18 April 2011 @ 11:07:00 AM               55                 Component Design
Senior Design Documentation Library                             University Of Texas At Arlington
         ,[Name]
           ,[Price]
           ,[Description]
       FROM [mvmadmin].[mavending].[Product]
      GO
      Insert To Product Table
      INSERT INTO [mvmadmin].[mavending].[Product]
              ([ID]
              ,[Image]
              ,[Name]
              ,[Price]
              ,[Description])
         VALUES
              (<ID, nchar(10),>
              ,<Image, image,>
              ,<Name, nchar(30),>
              ,<Price, money,>
              ,<Description, nchar(150),>)
      GO



3.14 Subsystem Modules: Webpage Layout and Mappings
3.14.1 Component Design Details: Site Template




18 April 2011 @ 11:07:00 AM                  56      Component Design
Senior Design Documentation Library                                           University Of Texas At Arlington
      3.14.1.1     General Component Description
      Site Template is a base layout for every page on the website. Upon the creation of a new page, that page
      will inherit the basic layout designed in the Site Template.

      3.14.1.2          Component Functions
      N/A

      3.14.1.3          Component Producer Interfaces
      N/A

      3.14.1.4          Component Consumer Interfaces
      N/A

      3.14.1.5          Component Data Structures
      N/A

      3.14.1.6          Component Pseudo-code
      <%@ Page Language="C#" AutoEventWireup="true" CodeFile="template.aspx.cs" Inherits="template" %>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">
      <head runat="server">
      <meta http-equiv="content-type" content="text/html; charset=utf-8" />
            <title>Maverick Vending Solutions: </title>
      <meta name="description" content="" />
      <meta name="keywords" content="" />
      <link href="style.css" rel="stylesheet" type="text/css" />
      </head>
      <body>
      <form id="form1" runat="server">
      <div id="header">
               <div id="logo">
                        <h1><span><a href="#">Maverick Vending Solutions</a></span></h1>
               </div>
               <div id="menu">
                        <ul>
                                <li class="first"><a href="Default.aspx">Home</a></li>
                                <li><a href="About.aspx">About</a></li>
                                <li><a href="Contact.aspx">Contact</a></li>
                    <li><asp:LoginStatus ID="LoginStatus1" runat="server" /></li>
                        </ul>
               </div>

18 April 2011 @ 11:07:00 AM                  57                Component Design
Senior Design Documentation Library                                         University Of Texas At Arlington
      </div>
      <div id="headershadow"><a href="Default.aspx"><img src="images/header-picture.jpg" alt=""
      width="877" height="150" /></a></div>
      <div id="content">
               <div id="maincontent">
                        <h2>Main Content</h2>
               </div>
               <div id="sidebar">
                        <p></p>
                        <h3>Services</h3>
                        <ul>
                    <asp:LoginView ID="LoginView1" runat="server">
                          <LoggedInTemplate>
                                <asp:HyperLink ID="HyperLink1" runat="server"
                                    NavigateUrl="~/AdminPages/VMDetails.aspx">Vending
                                    Machines</asp:HyperLink>
                                <br />
                                <asp:HyperLink ID="HyperLink3" runat="server"
                                    NavigateUrl="~/AdminPages/CreateNewWizard.aspx">Create New
                                    User</asp:HyperLink>
                                <br />
                                <asp:HyperLink ID="HyperLink4" runat="server"
                                    NavigateUrl="~/AdminPages/ManageUsers.aspx">Manage
                                    Users</asp:HyperLink>
                                    <br />
                                <asp:HyperLink ID="HyperLink5" runat="server"
                                    NavigateUrl="~/FAPages/FADetails.aspx">Field
                                    Agents</asp:HyperLink>
                                    <br />
                          <asp:HyperLink ID="HyperLink6" runat="server"
      NavigateUrl="~/FAPages/Products.aspx">Products</asp:HyperLink>
                                    <br />
                                <asp:HyperLink ID="HyperLink7" runat="server"
                                    NavigateUrl="~/FAPages/ManageVMProducts.aspx">Manage VM
                                    Products</asp:HyperLink>
                                    <br />
                          <asp:HyperLink ID="HyperLink8" runat="server"
      NavigateUrl="~/FAPages/Profile.aspx">Profile</asp:HyperLink>
                          </LoggedInTemplate>
                    </asp:LoginView>
                        </ul>

18 April 2011 @ 11:07:00 AM                    58              Component Design
Senior Design Documentation Library                                            University Of Texas At Arlington
                  </div>
                  <div style="clear: both;">&nbsp;</div>
         </div>
         <div id="footer">
                  <p>
                           &copy; 2011 MaverickVendingSolutions.com
                  </p>
         </div>
         </form>
         </body>
         </html>




3.14.2 Component Design Details: CSS

         3.14.2.1          General Component Description
         We are using Cascading Style Sheets (CSS) to control the look and feel of our website. The Site
         Template module, and every page created based on the Site Template, inherits all the look and feel
         attributes of the CSS module.

         3.14.2.2          Component Functions
         N/A

         3.14.2.3          Component Producer Interfaces
         N/A

         3.14.2.4          Component Consumer Interfaces
           Component Name                  Description            Data Consumed
         IP Stack Services           Request over the web to   CSS commands
                                     the CSS url.

         3.14.2.5          Component Data Structures
         N/A

         3.14.2.6          Component Pseudo-code
* {
         font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}

body {
         margin: 10px 0;
         padding: 0;
         background: #EFEFEF;
         font-size: 13px;


18 April 2011 @ 11:07:00 AM                    59               Component Design
Senior Design Documentation Library                                 University Of Texas At Arlington
        color: #6B6B6B;
}

a {
        color: #3467b4;
}

a:hover {
       text-decoration: none;
}

img {
        border: none;
}

h1, h2, h3, h4, h5, h6 {
       margin: 0;
       padding: 0;
       font-weight: normal;
       color: #000000;
}

h2 {
        margin-bottom: 10px;
        border-bottom: 1px solid #F4F4F4;
        font-size: 26px;
}

h3 {
        margin-bottom: 15px;
        padding-bottom: 5px;
        font-size: 16px;
        border-bottom: 1px solid #F4F4F4;
}

p, ol, ul, blockquote {
       line-height: 24px;
}

ul {
        margin-left: 0;
        padding-left: 0;
        list-style: none;
}


#header {
       width: 917px;
       height: 115px;
       margin: 0 auto;
       background: url(images/topmiddle.gif) repeat-x;
}

#logo {
       float: left;
       height: 115px;
       padding: 0 0 0 0;
       background: url(images/topleft.gif) no-repeat;
}

#logo * {

18 April 2011 @ 11:07:00 AM                 60           Component Design
Senior Design Documentation Library                                  University Of Texas At Arlington
      text-decoration: none;
}

#logo h1 {
       float: left;
       padding: 50px 0 0 40px;
       font-size: 36px;
}

#logo h1 a {
       color: #000000;
}

#logo h1 span a {
       font-weight: bold;
       color: #33578d;
}

#logo h2 {
       float: left;
       padding: 72px 0 0 8px;
       font-size: 12px;
       border: none;
}

#logo h2 a {
       color: #B4B4B4;
}

/* Menu */

#menu {
       float: right;
       height: 45px;
       padding: 70px 22px 0 0;
       background: url(images/topright.gif) no-repeat right top;
}

#menu ul {
       margin: 0;
       padding: 0;
       list-style: none;
}

#menu li {
       display: inline;
}

#menu a {
       padding: 0 15px 0 15px;
       border-left: 1px solid #DBDBDB;
       text-transform: uppercase;
       text-decoration: none;
       font-size: 13px;
       color: #3B3B3B;
}

#menu a:hover {
       background: #4c6488;
       color: #ffffff;
       text-decoration: none;

18 April 2011 @ 11:07:00 AM              61               Component Design
Senior Design Documentation Library                                     University Of Texas At Arlington
}

#menu .first a {
       border: none;
}


#headershadow {
       width: 877px;
       height: 170px;
       margin: 0 auto;
       background: url(images/headershadow.gif) repeat-x left bottom;
       border-right: 20px solid #FFFFFF;
       border-left: 20px solid #FFFFFF;
}

/* Content */

#content {
       width: 847px;
       margin: 0 auto;
       padding: 10px 35px 0 35px;
       background: #FFFFFF url(images/bottom.gif) no-repeat left bottom;
}

#maincontent {
       float: left;
       width: 620px;
}

#sidebar {
       float: right;
       width: 185px;
       padding: 5px 0 0 0;
}

/* Footer */

#footer {
}

#footer p {
       text-align: center;
       color: #777777;
}

#footer a {
       color: #5D5D5D;
}




18 April 2011 @ 11:07:00 AM              62               Component Design
 Senior Design Documentation Library                                       University Of Texas At Arlington
3.14.3 Component Design Details: About




      3.14.3.1      General Component Description
      The About module gives the user/viewer a brief description of the team behind MVM and a little bit
      about the project as a whole. It is a static web page.

      3.14.3.2      Component Functions
      N/A

      3.14.3.3      Component Producer Interfaces
      N/A

      3.14.3.4      Component Consumer Interfaces
         Component Name               Description              Data Consumed
      IP Stack Services        XHTML request over the       HTML requests.
                               internet or local network.

      3.14.3.5      Component Data Structures
      N/A

      3.14.3.6      Component Pseudo-code
<div id="maincontent">
              <h2>About Team Pegasus</h2>

        <p>We provide full service Maverick Vending Machine[MVM] management
        solutions.</p>

18 April 2011 @ 11:07:00 AM                 63               Component Design
Senior Design Documentation Library                                         University Of Texas At Arlington
          <p>Team Pegasus takes care of all the MVM services from start to finish.
           From our machine installations to refills
           and repairs, they are all performed by our certified team of service Field
           Agents.</p>

          <p>Team Pegasus members include Essa Haddad, Luis Hernandez, Michael Jacobsen,
          Jay Rektorik, and Lisa Xiong.</p>

</div>



3.14.4 Component Design Details: Contact




         3.14.4.1      General Component Description
         The Contact module gives the user/viewer a method to contact the team behind MVM. Note, this is
         dummy contact data to serve as filler. It is a static web page.

         3.14.4.2      Component Functions
         N/A

         3.14.4.3      Component Producer Interfaces
         N/A

         3.14.4.4      Component Consumer Interfaces
           Component Name                Description              Data Consumed
         IP Stack Services        XHTML request over the       HTML requests.
                                  internet or local network.

18 April 2011 @ 11:07:00 AM                 64                  Component Design
Senior Design Documentation Library                                             University Of Texas At Arlington
      3.14.4.5     Component Data Structures
         N/A

         3.14.4.6       Component Pseudo-code
<div id="maincontent">
       <h2>Contact Us</h2>

          <h3>By Phone</h3>
          <p>1-888-MVS-1127<br />
          24 Hours a day</p>

          <h3>By Mail</h3>
          <p>MVS Customer Service<br />
          1234 Pegasus Drive<br />
          Arlington, TX 76019</p>

</div>



3.14.5 Component Design Details: Default




         3.14.5.1       General Component Description
         Default module is the home page of the web application. The user starts here and receives a welcoming
         invitation. From here the user can user the following links: About, Contact, and Login. If the user is not
         logged in, a message is displayed above the Services title that the user has not logged in.

         3.14.5.2       Component Functions
         N/A

         3.14.5.3       Component Producer Interfaces
         N/A

18 April 2011 @ 11:07:00 AM                   65                 Component Design
Senior Design Documentation Library                                         University Of Texas At Arlington
      3.14.5.4     Component Consumer Interfaces
           Component Name                Description              Data Consumed
         IP Stack Services        XHTML request over the       HTML requests.
                                  internet or local network.

         3.14.5.5      Component Data Structures
         N/A

         3.14.5.6      Component Pseudo-code
<div id="maincontent">
               <h2>
             What are you waiting for...</h2>
        <ul>
             <li>Be your own boss!</li>
             <li>Take your business to the next level!</li>
             <li>Secure your financial future, partner with a Vending Solutions Company
                 That cares about you!</li>
             <li>Call NOW 1-888-MVS-1127</li>
        </ul>

</div>

               <asp:LoginView ID="LoginView2" runat="server">
                   <AnonymousTemplate>
                       You are not logged in. Click the Login link to sign in.
                   </AnonymousTemplate>
                   <LoggedInTemplate>
                       You are logged in. Welcome, <asp:LoginName ID="LoginName1"
                       runat="server" />
                   </LoggedInTemplate>
               </asp:LoginView>




18 April 2011 @ 11:07:00 AM                 66                  Component Design
Senior Design Documentation Library                                          University Of Texas At Arlington
3.15 Subsystem Modules: Admin Web Controls
3.15.1 Component Design Details: Login




      3.15.1.1       General Component Description
      Login allows a user to login to the web application as either an Admin or a Field Agent. The user does
      not have to specify their role, as that is stored in the membership database. This module also validates
      the input entered into the User Name text box as well as the Password text box.

      3.15.1.2       Component Functions


          Function Name                 Description              Data Required             Data Returned
      Login()                     Displays login form to    Valid user name and        Confirmation text that
                                  user.                     password.                  user has logged in.
      ValidationSummary()         Checks for valid user     Text entered by user.      No text returned if data
                                  name and password.                                   is valid. Text returned
                                                                                       informing which field is
                                                                                       invalid.

      3.15.1.3       Component Producer Interfaces
        Component Name                 Description              Data Consumed
      IP Stack Services         HTML response with           Mouse click event.
                                confirmation text that
                                user has logged in.

      3.15.1.4       Component Consumer Interfaces
        Component Name                 Description              Data Consumed

18 April 2011 @ 11:07:00 AM                67                 Component Design
Senior Design Documentation Library                                          University Of Texas At Arlington
      Database Services        Data validation of          HTML request for
                               membership login.           login.

      3.15.1.5      Component Data Structures
      N/A

      3.15.1.6      Component Pseudo-code
      <div id="maincontent">
              <h2>Please Login</h2>
       <p>
            <asp:Login ID="Login1" runat="server">
            </asp:Login>
       </p>
       <asp:ValidationSummary ID="ValidationSummary1" runat="server"
            ValidationGroup="Login1" />
       <p>
            <br />
       </p>

      </div>



3.15.2 Component Design Details: Change Password




      3.15.2.1      General Component Description
      This module allows a logged in user to change/update their password.

      3.15.2.2      Component Functions


18 April 2011 @ 11:07:00 AM               68                Component Design
Senior Design Documentation Library                                          University Of Texas At Arlington
               Function Name               Description              Data Required          Data Returned
      ChangePassword                  Calls the Change          User must enter         Text that password
                                      Password web form.        current password, new   has been successfully
                                                                password, and new       changed.
                                                                password
                                                                confirmation.
      CancelDestinationPageURL        If a user cancels the     Button click event.     Page Load
                                      change password
                                      request, Default page
                                      of web application is
                                      loaded.
      ContinueDestinationPageURL Upon continuing,               Button click event.     Page Load
                                 Default page of web
                                 application is loaded.


      3.15.2.3       Component Producer Interfaces
        Component Name                Description                Data Consumed
      IP Stack Services        XHTML request over the         HTML requests.
                               internet or local network.
      Database Services        SQL Query to change            User input from the
                               password.                      web form.

      3.15.2.4       Component Consumer Interfaces
        Component Name                Description                Data Consumed
      IP Stack Services        XHTML request over the         HTML requests.
                               internet or local network.
      Database Services        Data validation of             HTML request for
                               existing password.             change user password.

      3.15.2.5       Component Data Structures
      N/A

      3.15.2.6       Component Pseudo-code
      <div id="maincontent">
              <h2>Change Password</h2>
       <p>
            <asp:ChangePassword ID="ChangePassword1" runat="server"
                CancelDestinationPageUrl="~/Default.aspx"
                ContinueDestinationPageUrl="~/Default.aspx">
            </asp:ChangePassword>
       </p>

      </div>



18 April 2011 @ 11:07:00 AM               69                   Component Design
Senior Design Documentation Library                                          University Of Texas At Arlington


3.15.3 Component Design Details: Profile

      3.15.3.1       General Component Description
      Profile module allows a logged in user to view information regarding their membership. From here,
      users can see their name, change their password, update their email address, and view their role in the
      system, either Admin or Field Agent.

      3.15.3.2       Component Functions


            Function Name               Description               Data Required             Data Returned
      getUserProfile()           Returns the users            User must be logged in   Name, ID, Password,
                                 profile. Data elements       to see their profile.    Security Question
                                 are predefined and
                                 cannot be modified.

      3.15.3.3       Component Producer Interfaces
      N/A

      3.15.3.4       Component Consumer Interfaces


          Component Name                Description              Data Consumed
      IP Stack Services          XHTML request over the       HTML requests.
                                 internet or local network.
      Database Services          SQL query for                HTML request for user
                                 membership information       profile.

      3.15.3.5       Component Data Structures
      N/A

      3.15.3.6       Component Pseudo-code
      getUserProfile()
      {
              displayUserName();
              displayUserID();
              displayUserEmail();
              displayUserSecurityQuestion();
              changeUserSecurityQuestion();
              changeUserPassword();
      }

18 April 2011 @ 11:07:00 AM                70                  Component Design
 Senior Design Documentation Library                                   University Of Texas At Arlington
3.15.4 Component Design Details: Create New Wizard




      3.15.4.1     General Component Description

      3.15.4.2     Component Functions


            Function Name                Description          Data Required            Data Returned
      CreateUserWizard()            Wizard that allows     User Name (char),       Sets appropriate data
                                    and Admin to add a     Password (char), E-     in the membership
                                    new user to the MVM    mail (char), Security   database.
                                    web application.       Question (char), and
                                                           Security Answer
                                                           (char)
      ContinueDestinationPageUrl() User is sent            Mouse Click Event       Page Load
      Onactivestepchanged()         Wizard has three       N/A                     N/A
                                    steps: createNew,
                                    specifyRole, and
                                    Complete. Called
                                    when a user changes
                                    steps.
      LoginCreatedUser()            Option to log in the   boolean                 N/A
                                    newly created user.
                                    For our system, option
                                    is set to false.
      SpecifyRoleStep()             Allows the Admin to    Check box (Mouse        Sets role in the

18 April 2011 @ 11:07:00 AM             71                Component Design
Senior Design Documentation Library                                        University Of Texas At Arlington
                                      specify either a new  click event)              membership database.
                                      Admin or Field Agent.
      CompleteWizardStep()            Create User Wizard is    N/A                   Confirmation text
                                      complete and                                   displayed to user.
                                      confirmation is
                                      displayed to user.

      3.15.4.3      Component Producer Interfaces


        Component Name                Description               Data Produced
      IP Stack Services       XHTML request over the       HTML requests.
                              internet or local network.
      Database Services       SQL Insert Query             Username, Password,
                                                           Security Question,
                                                           Security Answer, E-
                                                           mail

      3.15.4.4      Component Consumer Interfaces


        Component Name                Description              Data Consumed
      IP Stack Services       XHTML request over the       HTML requests.
                              internet or local network.

      3.15.4.5      Component Data Structures

      3.15.4.6      Component Pseudo-code
      <div id="maincontent">
              <h2>Create New User</h2>
       <p>
            <asp:CreateUserWizard ID="CreateUserWizard1" runat="server"
                ContinueDestinationPageUrl="~/Default.aspx"
                onactivestepchanged="CreateUserWizard1_ActivateStepChanged"
                LoginCreatedUser="False">
                <WizardSteps>
                    <asp:CreateUserWizardStep runat="server" Title="" />
                    <asp:WizardStep runat="server" Title="Select User Role"
                        ID="SpecifyRoleStep" AllowReturn="False" StepType="Step">
                        <asp:CheckBoxList ID="RoleList" runat="server">
                        </asp:CheckBoxList>
                    </asp:WizardStep>
                    <asp:CompleteWizardStep runat="server" />
                </WizardSteps>
            </asp:CreateUserWizard>
       </p>

      </div>




18 April 2011 @ 11:07:00 AM               72                  Component Design
 Senior Design Documentation Library                                   University Of Texas At Arlington
3.15.5 Component Design Details: Manage Users




      3.15.5.1      General Component Description

      3.15.5.2      Component Functions


          Function Name             Description             Data Required            Data Returned
      GridView()              View that displays user   User must be logged in   Returns Email, UserID,
                              data.                     as an Admin              Password Question,
                                                                                 Create Date,
                                                                                 UserName, and Last
                                                                                 Activity Date of all
                                                                                 users in the MVM web
                                                                                 application.
      ConnectionString()      Allows the view to     SQL Select Query (see       Returns membership
                              connect to the         below)                      data.
                              appropriate membership
                              database to retrieve
                              table date.
      SelectCommand()         Select SQL Query          SQL Query                Returns what is
                                                                                 selected.
18 April 2011 @ 11:07:00 AM            73                Component Design
Senior Design Documentation Library                                     University Of Texas At Arlington
      UpdateCommand()          Updates selected row.       SQL Query             Returns updated
                                                                                 membership
                                                                                 information.
      DeleteCommand()          Delete selected row.        SQL Query             N/A

      3.15.5.3      Component Producer Interfaces
        Component Name                Description             Data Consumed
      IP Stack Services       XHTML request over the       HTML requests.
                              internet or local network.
      Database Services       SQL query to update or       SQL Query
                              delete rows from
                              membership database.

      3.15.5.4      Component Consumer Interfaces
        Component Name                Description             Data Consumed
      IP Stack Services       XHTML request over the       HTML requests.
                              internet or local network.
      Database Services       SQL query to populate        SQL Query
                              the Gridview as well as
                              any updated rows.

      3.15.5.5      Component Data Structures
      N/A

      3.15.5.6      Component Pseudo-code
      <div id="maincontent">
             <h2>Manage Users</h2>
       <p>
           <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
               DataKeyNames="UserId" DataSourceID="mvmlogin"
                EnableModelValidation="True">
               <Columns>
                   <asp:BoundField DataField="Email" HeaderText="Email"
                    SortExpression="Email" />
                   <asp:BoundField DataField="UserId" HeaderText="UserId"
                    ReadOnly="True"
                       SortExpression="UserId" />
                   <asp:BoundField DataField="PasswordQuestion"
                    HeaderText="PasswordQuestion"
                       SortExpression="PasswordQuestion" />
                   <asp:BoundField DataField="CreateDate" HeaderText="CreateDate"
                       SortExpression="CreateDate" />
                   <asp:BoundField DataField="UserName" HeaderText="UserName"
                       SortExpression="UserName" />
                   <asp:BoundField DataField="LastActivityDate"
                    HeaderText="LastActivityDate"
                       SortExpression="LastActivityDate" />
                   <asp:CommandField ButtonType="Button" ShowDeleteButton="True"
                       ShowEditButton="True" ShowSelectButton="True" />

18 April 2011 @ 11:07:00 AM              74                 Component Design
Senior Design Documentation Library                                      University Of Texas At Arlington
                  </Columns>
              </asp:GridView>
              <asp:SqlDataSource ID="mvmlogin" runat="server"
                  ConnectionString="<%$ ConnectionStrings:mvmloginConnectionString %>"
                  SelectCommand="SELECT [Email], [UserId], [PasswordQuestion],
                  [CreateDate], [UserName], [LastActivityDate] FROM
                  [vw_aspnet_MembershipUsers]">

                <pseudo code>
                SQL DELETE
                SQL Update
                <pseudo code/>
              </asp:SqlDataSource>
       </p>

      </div>



3.15.6 Component Design Details: Vending Machine Details




18 April 2011 @ 11:07:00 AM                75               Component Design
Senior Design Documentation Library                                        University Of Texas At Arlington
      3.15.6.1     General Component Description

      3.15.6.2        Component Functions


          Function Name               Description               Data Required              Data Returned
      GridView()                View that displays          User must be logged in   Returns ID, Location
                                Vending Machine data.       as an Admin              ID, Agent_ID, Service
                                                                                     Date, Total Sales, VM
                                                                                     Status.
      SQLDataSource()           Allows the view to          SQL Select Query (see    Returns vending
                                connect to the              below)                   machine data.
                                appropriate mvmadmin
                                database table.
      DetailsView()             View that displays more SQL Select Query (see        Returns vending
                                VM data that is         below)                       machine data.
                                editable.
      SelectCommand()           Select SQL Query            SQL Query                Returns what is
                                                                                     selected.
      DeleteCommand()           Deletes selected row.       SQL Query                N/A
      UpdateCommand()           Updates selected row.       SQL Query                Returns updated
                                                                                     vending machine data.

      3.15.6.3        Component Producer Interfaces


        Component Name                Description               Data Produced
      IP Stack Services        XHTML request over the       HTML requests.
                               internet or local network.
      Database Services        SQL query to update or       SQL Query
                               delete rows from
                               mvmadmin database.

      3.15.6.4        Component Consumer Interfaces


        Component Name                Description              Data Consumed
      IP Stack Services        XHTML request over the       HTML requests.
                               internet or local network.
      Database Services        SQL query to populate        SQL Query
                               the Gridview,
                               DetailsView as well as
                               any updated rows.



18 April 2011 @ 11:07:00 AM              76                  Component Design
Senior Design Documentation Library                                       University Of Texas At Arlington
      3.15.6.5     Component Data Structures

      3.15.6.6         Component Pseudo-code
<div id="content">
       <div id="maincontent">
               <h2>Vending Machines</h2>
        <table>
        <tr>
        <td>
             <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
                 DataSourceID="mvmadmin" AllowSorting="True" AllowPaging="True">
                 <Columns>
                     <asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID" />
                     <asp:BoundField DataField="Location" HeaderText="Location"
                         SortExpression="Location" />
                     <asp:BoundField DataField="Agent_ID" HeaderText="Agent_ID"
                         SortExpression="Agent_ID" />
                     <asp:CommandField ButtonType="Button" ShowSelectButton="True" />
                 </Columns>
             </asp:GridView>
             <asp:SqlDataSource ID="mvmadmin" runat="server"
                 ConnectionString="<%$ ConnectionStrings:mvmadminConnectionString %>"

                SelectCommand="SELECT [ID], [Location], [Agent_ID], [Name],
               [ServiceDate], [TotalSales], [VMStatus] FROM [Vending Machine]">
            </asp:SqlDataSource>
        </td>

        <td>
               <asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="125px"
                   AutoGenerateRows="False" DataSourceID="mvmadmin1"
                   EnableModelValidation="True"
                   OnItemDeleted="DetailsView1_ItemDeleted"
                   OnItemDeleting="DetailsView1_ItemDeleting"
                   OnItemInserted="DetailsView1_ItemInserted"
                   OnItemUpdated="DetailsView1_ItemUpdated">
                   <Fields>
                       <asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID" />
                       <asp:BoundField DataField="Location" HeaderText="Location"
                           SortExpression="Location" />
                       <asp:BoundField DataField="ServiceDate" HeaderText="ServiceDate"
                           SortExpression="ServiceDate" />
                       <asp:BoundField DataField="TotalSales" HeaderText="TotalSales"
                           SortExpression="TotalSales" />
                       <asp:BoundField DataField="VMStatus" HeaderText="VMStatus"
                           SortExpression="VMStatus" />
                       <asp:BoundField DataField="Agent_ID" HeaderText="Agent_ID"
                           SortExpression="Agent_ID" />
                   </Fields>
               </asp:DetailsView>

               <asp:SqlDataSource ID="mvmadmin1" runat="server"
                   ConflictDetection="CompareAllValues"
                   ConnectionString="<%$ ConnectionStrings:mvmadminConnectionString %>"
                   OldValuesParameterFormatString="original_{0}"
                   SelectCommand="SELECT [ID], [Location], [ServiceDate], [TotalSales],
                   [VMStatus], [Agent_ID] FROM [Vending Machine]"

                <pseudo code>
                SQL DELETE

18 April 2011 @ 11:07:00 AM                 77               Component Design
Senior Design Documentation Library                                         University Of Texas At Arlington
             SQL Update
             <pseudo code/>
                >
           </asp:SqlDataSource>
       </td>
       </tr>
       </table>
      </div>



3.15.7 Component Design Details: Manage Vending Machine Products

      3.15.7.1        General Component Description

      3.15.7.2        Component Functions


          Function Name               Description               Data Required              Data Returned
      GridView()               View that displays           User must be logged in   Returns ID, Location
                               Vending Machine              as an Admin              ID, Agent_ID, Service
                               procuts.                                              Date, Total Sales, VM
                                                                                     Status, product_ID,
                                                                                     Current Qty, Max Qty.
      SQLDataSource()          Allows the view to           SQL Select Query (see    Returns vending
                               connect to the               below)                   machine product data.
                               appropriate mvmadmin
                               database table.
      DetailsView()            View that displays more      SQL Select Query (see    Returns vending
                               VM product data that is      below)                   machine product data.
                               editable.
      SelectCommand()          Select SQL Query             SQL Query                Returns what is
                                                                                     selected.
      DeleteCommand()          Deletes selected row.        SQL Query                N/A
      UpdateCommand()          Updates selected row.        SQL Query                Returns updated
                                                                                     vending machine data.

      3.15.7.3        Component Producer Interfaces


        Component Name                Description               Data Produced
      IP Stack Services        XHTML request over the       HTML requests.
                               internet or local network.
      Database Services        SQL query to update or       SQL Query
                               delete rows from
                               mvmadmin database.



18 April 2011 @ 11:07:00 AM              78                   Component Design
Senior Design Documentation Library                                        University Of Texas At Arlington
      3.15.7.4     Component Consumer Interfaces


        Component Name               Description               Data Consumed
      IP Stack Services       XHTML request over the       HTML requests.
                              internet or local network.
      Database Services       SQL query to populate        SQL Query
                              the Gridview,
                              DetailsView as well as
                              any updated rows.

      3.15.7.5      Component Data Structures

      3.15.7.6      Component Pseudo-code


3.15.8 Component Design Details: Products




      3.15.8.1      General Component Description

      3.15.8.2      Component Functions


          Function Name             Description                Data Required            Data Returned
      GridView()              View that displays user      User must be logged in   Returns Name, ID,
                              data.                        as an Admin              Price, Description


18 April 2011 @ 11:07:00 AM             79                   Component Design
Senior Design Documentation Library                                       University Of Texas At Arlington
      ConnectionString()      Allows the view to           SQL Select Query (see   Returns product data.
                              connect to the               below)
                              appropriate membership
                              database to retrieve
                              table date.
      SelectCommand()         Select SQL Query             SQL Query               Returns what is
                                                                                   selected.
      UpdateCommand()         Updates selected row.        SQL Query               Returns updated
                                                                                   membership
                                                                                   information.
      DeleteCommand()         Delete selected row.         SQL Query               N/A

      3.15.8.3      Component Producer Interfaces


        Component Name                Description              Data Produced
      IP Stack Services       XHTML request over the       HTML requests.
                              internet or local network.
      Database Services       SQL query to update or       SQL Query
                              delete rows from
                              mvmadmin database.

      3.15.8.4      Component Consumer Interfaces


        Component Name                Description              Data Consumed
      IP Stack Services       XHTML request over the       HTML requests.
                              internet or local network.
      Database Services       SQL query to populate        SQL Query
                              the Gridview as well as
                              any updated rows.

      3.15.8.5      Component Data Structures

      3.15.8.6      Component Pseudo-code
      <div id="maincontent">
             <h2>Products</h2>
       <p>
           <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
               DataSourceID="mvmadmin"
               OnRowDeleted="GridView1_RowDeleted"
               OnRowUpdated="GridView1_RowUpdated">
               <Columns>
                   <asp:BoundField DataField="Name" HeaderText="Name"
                    SortExpression="Name" />
                   <asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID" />
                   <asp:BoundField DataField="Price" HeaderText="Price"
                    SortExpression="Price" />

18 April 2011 @ 11:07:00 AM              80                  Component Design
Senior Design Documentation Library                                      University Of Texas At Arlington
                      <asp:BoundField DataField="Description" HeaderText="Description"
                          SortExpression="Description" />
                      <asp:CommandField ButtonType="Button" HeaderText="Edit Product"
                          ShowEditButton="True" ShowHeader="True" CausesValidation="False"
                       />
                      <asp:CommandField ButtonType="Button" HeaderText="Remove Product from
                       Database" ShowDeleteButton="True" ShowHeader="True"
                       CausesValidation="False" />
                  </Columns>
              </asp:GridView>
              <asp:SqlDataSource ID="mvmadmin" runat="server"
                  ConflictDetection="CompareAllValues"
                  ConnectionString="<%$ ConnectionStrings:mvmadminConnectionString %>"
                  OldValuesParameterFormatString="original_{0}"
                  SelectCommand="SELECT [Name], [ID], [Price], [Description] FROM
                                [Product]"
                  DeleteCommand="DELETE FROM [Product]
                      WHERE   [Name] = @original_Name
                      AND     [ID] = @original_ID
                      AND     [Price] = @original_Price
                      AND     [Description] = @original_Description"
                  UpdateCommand="UPDATE [Product] SET [Price] = @Price, [Description] =
                                @Description
                      WHERE   [Name] = @original_Name
                      AND     [ID] = @original_ID
                      AND     [Price] = @original_Price
                      AND     [Description] = @original_Description"
                  InsertCommand="INSERT INTO [Product]
                      ([Name], [ID], [Price], [Description])
                      VALUES (@Name, @ID, @Price, @Description)">
                  <DeleteParameters>
                      <asp:Parameter Name="original_Name" />
                      <asp:Parameter Name="original_ID" />
                      <asp:Parameter Name="original_Price" />
                      <asp:Parameter Name="original_Description" />
                  </DeleteParameters>
                  <UpdateParameters>
                      <asp:Parameter Name="Price" />
                      <asp:Parameter Name="Description" />
                      <asp:Parameter Name="original_Name" />
                      <asp:Parameter Name="original_ID" />
                      <asp:Parameter Name="original_Price" />
                      <asp:Parameter Name="original_Description" />
                  </UpdateParameters>
                  <InsertParameters>
                      <asp:Parameter Name="Name" />
                      <asp:Parameter Name="ID" />
                      <asp:Parameter Name="Price" />
                      <asp:Parameter Name="Description" />
                  </InsertParameters>
              </asp:SqlDataSource>
              <br />
              <asp:Label ID="lblError" runat="server"></asp:Label>
              <br />
              To create a new product, enter the following product information and click
              The Add New Product button.
       </p>

       <asp:Table ID="Table1" runat="server">
           <asp:TableRow>
               <asp:TableCell>Product Name:</asp:TableCell>

18 April 2011 @ 11:07:00 AM                81               Component Design
Senior Design Documentation Library                                    University Of Texas At Arlington
               <asp:TableCell><asp:TextBox ID="txtName" runat="server"
                EnableViewState="False"></asp:TextBox></asp:TableCell>
               <asp:TableCell>
                   <asp:RequiredFieldValidator ID="RequiredFieldValidator1"
                    runat="server" ErrorMessage="Product Name is required."
               ControlToValidate="txtName"></asp:RequiredFieldValidator></asp:TableCell>
           </asp:TableRow>
           <asp:TableRow>
               <asp:TableCell>ID:</asp:TableCell>
               <asp:TableCell><asp:TextBox ID="txtID" runat="server"
                EnableViewState="False"></asp:TextBox></asp:TableCell>
               <asp:TableCell>
                   <asp:RequiredFieldValidator ID="RequiredFieldValidator2"
                    runat="server" ErrorMessage="ID is required."
               ControlToValidate="txtID"></asp:RequiredFieldValidator></asp:TableCell>
           </asp:TableRow>
           <asp:TableRow>
               <asp:TableCell>Price:</asp:TableCell>
               <asp:TableCell><asp:TextBox ID="txtPrice" runat="server"
                EnableViewState="False"></asp:TextBox></asp:TableCell>
               <asp:TableCell>
                   <asp:RequiredFieldValidator ID="RequiredFieldValidator3"
                     runat="server" ErrorMessage="Price is required."
              ControlToValidate="txtPrice"></asp:RequiredFieldValidator></asp:TableCell>
           </asp:TableRow>
           <asp:TableRow>
               <asp:TableCell>Description:</asp:TableCell>
               <asp:TableCell><asp:TextBox ID="txtDescription" runat="server"
                EnableViewState="False"></asp:TextBox></asp:TableCell>
               <asp:TableCell>
                   <asp:RequiredFieldValidator ID="RequiredFieldValidator4"
                    runat="server" ErrorMessage="Description is required."
                    ControlToValidate="txtDescription">
                   </asp:RequiredFieldValidator></asp:TableCell>
           </asp:TableRow>
       </asp:Table><br />

       <asp:Button ID="btnAdd" runat="server" Text="Add New Product"
        OnClick="btnAdd_Click" />

      </div>




18 April 2011 @ 11:07:00 AM             82               Component Design
Senior Design Documentation Library                                             University Of Texas At Arlington




                               4 Quality Assurance

4.1 Test Plans and Procedures
      To ensure a high quality product, testing plans and procedures will be used to allow the product to be
      measured for completeness, independence, integrity, proper interfaces, and ease of implementation.
      Testing measures include module/unit testing, component testing, integration testing, and test cases.
      Module/unit testing and component testing involves validating inputs and outputs for layer interfaces
      through black-box testing. Integration testing involves verifying interfaces between layers defined by
      required inputs and outputs. Test cases are used to document testing scenarios.

4.2 Hardware Layer
4.2.1 Module/Unit Test
      The following are the different module/unit tests that we will perform:
            Peripheral Interface
                 o Proximity Sensor Interface Test
                 o DC Motor Interface Test
            Hardware Management and Control
                 o Arduino Serial Interface Test
                 o Card Serial Interface Test
      To test the Peripherals Interface, a set of predefined sensor readings and magnetic cards will be utilized
      to check whether the Peripheral Interface subsystem converts the sensor data to the correct double
      number value. As for the card reader, the system will be checked for the production of stream of bytes.
      The stream of bytes will be converted into separate variables by the MVM Hardware Management and
      Control Subsystem. The tester would then check if the strings of variables match the predefined
      information.
      The test should also cover the boundaries of the sensor and check whether the A/D or D/A conversions
      are working properly.

4.2.2 Component Test
      The component testing will test that all modules of a subsystem work together.
      The following component tests will be performed:
            Peripheral Interface


18 April 2011 @ 11:07:00 AM                 83                 Quality Assurance
Senior Design Documentation Library                                             University Of Texas At Arlington
          Hardware Management and Control

4.2.3 Integration Test
      Integration testing will be performed to ensure that the components are able to work together and can
      perform the desired functionality according to the system requirements.

4.2.4 System Verification Test
      A system verification test will be conducted on a complete, integrated system to assure that all the
      specified high priority level requirements have been met. The team will walk through a mock scenario to
      ensure that the acceptance criteria have been met.

4.3 Processing Layer
4.3.1 Module/Unit Test
      The following are the different module/unit tests that we will perform:
            Customer Page Layouts and Mappings
                 o Layout Manager Test
                 o Item Selection Page Test
                 o Card Selection Page Test
                 o Swipe Page Test
                 o Invoice Page Test
                 o Out of Order Page Test
                 o Event Handler Test
            MVM Management
                 o Payment Manager Test
                 o Product Manager Test
                 o Dispense Manager Test
                 o Configuration Manager Test
                 o Event Manager Test
            Beacon Control
                 o Beacon Control Test
      The Customer Page Layouts and Mappings subsystem can be tested with black-box testing. Sample
      input can be used and the output object containing product information and payment card data can be
      analyzed to check if it is correct. Also, a Boolean value can check if the screen goes to the out of order
      page or continues normal operation.
      To test the MVM Management subsystem, predefined test cases will be set. The test cases will have
      specific product information, payment information, and slots to test whether the MVM Management
      subsystem is providing the correct output and dispensing successfully.



18 April 2011 @ 11:07:00 AM                 84                  Quality Assurance
Senior Design Documentation Library                                  University Of Texas At Arlington
      To test the feedback from the Hardware Layer, the MVM Management subsystem will be tested for its
      response when receiving any feedback from the system.
      The Beacon Control subsystem can be tested with black-box testing. The Beacon Control subsystem can
      be given sample input, and then the output can be tested by comparing with results with proven software
      such as the ping software.

4.3.2 Component Test
      The component testing will test that all modules of a subsystem work together.
      The following component tests will be performed:
            Customer Page Mappings and Layouts Test
            MVM Management Test
            Beacon Control Test

4.3.3 Integration Test
      Integration testing will be performed to ensure that the components are able to work together and can
      perform the desired functionality according to the system requirements.

4.3.4 System Verification Test
      A system verification test will be conducted on a complete, integrated system to assure that all the
      specified high priority level requirements have been met. The team will walk through a mock scenario to
      ensure that the acceptance criteria have been met.

4.4 Web Administration Layer
4.4.1 Module/Unit Test
      The following are the different module/unit tests that we will perform:
            Web Page Layouts and Mappings
                 o Site Template Test
                 o CSS Test
                 o About Test
                 o Contact Test
                 o Default Test
            Administration Web Controls
                 o Login Test
                 o Change Password Test
                 o Profile Test
                 o Create New Wizard Test
                 o Manage Users Test
                 o Manage VM Products Test

18 April 2011 @ 11:07:00 AM                85                 Quality Assurance
Senior Design Documentation Library                                             University Of Texas At Arlington
                o VM Details Test
                 o Products Test
      The Webpage Layouts and Mappings subsystem can be tested with black-box testing. Sample input can
      be used and the output object containing user access, product inventory, vending machine information,
      and company information can be analyzed to check if it is correct.
      The Administration Web Controls subsystem can be tested with black-box testing. Sample input, in the
      form of session states that are acquired from web forms from mouse input, will be analyzed by
      confirming correction session state information. The final output will be checked for correct database
      queries that update the database.

4.4.2 Component Test
      The component testing will test that all modules of a subsystem work together.
      The following component tests will be performed:
            Web Page Layouts and Mappings Test
            Administration Web Controls Test

4.4.3 Integration Test
      Integration testing will be performed to ensure that the components are able to work together and can
      perform the desired functionality according to the system requirements.

4.4.4 System Verification Test
      A system verification test will be conducted on a complete, integrated system to assure that all the
      specified high priority level requirements have been met. The team will walk through a mock scenario to
      ensure that the acceptance criteria have been met.

4.5 Payment Layer
4.5.1 Module/Unit Test
      The following are the different module/unit tests that we will perform:
            Credit Accounts Control Test
            MyMav Accounts Control Test
      Black box testing will be performed with predetermined values to ensure both the Credit Accounts
      Control subsystem and the MyMav Accounts Control subsystem output the expected results.
      The Credit Card Controls subsystem will be given sample values required by the subsystem. Sample
      values will also be used to populate the database as needed by the subsystem. The output used to
      connect to the database will be examined to assure it is in the correct format. The output returned to the
      MVM management module will also be examined to assure it is correct.
      The MyMav Controls subsystem will also be given sample values to test the subsystem. Sample data for
      database will also be used. The output queries will be examined to assure they are in the right format.
      The output to the MVM management module will also be examined to assure it is sending the correct
      data.


18 April 2011 @ 11:07:00 AM                 86                 Quality Assurance
 Senior Design Documentation Library                                          University Of Texas At Arlington
4.5.2 Component Test
      The component testing will test that all modules of a subsystem work together.
      The following component tests will be performed:
             Credit Card Processing Test
             MyMav Card Processing Test

4.5.3 Integration Test
      Integration testing will be performed to ensure that the components are able to work together and can
      perform the desired functionality according to the system requirements.

4.5.4 System Verification Test
      A system verification test will be conducted on a complete, integrated system to assure that all the
      specified high priority level requirements have been met. Tests will include but are not limited to credit
      card/Mav Express card authorizations, such as valid/invalid card account numbers, valid/invalid card
      account balances, and valid/invalid card expiration dates.

4.6 External Local Services Layer
      These are external services already developed and functional therefore they should not require an
      independent testing. They will be used while performing integration testing and system testing.
      The following tests will be performed:
             Touchscreen Interaction Services Test
             Beacon IP Services Test
             MVM Connection IP Services Test

4.7 External Server Services Layer
      These are external services already developed and functional therefore they should not require an
      independent testing. They will be used while performing integration testing and system testing.
      The following tests will be performed:
             SQL Server Services Test

4.8 Test Cases
4.8.1 Customer touches screen

      4.8.1.1 General
               Actors
                     Customer
               System
                     MVM


18 April 2011 @ 11:07:00 AM                 87                 Quality Assurance
Senior Design Documentation Library                                       University Of Texas At Arlington
               Preconditions
                   Unit is powered on and is displaying screensaver.
              Description
                   Customer approaches the MVM that has a screen saver displayed with advertisements.
                   Upon touching the screen, the MVM loads the main page and is ready for a customer
                   purchase.
              Post Conditions Applying to All Paths
                   MVM is on main page and ready for customer interaction.

      4.8.1.2 Primary Path
              Summary
                   Customer touches MVM screen to begin purchase.
              Post Conditions
                   Main page is loaded.
              Special Requirements
                   None
              Frequency of Occurrence
                   None

      4.8.1.3 Alternate path(s)
                   None

      4.8.1.4 Outstanding Issues
                   None

4.8.2 Customer browses products

      4.8.2.1 General
              Actors
                   Customer
              System
                   MVM
              Preconditions
                   Main page is loaded
              Description
                   The customer browses through the main page in search of a product. The controls are
                   touch/gesture based, so the customer simply swipes his/her finger across the screen to
                   change the product.


18 April 2011 @ 11:07:00 AM               88                Quality Assurance
Senior Design Documentation Library                                        University Of Texas At Arlington
               Post Conditions Applying to All Paths
                    Customer remains on this page in a loop until desired product is found.

      4.8.2.2 Primary Path
               Summary
                    Customer is free to browse through products until desired product is located.
               Post Conditions
                    Customer is viewing desired product.
               Special Requirements
                    None
               Frequency of Occurrence
                    None

      4.8.2.3 Alternate path(s)
                    None

      4.8.2.4 Outstanding Issues
                    None


4.8.3 Customer selects product

      4.8.3.1 General
               Actors
                    Customer
               System
                    MVM
               Preconditions
                    Main page is loaded and customer is decided on a desired product.
               Description
                    The customer selects the product for purchase and is taken to the payment option page.
               Post Conditions Applying to All Paths
                    Customer is taken to the payment options page.

      4.8.3.2 Primary Path
               Summary
                    Customer chooses product for purchase and is taken to Payment Options page.



18 April 2011 @ 11:07:00 AM               89                 Quality Assurance
Senior Design Documentation Library                                        University Of Texas At Arlington
               Post Conditions
                   Payment Options page is loaded.
              Special Requirements
                   Item must be available to purchase.
              Frequency of Occurrence
                   None

      4.8.3.3 Alternate path(s)
                   None

      4.8.3.4 Outstanding Issues
                   None

4.8.4 Customer chooses payment option

      4.8.4.1 General
              Actors
                   Customer
              System
                   MVM
              Preconditions
                   The Payment Options page is loaded.
              Description
                   Customer selects one of two payment options: 1) Credit Card or 2) MyMav Express Card
              Post Conditions Applying to All Paths
                   Checkout page is loaded.


      4.8.4.2 Primary Path
              Summary
                   Customer selects one of two payment options:
                            If Credit Card: Customer prompted to swipe credit card.
                            If MyMav Express Card: Customer prompted to swipe Mav Express card.
              Post Conditions
                   Confirmation page is loaded.
              Special Requirements
                   None


18 April 2011 @ 11:07:00 AM               90                 Quality Assurance
Senior Design Documentation Library                                      University Of Texas At Arlington
               Frequency of Occurrence
                   None

      4.8.4.3 Alternate path(s)
                   None

      4.8.4.4 Outstanding Issues
                   None

4.8.5 Customer receives confirmation

      4.8.5.1 General
              Actors
                   Customer
              System
                   MVM
              Preconditions
                   Customer has paid for a purchase.
              Description
                   After paying, customer is prompted with payment confirmation, that product is being
                   dispensed, and shall display a thank you message.
              Post Conditions Applying to All Paths
                   Screensaver shall continue.

      4.8.5.2 Primary Path
              Summary
                   Customer receives purchase confirmation.
              Post Conditions
                   Screensaver is displayed.
              Special Requirements
                   None
              Frequency of Occurrence
                   None

      4.8.5.3 Alternate path(s)
                   None

      4.8.5.4 Outstanding Issues
                   None


18 April 2011 @ 11:07:00 AM              91                Quality Assurance
 Senior Design Documentation Library                                     University Of Texas At Arlington
4.8.6 User selects About Us page

      4.8.6.1 General
              Actors
                   User
              System
                   MVM application
              Preconditions
                   User is on the MVM application
              Description
                   User clicks on the About Us page link.
              Post Conditions Applying to All Paths
                   About Us page is loaded.

      4.8.6.2 Primary Path
              Summary
                   User clicks on the About Us page link.
              Post Conditions
                   About Us page is loaded.
              Special Requirements
                   The About Us link shall be located on all pages.
              Frequency of Occurrence
                   None

      4.8.6.3 Alternate path(s)
                   None

      4.8.6.4 Outstanding Issues
                   None

4.8.7 User selects Contact Us page

      4.8.7.1 General
              Actors
                   User
              System
                   MVM application



18 April 2011 @ 11:07:00 AM              92                 Quality Assurance
Senior Design Documentation Library                                        University Of Texas At Arlington
               Preconditions
                   User is on the MVM application.
              Description
                   User clicks on the Contact Us page link.
              Post Conditions Applying to All Paths
                   The Contact Us page is loaded.

      4.8.7.2 Primary Path
              Summary
                   User clicks on the Contact Us page link.
              Post Conditions
                   Contact Us page is loaded.
              Special Requirements
                   The Contact Us link shall be located on all pages.
              Frequency of Occurrence
                   None

      4.8.7.3 Alternate path(s)
                   None

      4.8.7.4 Outstanding Issues
                   None

4.8.8 User clicks Login button

      4.8.8.1 General
              Actors
                   User
              System
                   MVM application
              Preconditions
                   User is on the MVM application.
              Description
                   User clicks on the Login button and is taken to the login page. Login button shall be
                   located on all pages.
              Post Conditions Applying to All Paths
                   Login page is loaded.



18 April 2011 @ 11:07:00 AM                93                 Quality Assurance
Senior Design Documentation Library                                       University Of Texas At Arlington
      4.8.8.2 Primary Path
              Summary
                   User clicks on the Login button.
              Post Conditions
                   Login page is loaded.
              Special Requirements
                   None
              Frequency of Occurrence
                   None

      4.8.8.3 Alternate path(s)
                   None

      4.8.8.4 Outstanding Issues
                   None

4.8.9 User logs into the MVM application

      4.8.9.1 General
              Actors
                   User
              System
                   MVM application
              Preconditions
                   User has selected the Login button and is on the Login page.
              Description
                   User shall supply the following information:
                               Choose one of the following:
                                   o Administrator
                                   o Field Agent
                               User name / email address
                               Password
                               User selects the Submit button.
              Post Conditions Applying to All Paths
                   User is logged into the MVM application. Login button changes to logout button.




18 April 2011 @ 11:07:00 AM                94                Quality Assurance
Senior Design Documentation Library                                                      University Of Texas At Arlington
      4.8.9.2 Primary Path
                 Summary
                      User supplies necessary login information and selects the submit button to log into the MVM
                      application.
                 Post Conditions
                      User is logged into the MVM application.
                 Special Requirements
                      None
                 Frequency of Occurrence
                      None

      4.8.9.3 Alternate path(s)
                      None

      4.8.9.4 Outstanding Issues
                      None

4.8.10 User selects Logout button

      4.8.10.1        General
                 Actors
                      User
                 System
                      MVM application
                 Preconditions
                      User is ready to logout of the system
                 Description
                      User is ready to logout of the system and clicks on the logout button.
                 Post Conditions Applying to All Paths
                      User is successfully logged out of the MVM application.

      4.8.10.2        Primary Path
                 Summary
                      User clicks on the Logout button
                 Post Conditions
                      User is logged out of the MVM application.
                 Special Requirements
                      None

18 April 2011 @ 11:07:00 AM                      95                     Quality Assurance
Senior Design Documentation Library                                          University Of Texas At Arlington
               Frequency of Occurrence
                      None

      4.8.10.3        Alternate path(s)
                      None

      4.8.10.4        Outstanding Issues
                      None

4.8.11 User selects Add a Vending Machine

      4.8.11.1        General
                 Actors
                      User
                 System
                      MVM application
                 Preconditions
                      User is logged into the MVM application as an Administrator.
                 Description
                      The following information must be entered by the user to successfully add a vending
                      machine:
                              VM Name
                              VM ID
                              Loaction
                              Admin – admin in charge of VM
                              Field Agent – agent responsible for inventory and maintenance
                 Post Conditions Applying to All Paths
                      Vending machine is added to the system.

      4.8.11.2        Primary Path
                 Summary
                      User selects Add a Vending Machine button.
                 Post Conditions
                      Vending machine is added to the system.
                 Special Requirements
                      None
                 Frequency of Occurrence
                      None

18 April 2011 @ 11:07:00 AM                  96                 Quality Assurance
Senior Design Documentation Library                                          University Of Texas At Arlington
      4.8.11.3     Alternate path(s)
                      None

      4.8.11.4        Outstanding Issues
                      None

4.8.12 User removes vending machine

      4.8.12.1        General
                 Actors
                      User
                 System
                      MVM application
                 Preconditions
                      User is logged into the MVM application as an Administrator.
                 Description
                      The following VM details are displayed:
                              VM Name
                              VM ID
                              Loaction
                              Admin – admin in charge of VM
                              Field Agent – agent responsible for inventory and maintenance
                      The admin then can select from a list of available vending machines to decommission.
                      Note, action should only be performed once a vending machine is successfully removed
                      from its location in the field.
                 Post Conditions Applying to All Paths
                      Vending machine is removed from the system.

      4.8.12.2        Primary Path
                 Summary
                      User removes vending machine from the system.
                 Post Conditions
                      VM is removed from the system.
                 Special Requirements
                      None
                 Frequency of Occurrence
                      None


18 April 2011 @ 11:07:00 AM                  97                 Quality Assurance
Senior Design Documentation Library                                           University Of Texas At Arlington
      4.8.12.3     Alternate path(s)
                      None

      4.8.12.4        Outstanding Issues
                      None

4.8.13 User selects Add Field Agent

      4.8.13.1        General
                 Actors
                      User
                 System
                      MVM application
                 Preconditions
                      User is logged into the MVM application as an Administrator.
                 Description
                      User supplies the following information:
                              FA name
                              FA ID
                              FA Email
                              FA Phone
                              Supervising Admin
                      Once necessary information is supplied, user selects Add Field Agent Button
                 Post Conditions Applying to All Paths
                      A new Field Agent is added to the system.

      4.8.13.2        Primary Path
                 Summary
                      User adds a Field to the system.
                 Post Conditions
                      A Field Agent is added to the system.
                 Special Requirements
                      None
                 Frequency of Occurrence
                      None




18 April 2011 @ 11:07:00 AM                  98                  Quality Assurance
Senior Design Documentation Library                                          University Of Texas At Arlington
      4.8.13.3     Alternate path(s)
                      None

      4.8.13.4        Outstanding Issues
                      None

4.8.14 User removes Field Agent

      4.8.14.1        General
                 Actors
                      User
                 System
                      MVM application
                 Preconditions
                      User is logged into the MVM application as an Administrator.
                 Description
                      The following FA details are displayed:
                              FA name
                              FA ID
                              FA Email
                              FA Phone
                              Supervising Admin
                      The admin can select from a list of available Field Agents to remove from the system.
                 Post Conditions Applying to All Paths
                      Specified Field Agent is removed from the system.

      4.8.14.2        Primary Path
             Summary
                      User removes a Field Agent from the system.
                 Post Conditions
                      A Field Agent is successfully removed from the system.
                 Special Requirements
                      None
                 Frequency of Occurrence
                      None




18 April 2011 @ 11:07:00 AM                 99                  Quality Assurance
Senior Design Documentation Library                                           University Of Texas At Arlington
      4.8.14.3     Alternate path(s)
                      None

      4.8.14.4        Outstanding Issues
                      None

4.8.15 User selects Add Admin

      4.8.15.1        General
                 Actors
                      User
                 System
                      MVM application
                 Preconditions
                      User is logged into the MVM application as an Administrator.
                 Description
                      User supplies the following information:
                              Admin Name
                              Password
                              Email
                              ID
                              Phone
                              Assigned VMs
                      Once necessary information is supplied, user selects Add Admin Button
                 Post Conditions Applying to All Paths
                      A new Admin is added to the system.

      4.8.15.2        Primary Path
                 Summary
                      User adds an Admin to the system.
                 Post Conditions
                      An admin is added to the system.
                 Special Requirements
                      None
                 Frequency of Occurrence
                      None


18 April 2011 @ 11:07:00 AM                 100                  Quality Assurance
Senior Design Documentation Library                                         University Of Texas At Arlington
      4.8.15.3     Alternate path(s)
                      None

      4.8.15.4        Outstanding Issues
                      None

4.8.16 User removes Admin

      4.8.16.1        General
                 Actors
                      User
                 System
                      MVM application
                 Preconditions
                      User is logged into the MVM application as an Administrator.
                 Description
                      The following Admin details are displayed:
                              Admin Name
                              Password
                              Email
                              ID
                              Phone
                              Assigned VMs
                      The admin can select from a list of available Admins to remove from the system.
                 Post Conditions Applying to All Paths
                      Specified admin is removed from the system.

      4.8.16.2        Primary Path
                 Summary
                      User removes an admin from the system.
                 Post Conditions
                      An admin is successfully removed from the system.
                 Special Requirements
                      None
                 Frequency of Occurrence
                      None


18 April 2011 @ 11:07:00 AM                 101                Quality Assurance
Senior Design Documentation Library                                          University Of Texas At Arlington
      4.8.16.3     Alternate path(s)
                      None

      4.8.16.4        Outstanding Issues
                      None

4.8.17 User selects My Account

      4.8.17.1        General
                 Actors
                      User
                 System
                      MVM application
                 Preconditions
                      User is logged into the MVM application.
                 Description
                      The user is able to change the following account information:
                              Name
                              Email
                              Password
                              Phone
                      The user is also able to see a list of assigned VMs.
                 Post Conditions Applying to All Paths
                      My Account is opened and successfully updated.

      4.8.17.2        Primary Path
                 Summary
                      User can view/change selected account information.
                 Post Conditions
                      Account information is updated.
                 Special Requirements
                      None
                 Frequency of Occurrence
                      None




18 April 2011 @ 11:07:00 AM                 102                 Quality Assurance
Senior Design Documentation Library                                         University Of Texas At Arlington
      4.8.17.3     Alternate path(s)
                      None

      4.8.17.4        Outstanding Issues
                      None

4.8.18 User selects Add Product

      4.8.18.1        General
                 Actors
                      User
                 System
                      MVM application
                 Preconditions
                      User is logged into the MVM application as an administrator.
                 Description
                      The user supplies the following information:
                              Product Name
                              ID
                              Max Quantity
                              Current Quantity
                              Price Per Unit
                              Description
                      Once the above information is entered, user selects Add Product Button.
                 Post Conditions Applying to All Paths
                      Product is successfully added to the system.

      4.8.18.2        Primary Path
                 Summary
                      User can add a product to the system.
                 Post Conditions
                      Product is added to the system.
                 Special Requirements
                      None
                 Frequency of Occurrence
                      None


18 April 2011 @ 11:07:00 AM                   103              Quality Assurance
Senior Design Documentation Library                                            University Of Texas At Arlington
      4.8.18.3     Alternate path(s)
                      None

      4.8.18.4        Outstanding Issues
                      None

4.8.19 User selects Remove Product

      4.8.19.1        General
                 Actors
                      User
                 System
                      MVM application
                 Preconditions
                      User is logged into the MVM application as an administrator.
                 Description
                      The user views a list of the following information:
                              Product Name
                              ID
                              Max Quantity
                              Current Quantity
                              Price Per Unit
                              Description
                      The user can choose from the list a product to remove.
                 Post Conditions Applying to All Paths
                      Product is removed from the system.

      4.8.19.2        Primary Path
                 Summary
                      User removes a product from the system.
                 Post Conditions
                      Product is successfully removed from the system.
                 Special Requirements
                      None
                 Frequency of Occurrence
                      None


18 April 2011 @ 11:07:00 AM                   104               Quality Assurance
Senior Design Documentation Library                        University Of Texas At Arlington
      4.8.19.3     Alternate path(s)
                   None

      4.8.19.4     Outstanding Issues
                   None




18 April 2011 @ 11:07:00 AM             105   Quality Assurance
Senior Design Documentation Library                                                   University Of Texas At Arlington




                      5 Requirements Traceability
5.1 Purpose
      The purpose of a Requirements Traceability Matrix is to track all requirements and help ensure that all
      system requirements have been met by the current process and design. It checks for completeness,
      consistency, and traceability of the requirements of the system.

5.2 Requirements Traceability Matrix
5.2.1 Hardware Layer




                                                                                                                        Web Administration Layer




                                                                                                                                                                                       Database Services
                                                                                                     Processing Layer




                                                                                                                                                                   IP Stack Services
                                                                                Hardware Layer




                                                                                                                                                   Payment Layer
                                 Customer Requirements
       ID




     4.2.1    The Vending machine shall have an application displayed on
                                                                                                          X                                                        X
              touch screen to the customers
     4.2.2    The vending machine shall communicate wirelessly with the
                                                                                                                                                                   X                    X
              central server that hosts the database and the application
     4.2.3    The Client application shall have a main page                                                             X
     4.2.4    The touch screen shall display a payment option page once a
                                                                                                          X                                                        X
              product is selected
     4.2.5    Once a payment option has been selected, a checkout page
                                                                                                          X                                                        X
              shall be displayed
     4.2.6    When the customer swipes his card to finalize the checkout, a
                                                                                                 X        X                                        X               X                    X
              confirmation page shall be displayed.
     4.2.7    When the vending machine is idle, the touch screen will display
                                                                                                          X                                                        X
              digital advertisements for the products it sells on the screen
     4.2.8    MVM shall have an Administrative web application to manage
                                                                                                                        X                                                               X
              Admins, Field Agents, vending machines and inventory
     4.2.9    The administrative web application shall have a Main Page                                                 X
     4.2.10   The administrative web application shall have a Login Page                                                X
     4.2.11   The Administrator login option shall take the user to the
              Administrator page that allows the user to add, modify, and                                               X                                                               X
              monitor VMs and Field agents
     4.2.12   The Vending Machines option shall have detailed information                                               X                                                               X

18 April 2011 @ 11:07:00 AM                  106                  Requirements Traceability
Senior Design Documentation Library                                              University Of Texas At Arlington
              about the VMs, their designated Admin & Field Agent, and the
              statuses of the VMs
     4.2.13   The status of the vending machine shall have four states: red,
                                                                                              X
              yellow, green, and black
     4.2.14   The Administrative web application shall display the vending
                                                                                              X
              machines according to their statuses.
     4.2.15   The Admin shall be able to access the VMs and modify their
                                                                                              X           X
              parameters and statuses when selecting VM Details button
     4.2.16   Field Agents option shall have its own page and its own menu
                                                                                              X
              driven options
     4.2.17   Field Agent Details option shall display all the details of the
              Field agent and shall allow the user to modify the                              X           X
              responsibilities and the personal information of the Field Agent
     4.2.18   Add Administrator option shall assign new administrators                        X           X
     4.2.19   My Account Option shall have the same layout as the Add
              Admin option page without the ability to modify anything but                    X           X
              Admin password
     4.2.20   Products option page shall allow the admin to add, remove,
                                                                                              X           X
              and modify the products sold by the Vending Machines
     4.2.21   MVM shall ask the admin to update the MVM application
              every time an admin adds/modifies products for the vending                 X    X       X   X
              machine
     4.2.22   Product Details option shall allow the Administrator to view
                                                                                              X           X
              and modify detailed information about the selected products
     4.2.23   There shall be a super Administrator that assigns initial
              employee IDs, email accounts, initial passwords, and adding                     X           X
              and removing employees
     4.2.24   When Logging as a Field Agent, the Main Page shall show the
              assigned VM Machines to the logged Field agent and the status                   X           X
              of the VM
     4.2.25   When the Field Agent selects VM Details, all the products sold
              by that vending machine shall be displayed. The Field Agent
                                                                                              X           X
              shall have an option to update the products in the vending
              machine
     4.2.26   Product Details option under the Field Agents option shall allow
                                                                                         X    X       X   X
              the Field Agent to add more units to the vending machine
     4.2.27   The Field Agent shall be responsible for reporting physical
                                                                                              X           X
              damages to the MVMs that cannot be detected by software
     4.2.28   The main server and the MVMs shall exchange beacon
                                                                                         X            X   X
              messages
     4.2.29   MVM shall have two helix-shaped motors to dispense products         X
     4.2.30   MVM shall have a sensor that checks if an item has been
                                                                                  X
              dispensed
     4.2.31   MVM shall communicate with a simulated separate external
                                                                                         X        X   X   X
              credit verification service
     4.2.32   MVM shall communicate with a simulated separate external
                                                                                         X        X   X   X
              MyMav server
     4.2.33   MVM shall have two manual push buttons on the control board
                                                                                  X
              to test each motor in the vending machine

18 April 2011 @ 11:07:00 AM                  107                  Requirements Traceability
Senior Design Documentation Library                                                                                                               University Of Texas At Arlington
         4.2.34   The control board shall have a reset power button to reset the
                                                                                                                                                          X
                  vending machine
                                       Table 3. Requirements Traceability - Hardware Layer

5.2.2 Processing Layer




                                                                                                                                                                                                                                                     Configuration Manager
                                                                       Payment Option Page




                                                                                                                                                                                                                                  Dispense Manager
                                                                                                                                                                                                                Payment Manager
                                                                                                                         Out of Order Page




                                                                                                                                                                                              Product Manager
                                                                                                                                             Layout Manager




                                                                                                                                                                                                                                                                             Beacon Control
                                                                                                                                                                              Event Manager
                                                                                                                                                              Event Handler
                                                                                                          Invoice Page
                                                                                             Swipe Page
                                                           Item Page
                     Customer Requirements
 ID




4.2.1      The Vending machine shall have an
           application displayed on touch screen to         X             X                   X            X             X
           the customers
4.2.4      The touch screen shall display a payment
                                                                          X                                                                  X                  X               X
           option page once a product is selected
4.2.5      Once a payment option has been selected,
                                                                                              X                                              X                  X               X
           a checkout page shall be displayed
4.2.6      When the customer swipes his card to
           finalize the checkout, a confirmation page                                                      X                                 X
           shall be displayed.
4.2.7      When the vending machine is idle, the
           touch screen will display digital
                                                            X                                                                                X
           advertisements for the products it sells on
           the screen
4.2.21     MVM shall ask the admin to update the
           MVM application every time an admin
                                                            X                                                                                                                                   X                                  X
           adds/modifies products for the vending
           machine
4.2.28     The main server and the MVMs shall
                                                                                                                                                                                                                                                                             X
           exchange beacon messages
4.2.31     MVM shall communicate with a simulated
                                                                                                                                                                                                                X
           separate external credit verification service
4.2.32     MVM shall communicate with a simulated
                                                                                                                                                                                                                X
           separate external MyMav server
                                      Table 4. Requirements Traceability - Processing Layer




18 April 2011 @ 11:07:00 AM                       108                                            Requirements Traceability
 Senior Design Documentation Library                                                                                 University Of Texas At Arlington
5.2.3 Web Administration Layer




                                                                                                                                                                                                         Manage VM Products
                                                                                                                                                         Create New Wizard
                                                                                                                             Change Password




                                                                                                                                                                             Manage Users
                                                            Site Template




                                                                                                                                                                                            VM Details
                                                                            CSS Style




                                                                                                                                                                                                                              Products
                                                                                                 Contact
                   Customer Requirements




                                                                                                           Default




                                                                                                                                               Profile
                                                                                         About




                                                                                                                     Login
 ID




4.2.8    MVM shall have an Administrative web
         application to manage Admins, Field Agents,              x          x           x       x         x          x      x                 x          x                   x              x            x                   x
         vending machines and inventory
4.2.9    The administrative web application shall have
                                                                  x          x                             x
         a Main Page
4.2.10   The administrative web application shall have
                                                                  x          x                                        x
         a Login Page
4.2.11   The Administrator login option shall take the
         user to the Administrator page that allows
                                                                  x          x                                        x                                                       x              x            x
         the user to add, modify, and monitor VMs
         and Field agents
4.2.12   The Vending Machines option shall have
         detailed information about the VMs, their
                                                                  x          x                                                                                                               x
         designated Admin & Field Agent, and the
         statuses of the VMs
4.2.13   The status of the vending machine shall have
                                                                  x          x                                                                                                               x
         four states: red, yellow, green, and black
4.2.14   The Administrative web application shall
         display the vending machines according to                x          x                                                                                                               x
         their statuses.
4.2.15   The Admin shall be able to access the VMs
         and modify their parameters and statuses                 x          x                                                                                                               x
         when selecting VM Details button
4.2.16   Field Agents option shall have its own page
                                                                  x          x                                                                                                x
         and its own menu driven options
4.2.17   Field Agent Details option shall display all the
         details of the Field agent and shall allow the
                                                                  x          x                                                                 x
         user to modify the responsibilities and the
         personal information of the Field Agent
4.2.18   Add Administrator option shall assign new
                                                                  x          x                                                                            x
         administrators
4.2.19   My Account Option shall have the same
         layout as the Add Admin option page without
                                                                  x          x                                                                 x
         the ability to modify anything but Admin
         password
4.2.20   Products option page shall allow the admin
         to add, remove, and modify the products                  x          x                                                                                                                            x
         sold by the Vending Machines

18 April 2011 @ 11:07:00 AM                     109                                     Requirements Traceability
Senior Design Documentation Library                                               University Of Texas At Arlington
4.2.21   MVM shall ask the admin to update the
         MVM application every time an admin
                                                          x     x                                                        x               x
         adds/modifies products for the vending
         machine
4.2.22   Product Details option shall allow the
         Administrator to view and modify detailed        x     x                                                                            x
         information about the selected products
4.2.23   There shall be a super Administrator that
         assigns initial employee IDs, email accounts,
                                                          x     x                                   x
         initial passwords, and adding and removing
         employees
4.2.24   When Logging as a Field Agent, the Main
         Page shall show the assigned VM Machines
                                                          x     x            x
         to the logged Field agent and the status of
         the VM
4.2.25   When the Field Agent selects VM Details, all
         the products sold by that vending machine
         shall be displayed. The Field Agent shall have   x     x                                                        x               x
         an option to update the products in the
         vending machine
4.2.26   Product Details option under the Field Agents
         option shall allow the Field Agent to add        x    x                                                                         x
         more units to the vending machine
                              Table 5. Requirements Traceability - Web Administration Layer

5.2.4 Payment Layer




                                                                                                                         MyMav Payemnt
                                                                                                        Credit Payment
                                               Customer Requirements
          ID




         4.2.6    When the customer swipes his card to finalize the checkout, a confirmation page
                                                                                                          X                X
                  shall be displayed.
         4.2.31   MVM shall communicate with a simulated separate external credit verification
                                                                                                          X
                  service
         4.2.32   MVM shall communicate with a simulated separate external MyMav server                                    X
                                    Table 6. Requirements Traceability - Payment Layer




18 April 2011 @ 11:07:00 AM                    110                  Requirements Traceability
 Senior Design Documentation Library                                               University Of Texas At Arlington
5.2.5 External Services




                                                                                            MVM Connection IP Services



                                                                                                                                              Touchscreen Interaction
                                                                                                                         Beacon IP Services




                                                                                                                                                                                             Database Services
                                                                                                                                                                        Server IP Services
                                                                                                                                                     Services
                                     Customer Requirements
   ID




 4.2.1    The Vending machine shall have an application displayed on touch screen to
                                                                                                                                                      X
          the customers
 4.2.2    The vending machine shall communicate wirelessly with the central server
                                                                                                X                                                                         X                    X
          that hosts the database and the application
 4.2.4    The touch screen shall display a payment option page once a product is
                                                                                                                                                      X
          selected
 4.2.5    Once a payment option has been selected, a checkout page shall be displayed                                                                 X
 4.2.6    When the customer swipes his card to finalize the checkout, a confirmation
                                                                                                                                                      X
          page shall be displayed.
 4.2.7    When the vending machine is idle, the touch screen will display digital
                                                                                                                                                      X
          advertisements for the products it sells on the screen
 4.2.8    MVM shall have an Administrative web application to manage Admins, Field
                                                                                                                                                                          X                    X
          Agents, vending machines and inventory
 4.2.11   The Administrator login option shall take the user to the Administrator page
                                                                                                                                                                          X                    X
          that allows the user to add, modify, and monitor VMs and Field agents
 4.2.12   The Vending Machines option shall have detailed information about the VMs,
                                                                                                                                                                          X                    X
          their designated Admin & Field Agent, and the statuses of the VMs
 4.2.15   The Admin shall be able to access the VMs and modify their parameters and
                                                                                                                                                                          X                    X
          statuses when selecting VM Details button
 4.2.17   Field Agent Details option shall display all the details of the Field agent and
          shall allow the user to modify the responsibilities and the personal                                                                                            X                    X
          information of the Field Agent
 4.2.18   Add Administrator option shall assign new administrators                                                                                                        X                    X
 4.2.19   My Account Option shall have the same layout as the Add Admin option page
                                                                                                                                                                          X                    X
          without the ability to modify anything but Admin password
 4.2.20   Products option page shall allow the admin to add, remove, and modify the
                                                                                                                                                                          X                    X
          products sold by the Vending Machines
 4.2.21   MVM shall ask the admin to update the MVM application every time an
                                                                                                X                                                                         X                    X
          admin adds/modifies products for the vending machine
 4.2.22   Product Details option shall allow the Administrator to view and modify
                                                                                                                                                                          X                    X
          detailed information about the selected products
 4.2.23   There shall be a super Administrator that assigns initial employee IDs, email
                                                                                                                                                                          X                    X
          accounts, initial passwords, and adding and removing employees
 4.2.24   When Logging as a Field Agent, the Main Page shall show the assigned VM
                                                                                                                                                                          X                    X
          Machines to the logged Field agent and the status of the VM
 4.2.25   When the Field Agent selects VM Details, all the products sold by that vending
          machine shall be displayed. The Field Agent shall have an option to update the                                                                                  X                    X
          products in the vending machine

18 April 2011 @ 11:07:00 AM                   111                   Requirements Traceability
Senior Design Documentation Library                                             University Of Texas At Arlington
 4.2.26   Product Details option under the Field Agents option shall allow the Field
                                                                                                         X   X
          Agent to add more units to the vending machine
 4.2.28   The main server and the MVMs shall exchange beacon messages                        X           X
 4.2.31   MVM shall communicate with a simulated separate external credit verification
                                                                                         X               X   X
          service
 4.2.32   MVM shall communicate with a simulated separate external MyMav server          X               X   X
                                  Table 7. Requirements Traceability - External Services




18 April 2011 @ 11:07:00 AM                  112                 Requirements Traceability
Senior Design Documentation Library                                           University Of Texas At Arlington




                                 6 Acceptance Plan
6.1 General
      An acceptance plan defines the minimum criteria required to be met for the product to be considered
      acceptable by the customer and other stakeholders.

6.2 Packaging and Installation
      The final package of the Maverick Vending Machine will consist of a 3’ x 3’ x 3’ box containing a 7”
      touch screen, sensor device, two helical dispenser arms, a front door that can be opened to insert
      products, and a rear door where all hardware components can be accessed.

      Also, a user manual will be available to help owners understand how to use and maintain the vending
      machine, as well as how to update the inventory of the vending machine through the application.

6.3 Acceptance Testing
      Acceptance testing is a final stage of testing that is performed on a system before delivery to ensure the
      system supports processing without crashing. Each of the acceptance criteria have a series of tests from
      those specified in section 4. All the given tests must be passed for the product to be considered
      acceptable.

6.4 Acceptance Criteria
      Listed below are the minimum functionalities and features that Team Pegasus should have for it to be
      accepted by all the stakeholders.

6.4.1 MVM shall have a touch screen and an interactive GUI

      6.4.1.1 Description
      A touch screen should be used with all the requirements described under the section 4.2.1 in the System
      Requirements document

      6.4.1.2 Source
      Sponsor and Team Pegasus

      6.4.1.3 Applicable Constraints
      An A/C power plug should provide continuous power to the vending machine.

      6.4.1.4 Applicable Standards
      N/A


18 April 2011 @ 11:07:00 AM                113                 Acceptance Plan
 Senior Design Documentation Library                             University Of Texas At Arlington
6.4.2 MVM shall have its administrative site running and operational with all the
       functionalities necessary to manage the vending machines, administrators and Field
       Agents

      6.4.2.1 Description
      The administrative site shall monitor products in the vending machine, assign field agents, assign
      administrators, keep track of vending machines and their operational status, and provide a central
      management tool for all the people responsible for administering the vending machines.

      6.4.2.2 Source
      Team Pegasus

      6.4.2.3 Applicable Constraints
      Internet connectivity is a must to access the administrative site.

      6.4.2.4 Applicable Standards
      N/A

6.4.3 MVM shall have 2 slots to dispense products.

      6.4.3.1 Description
      All the requirements listed under the section 4.2.28 should be implemented

      6.4.3.2 Source
      Team Pegasus

      6.4.3.3 Applicable Constraints
      N/A

      6.4.3.4 Applicable Standards
      N/A

6.4.4 MVM shall connect wirelessly to the internet.

      6.4.4.1 Description
      The client application will run in the touch screen of the vending machine. It will communicate with the
      central server wirelessly using an Access point

      6.4.4.2 Source
      Team Pegasus

      6.4.4.3 Applicable Constraints
      The wireless connection should cover a minimum of 30ft. Interference on the signal might affect
      connectivity.



18 April 2011 @ 11:07:00 AM                 114                 Acceptance Plan
Senior Design Documentation Library                     University Of Texas At Arlington
      6.4.4.4 Applicable Standards
      IEEE 802.11 a/b/g/n




18 April 2011 @ 11:07:00 AM           115   Acceptance Plan
Senior Design Documentation Library                                       University Of Texas At Arlington




                                      7 Appendices
      [Formulas and Algorithms Not Documented in the Software Requirements Document]

      Java API - http://download.oracle.com/javase/6/docs/api/
      ASP API - http://msdn.microsoft.com/en-us/library/ms178688.aspx




18 April 2011 @ 11:07:00 AM              116                 Appendices

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:13
posted:4/18/2011
language:English
pages:119