SellSmart© Project DesignOctober 21, 2003

CS551 Advanced Software Engineering

SellSmart©

Project Design

October 22, 2003

by

DesiGeeks

Vinit Nagda ()

Deepa Colluru ()

Uday Kapoor ()

Venetia Raheja ()

Sampath Akkineni ()

Vijay Bhaskar Puram ()

Wenxuan Kang ()

School of Computing & Engineering

University of Missouri Kansas City

Table Of Contents

1Dictionary

2REQUIREMENT SPECIFICATION

2.1Stakeholders

2.2Functional Requirements

2.2.1Display Welcome Screen

2.2.2Registration and Authentication

2.2.3Search Screen

2.2.4Search Results Screen

2.2.5Favorites List

2.2.6Sales Agents Requirements

2.2.7Concurrent use......

2.2.8Performance / SLA

2.2.9Consistency

2.2.10Reliability/Accuracy

2.2.11Comparison Analysis

2.3Non-Functional Requirements

2.3.1Mobility

2.3.2Information from Other Dealers

2.3.3Portability

2.3.4User Interface requirements

2.4Technical / Business Requirements

3FRAMEWORK SPECIFICATIONS

3.1Algorithms [Pseudo Code]

3.1.1Pseudo Code for Client application

3.1.2Pseudo Code for a SOAP Interface Call

3.1.3Pseudo code for SQL Queries

3.1.4Pseudo code for CORBA

3.1.5Pseudo code for EJB

3.1.6Pseudo code for DCOM

3.2Data Structures

3.2.1Vectors

3.2.2Arrays

3.2.3Lookup Hash Structure

3.3Design Patterns

3.3.1Adapter

3.3.2Facade

3.3.3Abstract Factory

3.3.4Proxy

3.4Database Design

3.4.1Entity Relationship Diagram

3.4.2Database Tables

4SYSTEM SPECIFICATION

4.1Use Case Diagram

4.1.1System Use Case Diagram

4.1.2Use Case Diagram for user: Guest

4.1.3Use Case Diagram for user: Customer

4.1.4Use Case Diagram for user: Sales Agent

4.1.5Explanation for Use Case Diagram for all type of users

4.1.6Clearly Defining System boundary

4.1.7System and External Roles (for users, hardware, software)

4.1.8Abstract Use Cases and Collaborations

4.2Sequence Diagram for Use Cases

4.2.1Sequence diagram for user: Guest

4.2.2Sequence diagram for user: Customer

4.2.3Sequence diagram for user: Sales Agent

4.3Collaboration Diagram

4.3.1Collaboration Diagram for user: Guest

4.3.2Collaboration Diagram for user: Customer

4.3.3Collaboration Diagram for user: Sales Agent

4.4Operation Specification

4.5Concrete Scenarios

5SYSTEM USER INTERFACE

6SYSTEM ARCHITECTURE DESIGN

6.1SellSmart System Type Model

6.2Component Diagram

6.3Package Diagram

6.4Protocol Design

6.4.1Communication Channels between components

6.4.2Utility Components and code

7CLASS DIAGRAM

7.1SellSmart system class diagram

7.2External System Class Diagram

7.2.1Class Diagram for EJB

7.2.2Class Diagram for DCOM

1Dictionary

Type / Description
Abstract Factory pattern: / Provides an interface for creating families of related or dependent objects without specifying their concrete classes.
Adapter / searchcriteria / These are the factors on which the search is carried out. Search criteria includes make, model, price, color etc.,
Sessionid / Each session is identified by a unique session id.
AdapterFactory: / Represents the factory of abstract factory design pattern. Provides an interface for creating families of adapters without specifying their concrete classes. It is also the subsystem of Facade pattern.
Adaptor pattern: / Converts the interface of a class into another interface that clients expect.
Adapter lets classes work together that couldn’t otherwise because of incompatible interfaces.
Auto dealer / He is the one who provides SellSmart system. Using the SellSmart system he can get better results from the sales agents.
Car / Carid / Every car has a unique car id
Make / This field describes the make of the car
Model / This field describes the model of the car
Year / This field describes the year of manufacturing of the car
Price / This field describes the cost of the car
Color / This field describes the color of the car
Mileage / This field describes the mileage on the car
Location / This field describes the location of the car in the parking lot basically it is a combination of one letter and two digits like A21, b25.
New / This field describes whether the car is brand new or used
Engine / This field describes the engine type like v6 and v4.
Automatic / This field specifies whether it is automatic or manual
Type / This field describes the type of the car whether it is a sedan or coupe
Bestprice / This field specifies the bottom price of the car. Only the salesperson has access to this field. He can negotiate with the customer instantaneously by looking this field.
Specifications / This field contains extra specifications that are not displayed in the initial stages. When the user likes to see more details of the car then this will be displayed.
Externalid / This field contains the id of the car in the external database
externalFlag / This field is checked when the external database is accessed
Lock / If the car has a defect or sold then it will be locked and will not be displayed
COMAccess: / Includes both COM server and client.
COMSearchAdapter: / One adapter of Adapter Pattern. Adapts COM subsystem.
CORBASearchAdapter: / One adapter of Adapter Pattern. Adapts CORBA subsystem.
Customer / A customer is a registered user for this system. He maintains his favorite list of cars by searching the system using various criteria like make, model, price, color etc.,
EJBSearchAdapter: / One adapter of Adapter Pattern. Adapts EJB subsystem.
External Search / User can search several partnership companies for a specific type of car
ExternalSearchAdapter: / The target of Adapter Pattern. Abstract the interfaces of three subsystems (COMSearchAdapter, EJBSearchAdapter, CORBASearchAdapter) into one interface that its client expects.
ExternalSearchFacade: / The facade of all ExternalSearch subsystems. Provides a unified interface to a set of interfaces in all the subsystems. The higher-level interface makes the subsystems easier to use.
Facade pattern: / Provide a unified interface to a set of interfaces in a subsystem. Façade defines a higher-level interface that makes the subsystem easier to use.
Favorites List: / This contains the lists of the cars liked by the user
Guest: / Guest is not a registered user. He can search for various cars just like a normal registered customer but the difference is he cannot save his profile with out being registered.
IclassFactory: / The IClassFactory interface contains two methods intended to deal with an entire class of objects, and so is implemented on the class object for a specific class of objects (identified by a CLSID). The first method, CreateInstance, creates an uninitialized object of a specified CLSID, and the second, LockServer, locks the object's server in memory, allowing new objects to be created more quickly.
IexternalSearch: / The interface for the COMAccess.
Iunknown: / The IUnknown interface lets clients get pointers to other interfaces on a given object through the QueryInterface method, and manage the existence of the object through the IUnknown::AddRef and IUnknown::Release methods. All other COM interfaces are inherited, directly or indirectly, from IUnknown. Therefore, the three methods in IUnknown are the first entries in the VTable for every interface.
Proxy pattern: / Provide a surrogate or placeholder for another object to control access to it.
Sales Agent / Sales Agent can have privileged access to this system. He has access to the confidential information like best price, using this he can negotiate with the customer instantly rather than making turns to and fro the auto dealer’s office.
Salesman / Refers to the same class of users as Sales Agent. Sales Agent and Salesman have been used interchangeably throughout the document.
SellSmartRemote / It is the default remote interface provided by the EJB container tools
SellSmartBean / This will give the implementation of all the business methods as well as methods defined in this interface.
SellSmartHome / It is the default home interface provided by the EJB container tools.
User / Refers to the generic class of users of the SellSmart system. They can be further specialized as guest (unregistered user), customer (registered user) and Sales Agent.
Userid / Gives the userid of the user
Password / Gives the password of the user
Firstname / Gives the firstname of the user
Lastname / Gives the lastname of the user
Phone / Gives the phone number of the user
Email / Gives the email id of the user
Lastvisit / Gives when the user has last visited the system
Rating / Rating is a value Sales Agent attaches to each customer (registered user) depending on the interest shown by them. The rating field along with the LastVist field can be used by the dealership later to follow up with potential customers.
Type / This classifies the broad generic field of users into specific ones like guest (unregistered user), customer (registered user), and Sales Agent (registered user with special privileges).

2REQUIREMENT SPECIFICATION

2.1Stakeholders

Stakeholders of the SellSmart system are auto dealers, sales agents and customers. Auto dealers can get increased sales from their sales agents by making use of this system. Through the path of collaborations, the auto dealers can target customers who are even farther away from their reach. Also the auto dealers can cut down on the manual labor costs, associated with the car sales. Sales agents can be very productive and offer better service to their customers as they have all the information readily available. The SellSmart system enables the sales agents to save trips back to their office and thus serve more customers. Customers can search for cars available with various dealers, based on different search criteria and maintain a favorite list without needing the assistance of sales agents.

2.2Functional Requirements

2.2.1Display Welcome Screen

SellSmart should display the welcome screen on startup. This screen will help differentiating between registered users and guest users.

2.2.2Registration and Authentication

SellSmart should authenticate the existing users’ login and password information. If the authentication fails, a message should be displayed and the user should be prompted for re-login. The system also provides a means for prospective customers/first time users to use the system without registration. A ‘Guest’ login would be provided which would enable guests to browse the inventory and select cars to add to their favorites list. However guests need to register, if they want to save the favorite list and personal information in the SellSmart system.

2.2.3Search Screen

Search screen should have several fields to accept the users search criteria. Search can be performed using any one or combination of price, car id, make, model and year.

2.2.4Search Results Screen

Search Results screen should display the car id, make, model, year, and price and car location if any of the cars in the dealer’s inventory match the search criteria. User can sort the search results on the basis of any of these criteria. Default sort order will be on descending price.

2.2.5Favorites List

Registered users of the SellSmart system can maintain a favorites list of cars. This favorites list is valid only for that session for customers that do not have accounts. If the customer wants to save his favorites, then customer should be prompted for account creation if he/she doesn’t already have an account.

2.2.6Sales Agents Requirements

Sales agents should have access to confidential information such as best price that can be offered on a particular vehicle, any promotions available for this vehicle. Also the sales person will be able to assign ratings for a customer, based on the amount of interest the particular user shows in buying a car. The salesman can later use this information along with the ‘last accessed’ date information of various users to follow up with them.

2.2.7Concurrent use

Multiple users should be able to use the system at the same time.

2.2.8Performance / SLA

The system should have reasonable response time. Response time should not increase with the increased number of users.

2.2.9Consistency

SellSmart should at any point of time only show car information that is consistent. We provide a mechanism for the sales agent to be able to ‘lock’ a car if the car is already sold or if any defect has been discovered in a particular car. Cars with a ‘locked’ attribute will not be displayed in search results. SellSmart also maintains consistency of the information by fetching ‘fresh’ results each time, and not caching local copies. This can affect the response time; however SellSmart gives more importance to consistent data over response time.

2.2.10Reliability/Accuracy

The system should provide reliable and accurate information to the users.

2.2.11Comparison Analysis

After the successful implementation and deployment of SellSmart in the field, DesiGeeks will perform comparison analysis to gauge the performance of various middleware technologies used to connect to external dealership systems. Below mentioned are some of the analysis criteria:

Platform Independence.

Language Independence.

Ease of use.

Portability.

State Management.

Persistence Management.

2.3Non-Functional Requirements

2.3.1Mobility

One of the requirements of the dealership is to make its work force mobile and increase their productivity by servicing the customers better and provide instantaneous answers to their queries. To meet the requirements of a mobile client application, SellSmart, a PDA client using .NET Compact Framework is developed. The requirement could be met by making the client application as thin as possible, restricting it to be used as an interface to receive customer input and display result. In this architecture the web-service would be used as a medium to provide bi-directional communication between the client application and the server application, which will be doing the bulk of the processing.

2.3.2Information from Other Dealers

System should provide the ability to communicate with other dealers/partners and get the information of the cars available with them.

2.3.3Portability

Though this is a PDA based system, it should be extendable to a web based system with minimal changes. However extending the system to be Web based is not a part of the project and will be regarded as future work.

2.3.4User Interface requirements

Despite similarities in functionality, or being made of the same components, desktop and handheld computers are different entities with different users and uses. The obvious reasons for a different design are absence of keyboard, use of finger or stylus, limited user screen, and many more. For handhelds one requires careful placement of controls on the screen, progressive disclosure, large buttons over which stylus can be used, and consistency with platform of choice. Also considering factors like integration with desktops, design for speed, decreasing the overall navigation in application, and low reliability due to being connected.

2.4Technical / Business Requirements

SELLSMARTwould change the way people buy cars and the way car dealerships do business. The project aims at taking the auto sales industry to the next level by promoting co-operation amongst various dealerships. Successful implementation of SellSmartwould result in various partnership agreements amongst competing dealerships and benefit the customer by providing a vast collaborated inventory to choose from. Implementing SellSmart over the Web, could result in global partnerships, and help businesses develop a strategic alliance to take advantage of additional business opportunities. SELLSMARTimplements the adaptation layer which bridges the gap between various technologies making it easier for dealerships to collaborate on sales efforts and maintaining their own infrastructure and individual identity at the same time.

3FRAMEWORK SPECIFICATIONS

3.1Algorithms [Pseudo Code]

3.1.1Pseudo Code for Client application

//define objects

Dim env As PocketSOAP.Envelope

Dim http As PocketSOAP.HTTPTransport

Dim Request As String

Dim Response As String

//create SOAP envelope

Set env = CreateObject(“PocketSOAP.Envelope”)

Env.MethodName = “searchCar”

Env.URI = “xyz”

//create initialize parameters

Env.CreateParameter “Criteria”, “Car”

// serialize the request to be sent using http protocol

Request = env.serialize

//create HTTP transport to access web service

Set http = CreateObject(“PocketSOAP.HTTPTransport”)

http.send “ Request

//receive response

Response = http.Receive

3.1.2Pseudo Code for a SOAP Interface Call

//sending or receiving a soap message

<S:Envelope

S:encodingStyle='

xmlns:S='

xmlns:a='

xmlns:XS='

xmlns:XI='

<S:Body<a:searchCar>

<make XI:type='XS:String'>honda </make>

<model XI:type='XS:String'>Accord </model>

<year XI:type='XS:String'>2001 </year>

<price XI:type='XS:String'>15000 </price>

<new XI:type='XS:String'>used </new>

<mileage XI:type='XS:String'>60000 </mileage>

</a:searchCar>

</S:Body</S:Envelope>

3.1.3Pseudo code for SQL Queries

//Query to retrieve car information from the database

SELECT * FROM car_info

WHERE make = ? AND model = ?

AND price = ? AND year = ?

//Create a new user in the system

INSERT INTO user(userId, password, firstName, lastName, phoneNo, email)

VALUES( ?, ?, ?, ?, ?, ?)

//Retrieve user details

SELECT * FROM user WHERE userId = ?

3.1.4Pseudo code for CORBA

CORBA Client

Create SellSmart client

{

main method

{

create and initialize ORB

get root naming context

resolve object reference in naming

invoke search method from the obtained server object

}

}

CORBA Server

Begin

Create a SellSmartServant class by extending from ImplBase class

Implement the business method

Vector search(Car car)

{

retrieve search parameters from Car object

prepare sql statement

execute sql

process result set

compile results into a Vector object

return Vector object

}

Create a SellSmart server class

{

create main method

{

create and initialize ORB

create servant object

register with ORB using connect method

get the root naming context

resolve initial references

narrow

bind the object reference using rebind method

wait for invocations from clients

}

}

end

3.1.5Pseudo code for EJB

EJB Container

EJB Client

Class SellSmartClient

{

main method

{

declare and initialize url string

create HashTable to save initial_context_factory and provider_url

populate HashTable with the values of initial_context_factory and provider_url