develop a mobile application for stock exchange monitoring using j2me

Upload: muadh-abdulmajid

Post on 03-Apr-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    1/112

    P a g e | i

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    Contents

    CHAPTER 1: Stock Exchange ........................................................................................ 1

    1.0 INTRODUCTION ....................................................................................................... 1

    1.1 Stock Quotes ............................................................................................................. 2

    CHAPTER 2: GPRS ........................................................................................................ 4

    2.0 INTRODUCTION ....................................................................................................... 4

    2.1 GPRS Network .......................................................................................................... 4

    2.2 GPRS Technology ..................................................................................................... 5

    2.2.1 GPRS Working Method .......................................................................................... 5

    2.2.2 Technology used in GPRS ..................................................................................... 62.2.3 Implementation of GPRS . ...................................................................................... 6

    2.3 GPRS terminals......................................................................................................... 7

    2.4 GPRS benefits........................................................................................................... 7

    2.5 GPRS Limitations ...................................................................................................... 8

    CHAPTER 3: Mobile application Development Methodology .......................................... 9

    3.1 The Challenges of Mobile Application Development ................................................. 9

    3.2 Mobile Design and Development Best Practices ..................................................... 10

    3.2.1 Design for Usability .............................................................................................. 10

    3.2.2 Get the Architecture and Design Right ................................................................. 11

    CHAPTER 4: J2ME ....................................................................................................... 12

    4.1 Introduction ............................................................................................................. 12

    4.2 J2ME Technology .................................................................................................... 13

    4.3 J2ME Configurations ............................................................................................... 14

    4.3.1 CLDC ................................................................................................................... 14

    4.3.2 CDC ..................................................................................................................... 15

    4.4 J2ME Profiles .......................................................................................................... 15

    4.4.1 Mobile Information Device Profile (MIDP) ............................................................ 16

    4.4.2 Foundation Profile ................................................................................................ 16

    4.5 Virtual Machines (VM) ............................................................................................. 16

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    2/112

    P a g e | ii

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    4.6 Conclusion .............................................................................................................. 16

    CHAPTER 4: Servlet ..................................................................................................... 17

    5.1 Introduction ............................................................................................................. 17

    5.2 JAVA Servlet Technology ........................................................................................ 17

    5.3 JAVA Servlet working method ................................................................................. 18

    5.4 Stock Data Sources ................................................................................................. 19

    5.5 Downloading Yahoo Finance Stock Data ................................................................ 19

    CHAPTER 6: Fact finding methods for requirement gathering ...................................... 22

    6.1 Introduction ............................................................................................................. 22

    6.2 Various Fact Finding Methods ................................................................................. 22

    6.2.2 Questionnaire ....................................................................................................... 226.3 Proposed System Questionnaire and Its analysis ................................................... 23

    6.4 Questionnaire Result Analysis ................................................................................ 30

    6.5 Conclusion .............................................................................................................. 30

    Chapter 7: Functional and non functional requirements of the system .......................... 31

    7.1 Introduction ............................................................................................................. 31

    7.2 Hardware Requirements ......................................................................................... 31

    7.3 Software Requirements ........................................................................................... 31

    7.4 User Requirements ................................................................................................. 32

    7.4.1 Functional Requirements ..................................................................................... 32

    7.4.2 Non-Functional Requirements .............................................................................. 33

    7.4 Conclusions ............................................................................................................. 33

    Chapter 8: Selection of Suitable Tools and Technique for System Development ......... 34

    8.1 Introduction ............................................................................................................. 34

    8.2 Software Development Life Cycle ........................................................................... 34

    8.3 Prototyping .............................................................................................................. 36

    8.4 Development Tools ................................................................................................. 36

    8.4.1 Programming Language ....................................................................................... 36

    8.4.1.1 VB .NET ............................................................................................................ 37

    8.4.1.2 C++ ................................................................................................................... 37

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    3/112

    P a g e | iii

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    8.4.1.3 JAVA ................................................................................................................. 37

    8.4.1.3.1 Java Properties .............................................................................................. 38

    8.4.1.3.2 Java Technology in Small and Mobile Devices .............................................. 38

    8.4.1.3.3 J2ME .............................................................................................................. 39

    8.4.1.4 Comparison of Programming Tools ................................................................... 40

    8.4.2 Database .............................................................................................................. 41

    8.4.3 Support Tools ....................................................................................................... 42

    8.5 Conclusion .............................................................................................................. 42

    CHAPTER 9: System Design ........................................................................................ 43

    9.0 Introduction ............................................................................................................. 43

    9.1 Unified Modeling Language (UML) .......................................................................... 439.1.1 Use Case Diagram ............................................................................................... 43

    9.1.1.1 Use Case Description ........................................................................................ 44

    9.1.2 UML Activity Diagram ........................................................................................... 46

    9.1.3 UML Sequence Diagram ...................................................................................... 48

    9.1.4 UML Class Diagram ............................................................................................. 51

    9.2 Functional Decomposition Diagram ......................................................................... 53

    9.3 Context Diagram ..................................................................................................... 54

    CHAPTER 10: SYSTEM DESIGN AND INTERFACE ................................................... 55

    10.1 System Design ...................................................................................................... 55

    10.1.1 Server Side Design ............................................................................................ 55

    10.1.2 Stock information collection ................................................................................ 55

    10.1.3 Client Side Design .............................................................................................. 55

    10.2 Interface Design .................................................................................................... 56

    10.2.1 Main Menu Interface ........................................................................................... 57

    10.2.2 Add New Stock Interface .................................................................................... 57

    10.2.3 View Stock Information Interface ........................................................................ 58

    10.2.4 Delete Stock Interface ........................................................................................ 59

    10.3 Conclusion ............................................................................................................ 59

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    4/112

    P a g e | iv

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    CHAPTER 11: IMPLEMENTING THE SYSTEM BASED ON THE SYSTEM ANALYSIS

    & DESIGN ..................................................................................................................... 60

    11.1 Introduction ........................................................................................................... 60

    11.2 Client Side Code ................................................................................................... 6011.2.1 Main Menu Code ................................................................................................ 60

    11.2.2 Add New Stock Code ......................................................................................... 61

    11.2.3 View Live Stock Code ........................................................................................ 62

    11.2.4 Delete Stock Code ............................................................................................. 64

    11.2.5 Stock Chart Drawing Code ................................................................................. 65

    11.2.6 Download Data Code ......................................................................................... 67

    11.2.7 Stock Chart Event Processing ............................................................................ 69

    11.3 Server Side Code .................................................................................................. 71

    11.4 Problem and Solution ............................................................................................ 72

    11.4.1 Programming Skills ............................................................................................ 72

    11.4.2 Connection Problem ........................................................................................... 72

    11.4.3 Problem of database .......................................................................................... 72

    11.5 Conclusion ............................................................................................................ 72

    CHAPTER 12: SYSTEM TESTING ............................................................................... 73

    12.1 Introduction ........................................................................................................... 73

    12.2 Various types of testing method ............................................................................ 73

    12.2.1 Black box testing ................................................................................................ 73

    12.2.2 White box testing ................................................................................................ 73

    12.2.3 Unit testing ......................................................................................................... 73

    12.2.4 Integration testing ............................................................................................... 73

    12.3 Selected Testing Method ....................................................................................... 73

    12.3.1 Unit Testing ........................................................................................................ 74

    12.3.2 Integration Testing .............................................................................................. 75

    12.4 User Evaluation ..................................................................................................... 76

    12.4.1 User Evaluation Form ......................................................................................... 77

    12.4.2 Analysis of user evaluation ................................................................................. 78

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    5/112

    P a g e | v

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    12.5.3 Conclusion ......................................................................................................... 81

    CHAPTER 13: Limitation and Future Enhancement ..................................................... 82

    13.1 Introduction ........................................................................................................... 82

    13.2 Limitation of the System ........................................................................................ 82

    13.2.1 Dependability on connection speed ................................................................... 82

    13.2.2 Dependability on Yahoo Finance ....................................................................... 82

    13.2.3 Works on mobile simulator ................................................................................. 82

    13.3 Future Enhancement ............................................................................................. 83

    13.3.1 Real Time Stock Data ........................................................................................ 83

    13.3.2 Stock Recommendation ..................................................................................... 83

    13.3.3 GUI Improvement ............................................................................................... 8313.3.4 Search Stock capability ...................................................................................... 83

    13.3.6 Live Graph ......................................................................................................... 83

    13.4 Conclusion ............................................................................................................ 83

    CHAPTER 14: CONCLUSION ...................................................................................... 84

    Appendix A: Gantt chart

    Appendix B: Project Specification

    Appendix C: Project Monitoring Report

    Appendix D: Questionnaire

    Appendix E: Screen Shots

    Reference

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    6/112

    P a g e | 1

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    CHAPTER 1: Stock Exchange

    1.0 INTRODUCTION

    The organized and regulated financial markets where securities transactions ofbonds,notes and shares are bought and sold at certain prices that are set and governed by the

    demand and supply forces. Stock exchange serves as

    (1) the primary markets where different organizations, corporations, government bodies

    and other incorporated organization can raise capital by channeling savings of the

    investors into productive ventures; and

    (2) the secondary markets where investors can sell their securities to other investors for

    cash, thus reducing the risk ofinvestment and maintaining liquidity in the system. Stock

    exchanges impose stringent rules, listing requirements, and statutory requirements that

    are binding on all listed and trading parties. Almost all exchanges are 'auction

    exchanges' where buyers enter competitive bids and sellers enter competitive ordersthrough a trading day.

    A stock exchange is an organization where brokers and investment bankers come

    together with the purpose of providing the facilities for trade of company stocks and

    other financial instruments usually recordkeeping. Trade on an exchange is done only

    by the members of the exchange. Stock exchanges in Europe are often called bourses.

    The trading of stock on stock exchanges is called the stock market.

    (Stock Exchange, 2009)

    There are basic things that need to be considered before buying and selling shares:

    1. You have to open an account and a trading account with a stock broking

    company.

    2. A remisier is an agent or authorized personnel licensed to conduct share

    dealings and will execute the buy and sell orders.

    3. The main contact person at the stock broking company is the remisier.

    4. For a person to buy shares, the person must provide sufficient funds to cover the

    cost of shares as well as transaction costs.

    5. For a person to sell share must have shares in their account.

    6. Orders are match electronically through any Stock exchange trading system

    there is no manual intervention in process7. The remisier confirms order after if they are matched.

    8. A contract note would be sent to the customer by stock broking company.

    Confirming details such as Name of Organization, cost of shares bought or sold and

    transaction totals are correct

    9. The document must been kept carefully.

    http://www.investorwords.com/1953/financial_market.htmlhttp://www.businessdictionary.com/definition/securities.htmlhttp://www.businessdictionary.com/definition/bond.htmlhttp://www.businessdictionary.com/definition/notes.htmlhttp://www.businessdictionary.com/definition/share.htmlhttp://www.businessdictionary.com/definition/bought.htmlhttp://www.investorwords.com/7717/sold.htmlhttp://www.businessdictionary.com/definition/price.htmlhttp://www.businessdictionary.com/definition/demand-and-supply.htmlhttp://www.businessdictionary.com/definition/exchange.htmlhttp://www.businessdictionary.com/definition/primary-market.htmlhttp://www.businessdictionary.com/definition/corporation.htmlhttp://www.businessdictionary.com/definition/government.htmlhttp://www.investorwords.com/5615/incorporated.htmlhttp://www.businessdictionary.com/definition/capital.htmlhttp://www.businessdictionary.com/definition/savings.htmlhttp://www.businessdictionary.com/definition/investor.htmlhttp://www.investorwords.com/3875/productive.htmlhttp://www.investorwords.com/5235/venture.htmlhttp://www.businessdictionary.com/definition/secondary-market.htmlhttp://www.businessdictionary.com/definition/sell.htmlhttp://www.businessdictionary.com/definition/cash.htmlhttp://www.businessdictionary.com/definition/risk.htmlhttp://www.businessdictionary.com/definition/investment.htmlhttp://www.businessdictionary.com/definition/liquidity.htmlhttp://www.businessdictionary.com/definition/system.htmlhttp://www.investorwords.com/2384/impose.htmlhttp://www.businessdictionary.com/definition/rule.htmlhttp://www.businessdictionary.com/definition/listing-requirements.htmlhttp://www.businessdictionary.com/definition/statutory-requirement.htmlhttp://www.businessdictionary.com/definition/listed.htmlhttp://www.investorwords.com/5030/trading.htmlhttp://www.businessdictionary.com/definition/party.htmlhttp://www.businessdictionary.com/definition/auction-exchange.htmlhttp://www.businessdictionary.com/definition/auction-exchange.htmlhttp://www.businessdictionary.com/definition/buyer.htmlhttp://www.investorwords.com/999/competitive_bid.htmlhttp://www.businessdictionary.com/definition/seller.htmlhttp://www.businessdictionary.com/definition/competitive.htmlhttp://www.businessdictionary.com/definition/day.htmlhttp://www.businessdictionary.com/definition/day.htmlhttp://www.businessdictionary.com/definition/competitive.htmlhttp://www.businessdictionary.com/definition/seller.htmlhttp://www.investorwords.com/999/competitive_bid.htmlhttp://www.businessdictionary.com/definition/buyer.htmlhttp://www.businessdictionary.com/definition/auction-exchange.htmlhttp://www.businessdictionary.com/definition/auction-exchange.htmlhttp://www.businessdictionary.com/definition/party.htmlhttp://www.investorwords.com/5030/trading.htmlhttp://www.businessdictionary.com/definition/listed.htmlhttp://www.businessdictionary.com/definition/statutory-requirement.htmlhttp://www.businessdictionary.com/definition/listing-requirements.htmlhttp://www.businessdictionary.com/definition/rule.htmlhttp://www.investorwords.com/2384/impose.htmlhttp://www.businessdictionary.com/definition/system.htmlhttp://www.businessdictionary.com/definition/liquidity.htmlhttp://www.businessdictionary.com/definition/investment.htmlhttp://www.businessdictionary.com/definition/risk.htmlhttp://www.businessdictionary.com/definition/cash.htmlhttp://www.businessdictionary.com/definition/sell.htmlhttp://www.businessdictionary.com/definition/secondary-market.htmlhttp://www.investorwords.com/5235/venture.htmlhttp://www.investorwords.com/3875/productive.htmlhttp://www.businessdictionary.com/definition/investor.htmlhttp://www.businessdictionary.com/definition/savings.htmlhttp://www.businessdictionary.com/definition/capital.htmlhttp://www.investorwords.com/5615/incorporated.htmlhttp://www.businessdictionary.com/definition/government.htmlhttp://www.businessdictionary.com/definition/corporation.htmlhttp://www.businessdictionary.com/definition/primary-market.htmlhttp://www.businessdictionary.com/definition/exchange.htmlhttp://www.businessdictionary.com/definition/demand-and-supply.htmlhttp://www.businessdictionary.com/definition/price.htmlhttp://www.investorwords.com/7717/sold.htmlhttp://www.businessdictionary.com/definition/bought.htmlhttp://www.businessdictionary.com/definition/share.htmlhttp://www.businessdictionary.com/definition/notes.htmlhttp://www.businessdictionary.com/definition/bond.htmlhttp://www.businessdictionary.com/definition/securities.htmlhttp://www.investorwords.com/1953/financial_market.html
  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    7/112

    P a g e | 2

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    1.1 Stock Quotes

    In the stock exchange financial markets, a quote is the price of security that is recently

    traded, trading, or the both. For example, the stock quote may list the recent transaction

    price, lowest bid and the highest bid. The stock quotation is either the real-time quote

    which is the current quote for a stock or the delayed quote. In the United States, a

    delayed quote is available for free, but it reflects on the market in the past less or 20

    minutes ago, depending upon the exchange. The quote is often known as the quotation.

    A quote is the price at hand of a stock at the exchange market. The quote shows the

    most recent trade price of stock and the time of trade for the specific stock

    A quote is the current price of a stock. A quote shows you the previous trade price and

    time for a selected stock symbol, the change of quotes is done in currency and

    percentage from the previous days market close, and the volume of shares traded.

    Due to the continuously changing nature of the stock market quotes are not been

    saved. A person can set up a portfolio so as to track selected stocks of their interest by

    normally used on online finance website such as Yahoo Finance.

    Quotes can be retrieved on any Finance page, for example Yahoo Finance, by just

    keying in the stock symbol in the Symbol search bar the click on the button. It will show

    the stock quotes data. If the symbol is not known, just type the company name and it

    will show you the listing of available symbol for that particular company.

    And this depends on the stock quote view a person selects. The lists of the data shown

    in each view are as follows:

    Short Quote View: This includes the companys name, stock symbol, price of last

    trade and time, change in price in currency and percentage and the traded volume of

    shares.

    Long Quote View: This includes the companys name, stock symbol, the

    exchange on which the stock was traded, price of last trade and time, change in price in

    currency and percentage and the traded volume of shares, the average and total

    volume of shares traded, number of outstanding, bid and ask prices of shares, open and

    close prices of previous market, dates dividend and ex-dividend, Earnings Per Share(EPS), the day's price range (low to high), the 52-week range, the amount and

    percentage of dividend, and the Price-Earnings (P/E) ratio.

    At A Glance View: This includes the price of last trade and time, change in price

    in currency and percentage, opening price, the traded volume of shares, day high, day

    low and previous close price.

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    8/112

    P a g e | 3

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    Research View: This includes the statistics on the EPS history and stocks

    revenue, and other financial indicator of growth and efficiency. Also broker

    recommendations and earnings estimates, insider trading activity, financial reports,

    historical data quote and companys information.

    Fundamental View: This includes the companys name, stock symbol, market

    capitalization, Price/Sales ratio, P/E ratio, EPS, and the 52-week range (low price and

    high price over 52 weeks).

    News View: This is the news related to a selected stock symbol and been

    updated every hour.

    Charts View: This includes the stock symbol, price of last trade and time, change

    in price in currency and percentage, shares volume traded, day high, day low and the

    opening price. Also, comparison to major market indices and selected stocks of yourchoice.

    (Excite Stock Quotes, 2010)

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    9/112

    P a g e | 4

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    CHAPTER 2: GPRS

    2.0 INTRODUCTION

    GPRS is a packet based wireless communication service. It is a service that provides

    packet radio access for mobile GSM and TDMA users. The benefits of GPRS are that itkeeps back radio resources until there is data to send and it reduces the dependence

    on normal circuit-switched network elements. GPRS enables the transportation of voice

    calls and data traffic over a shared set of channels over. The rates of 114kbps were

    possible, well rates of 177.2kbps are theoretically possible, but in reality rates of

    between 10-40 kbps are more likely. The capacity of 10kbps to send/upload maximum

    and roughly 40kbps receive/download.

    Figure 2.0: Overview of the GPRS network.

    2.1 GPRS Network

    GPRS Support Nodes are the two components that handle the packet traffic for the core

    network. Which are the:

    Serving GPRS Support Node (SGSN)

    Gateway GPRS Support Node (GGSN)

    The SGSN is the element of the network that converts the protocols between the IP

    core and the radio network (it assigns IP addresses). It also performs mobility

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    10/112

    P a g e | 5

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    management functions and location management (it tracks the users movement to

    know where specific to send packets). It also ensures a secure connection.

    The GGSN connects the GPRS network service to the Internet, ISPs and corporate

    Intranets, it acts like a gateway to the other networks. It also performs address mapping.

    Figure 2.1: A lower level view of the GPRS network

    (GPRS, 2007)

    2.2 GPRS Technology

    2.2.1 GPRS Working Method

    The most common methods used for data transfer are the packet switching and circuit

    switching. In circuit switched transmission a sequence of links is first established across

    by the dedicated circuit and then a single user is allocate a whole channel for the whole

    duration of call. In the packet switched transmission, the data is cut in to small parts

    called packages first which are then sent to the receiver in sequence, which then after

    that builds the packages back together again. This is just to ensure that the same link of

    resources can be shared by many different users at the same time. The link is used

    when the user wants to send something only. The link is free to be used when there is

    no data to be sent. Packet switching is suitable for bursty traffic such as voice.

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    11/112

    P a g e | 6

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    2.2.2 Technology used in GPRS

    The main objectives to be reached by implementing GPRS are the following:

    give support for bursty traffic use efficiently network and radio resources

    provide flexible services at relatively low costs

    possibility for connectivity to the Internet

    provide fast access time

    to have and support flexible co-existence with GSM voice

    In order to meet these objectives the following technologies are applied. For GPRS to

    transfer data and signaling in a cost efficient manner over GSM networks and to also

    optimize the usage of the radio and network resources it uses a packet mode technique.The strict separation between the network and radio subsystems is maintained in order

    for other radio access technologies to reuse the network subsystem.

    GPRS will provide a seamless connection would be provided to the existing standard

    data services by GPRS using interfaces to TCP/IP and X.25. Fast reservation to begin

    transmission of packets would also be provided by the GPRS, typically from 0.5 to 1

    second. This implies that the data users do not have to wait for the phone to be dialed,

    but instead they will get through immediately. For example the messages will be

    delivered direct to the user's phone, without the need for a full end-to-end connection.

    Whenever the user switches on their mobile phone, the message will be downloadedautomatically.

    2.2.3 Implementation of GPRS

    Two phased approach for the GPRS was adopted so as to manage the great amount of

    work required to produce new standards. The first phase, phase 1 provides functional

    services.

    Phase 1 supports:

    The TCP/IP and X.25 bearer services.

    The GPRS identities

    The GPRS security, using a new encryption algorithm especially tailored for

    packet data

    The operator Call Barring and Termination, Operator Call Screening

    The support of SMS over GPRS

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    12/112

    P a g e | 7

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    The support for packet charging

    Phase 2 GPRS:

    This phase of the GPRS completes the capabilities to meet the requirements of the

    GPRS. Additional support is added by the phase specific point-to-point and point-to-multipoint services, for various applications like the traffic telematics and train control.

    Supports also for alternative user and network interfaces, example the ISDN and other

    packet networks, as well as additional support for supplementary services, would be

    added.

    (GPRS, 2008)

    2.3 GPRS terminals

    Usual devices will include mobile phones, which will have keypads, and laptops which

    will use PC cards. Personal digital assistants like Palm Pilots will also be used.

    Terminals will also be split into three classes, listed below:

    Class A handsets, are the handsets that can do both voice and data at the same

    time (simultaneously). If you were to receive a voice call will using the Internet, say, the

    connection would be placed on busy while you answer the call, rather than have it

    disconnected.

    Class B handsets, are those handsets that are not capable of voice and packet

    data at the same time. It supports only one at a time either voice or data service. But

    like in Class A above, a voice call would put the data call on hold, and vice versa. Class C handsets can handle only non-simultaneous data and voice calls. The

    user of Class C handsets must select the service they wish to connect to manually.

    (SMS is also optional for Class C terminals).

    Most of these devices have a higher receiving speed than a transmission speed

    Class B mobiles are more common, because they are cost and time efficient in making.

    (GPRS, 2008 )

    2.4 GPRS benefits

    GPRS give mobile users numerous benefits and also the network providers. The main

    aim of the GPRS is to provide realistic data to the users through the

    telecommunications technologies. Here are some significant benefits offered by the

    GPRS:

    http://www.netlab.tkk.fi/opetus/s38118/s98/htyo/54/tech.shtmlhttp://ntrg.cs.tcd.ie/undergrad/4ba2.01/group1/gprs2.htmhttp://ntrg.cs.tcd.ie/undergrad/4ba2.01/group1/gprs2.htmhttp://www.netlab.tkk.fi/opetus/s38118/s98/htyo/54/tech.shtml
  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    13/112

    P a g e | 8

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    Speed: the GPRS provide a higher rate of data than the GSM. The maximum

    rate of data realistically is in the range of 15 40 kbps but 172kbps are also possible.

    Packet Switched Operation: the GPRS uses the packet switching in connecting

    to the internet, unlike the GSM that uses the Circuit switching. The packet switching

    allows greater commonality with the internet techniques and efficiency in the use of

    available capacity.

    Always on Connectivity: the is always on, available to the user and by the use of

    the packet switching charges are charged per data amount uses, whereas the GSM

    circuit switching charges is charged based on time duration by the service providers.

    More Applications: with the always on connectivity, the packet switching and high

    rate of data brings up possibilities for more application. It enables the remote email

    application where user can send and receive mails as instance along with the web

    browsing and many more.

    Capex and Opex: The GPRS is an upgrade to the GSM, the Capital Expenditure(Capex) for the introduction of the GPRS wasnt high to deploy a completely new

    network and the Operation Expenditure (Opex) the basic base station infrastructure

    remaind the same cause it wasnt affected. The Capex and Opex are the major two

    concern of the operator.

    (GPRS Technology Tutorial, 2006)

    2.5 GPRS Limitations

    Though the benefits of better rate of data provide by the GPRS than the GSM there alsosome limitations:

    User would be required to use the eight timeslots without any error protection to

    use the 177.2kbps speed, which basically is not going to happen because initially only 1

    3 timeslots are likely to be used by initial terminals limiting the GPRS bandwidth

    available to the user.

    The GPRS packets are sent in different directions when they are sent to a

    destination allowing some of the packets to be lost or corrupted during the transmission

    of data though over the radio link.

    Data services are slowed down for the users when there is an increase in theirnumber even though the radio service can be share concurrently between many users.

    (GPRS, 2008 )

    http://www.radio-electronics.com/info/cellulartelecomms/gprs/gprs_tutorial.phphttp://ntrg.cs.tcd.ie/undergrad/4ba2.01/group1/gprs2.htmhttp://ntrg.cs.tcd.ie/undergrad/4ba2.01/group1/gprs2.htmhttp://www.radio-electronics.com/info/cellulartelecomms/gprs/gprs_tutorial.php
  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    14/112

    P a g e | 9

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    CHAPTER 3: Mobile application Development Methodology

    3.1 The Challenges of Mobile Application Development

    The development of mobile application is entirely different from other applications is

    driven by the user experience. Usually the users of mobile phones have an urgent needto complete a task or access information. That made the user to be impatient as they

    face a slight problem with the usability or performance of the application it results in high

    level user frustration.

    In comparing the development of software and mobile applications there are challenges

    and constraints that are peculiar to the applications of mobile phones which include the

    following:

    Different mobile phones run with different operating systems such as the iPhone

    OS, Symbian OS, Blackberry OS, Android and many other mobile operating systems,

    the challenge is with developing application to run on the different variety of phones soas to exploit the unique abilities of each of them while increasing reusability and

    development efficiency of the software application;

    The challenge of the screen size which is small ranging from 2.0inch to 4.3inch in

    size for that it is difficult to maintain the navigation scheme and user sense of location in

    an application;

    The variety of phone forms with different orientations, screen size and resolution

    to design for is also a challenge faced;

    Different phones have different interaction methods such as the use of keypad,

    capacitive touch which is finger only and resistive touch where you can use stylus, theinput devices are limited as well;

    Application which activities that consume power should be managed carefully

    cause of the limited battery life of the mobile phone;

    The power of the processor is limited;

    Memories and storage are limited with phones;

    The cost of bandwidth should be considered where there are charges per data

    volume in network connectivity;

    Mobile application developers and designers are challenged with the above constraints

    while they are trying to create applications that will fulfill the usability of a wide range ofdemand users. The solution architecture of the overall is the detailed design and the

    specific software implementation of each component must be specified to develop a

    highly usable application that is as efficient as possible in consuming constrained device

    resources.

    (BitHeads, 2009)

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    15/112

    P a g e | 10

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    3.2 Mobile Design and Development Best Practices

    With the listed challenges of mobile application development, developers and designer

    must take full advantages of lessons learnt from the challenges in order to develop an

    efficient and reusable application. The following would help in starting a mobile

    application project right and keep the present ones on track.

    3.2.1 Design for Usability

    For mobile applications the context is the main aim of the design. It is very important to

    understand the user's context and objectives. A robust product management process

    and iterative approach to design, development and testing is critical.

    Do not just copy designs with the intentions on running them on desktop devices;

    Simplify the application straight forward to functionality demanded and remove all

    the confusion, ambiguity and clutter;

    Limit the number of options on screen for the phone; Limit number of screens by not split content so as for users not to get lost;

    Usage of a consistent user interface helps the users to have mental caption of

    the application;

    User Interface should be designed similarly as the existing applications on the

    device which is familiar to the user;

    Know the unique compatibility of the various devices such as the screen size,

    accelerometer and the input method so as to create a possible user experience

    engagement;

    Perform a usability test all through the design and development of the applicationinclude the test of mobile phone not just the desktop emulators;

    Make navigation to be easy and predictable by the user and make ease use of

    forms;

    Limit the number of text input, the lesser input the better the design;

    Make it easy for the users to recover from errors by providing clear recovery

    methods;

    Avoid complexity in the interaction pattern so as the users attention is not require

    for long;

    Workflows should be highly structured for the infrequent tasks;

    Feedbacks should clear on progress and upon task status completion;

    Make the user interface for maximum readability by using high contrast text color;

    Colors should be managed carefully throughout the design and make them

    consistent; and

    Use simple navigation structures that focus on one specific task at a time.

    (BitHeads, 2009)

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    16/112

    P a g e | 11

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    3.2.2 Get the Architecture and Design Right

    Application usability and performance must be achieved at a high level while working

    with many constraints related to devices. The following below are some of the important

    application architecture and design considerations:

    Use a development methodology that includes prototyping, development and

    continuous testing, rapid iteration just as in the agile-based development;

    Consider the various range of mobile phones that will be supported, their input

    interaction and different displays, and the capabilities that would be used;

    Store data in the memory of the device to reduce frequency of data access on

    the server;

    Carefully manage the applications activities that consume loads of power;

    On the server, processing should be much as possible;

    Use multithreading effectively to improve performance where possible; Conserve memory carefully by defining proper data structures, reducing the

    number of objects and careful management of object handles;

    Images, tables, CSS and Client side script should use where they add value;

    Do not send data that are irrelevant and that would be used, send possibly little

    to anticipate the needs of users;

    (BitHeads, 2009)

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    17/112

    P a g e | 12

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    CHAPTER 4: J2ME

    4.1 Introduction

    Java has come out with numerous kinds of java platform editions. Some of the most

    commonly used are J2EE (Java 2, Enterprise Edition), J2SE (Java 2, Standard Edition),and J2ME (Java 2, Micro Edition). Those editions are designed for unique purpose.

    J2EE is used to develop multi-user application, or web applications or for enterprise

    purpose such as serving suppliers, customers with Internet business server. J2SE is for

    desktop computers, and run on Linux, Solaris, Microsoft Windows etc. J2ME is a latest

    edition of java, designed to develop applications for small devices with limited memory,

    and limited display screen, like pager, Handled device (PDA or mobile phone), smart

    card etc. Each of those Java editions has their own virtual machine in order to support

    their target applications.

    Figure 4.1 Java 2 Fragmentation

    (J2ME: Introduction, Configurations and Profiles, 2004 )

    http://www.ifi.uzh.ch/~riedl/lectures/Java2001-j2me.pdfhttp://www.ifi.uzh.ch/~riedl/lectures/Java2001-j2me.pdf
  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    18/112

    P a g e | 13

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    4.2 J2ME TechnologyThere are various types of platforms with different environment they run on. J2ME

    devices are those that run java and they could be: With or without keyboard

    With grayscale display or with colored display

    With or without Network Connection

    Memory greater than 10 Mb

    Device profile is the chosen resolution method specifying the minimum java classes for

    each class if devices. Maintaining the basic features of java technology is the aim of

    J2ME which are as follows:

    Consistency is to be built in across products so as they run anytime, anywhereand on any mobile device.

    Object oriented programming with a large developer base.

    Code portability

    Network delivery safety

    Scalability with J2EE and J2SE upward.

    J2ME at a higher level it targets at two (2) distinct groups of products which are:

    The personal mobile connected devices that provide an individual with

    information. E.g. Cellular phones, digital organizers, pagers

    The fixed, shared connected devices. E.g. screen phones, navigation system,

    high end communicator, internet TV.

    To address the diversity of inheritance of the J2ME, requirement is essential

    customizability, modularity not just only the small size. Due to this, the J2ME

    architecture is made scalable and modular to support flexible deployment to the target

    markets as demanded, which are the embedded markets and rapid growing consumers.

    J2ME supports minimal configurations of the java virtual machine for the lower end

    resource limited products and essential capabilities of each type of device as capturedand provided by the Java APIs. Configurations are expanded with additional APIs or

    with the complement of java virtual machine features as the manufactures of mobile

    devices as new features to the device or service providers develop new applications. To

    support all this extensibility and customizability the essential two concepts of profiles

    and configurations is defined.

    (J2ME: Introduction, Configurations and Profiles, 2004 )

    http://www.ifi.uzh.ch/~riedl/lectures/Java2001-j2me.pdfhttp://www.ifi.uzh.ch/~riedl/lectures/Java2001-j2me.pdf
  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    19/112

    P a g e | 14

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    4.3 J2ME ConfigurationsThe Java 2 Micro Edition platform covers a large number range of different kind devicessuch as the mobile phones, internet TV and many. The Sun has split the Java 2 MicroEdition in configurations due to the wide range of different kind of devices in the J2ME

    market.Configuration defines the Java API classes, virtual machines features and the java

    language features for each configuration environment. Java 2 Micro Edition

    configuration defines the minimum platform for a class of devices, each of them with the

    same requirement of processing power and the total memory budget. The virtual

    machine features, java language and the minimum libraries that a content provider or

    manufacture of a J2ME supported device should expect to be available on the various

    devices of same class is defined by the configuration. Confusion led by fragmentation is

    to be avoided. The two configurations introduced by The Sun are as follows:

    CLDC (Connected Limited Device Configuration)

    CDC (Connected Device Configuration)

    The main functionalities in CLDC and CDC are inherited from the Java 2 Platform,

    Standard Edition (J2SE). The inherited classed for the J2SE are subsets of the

    corresponding classes in the Java 2 Platform, Standard Edition (J2SE) or precisely the

    same and the java.* class names is not use for the outside classes of the J2SE

    environment . Therefore, between different editions of Java 2 platform upward

    compatibility is achieved. To achieve upward compatibility between the Java 2 Micro

    Edition, all the implemented features in CLDC are also implemented in the CDC. Thusevery application developed for the CLDC platform can run with the CDC platform.

    (J2ME: Introduction, Configurations and Profiles, 2004 )

    4.3.1 CLDC

    The first configuration to be defined is the CLDC as its main target group is the gadgets,

    PDAs or Mobile phones. These various devices are served by the CLDC. Some new

    classes not drawn from the Java 2 Standard Edition APIs designed specifically to fit the

    needs of small-footprint devices are included in this configuration.

    Characteristics of the Connected Limited Device Configuration (CLDC) The UI is very simple may include no UI at all

    The memory budget is very low ranging from 160kb 512kb

    Low bandwidth of wireless communication

    Processors 16 or 32 bits

    Limited Battery power

    Examples: PDAs, Pagers and Mobile phones

    http://www.ifi.uzh.ch/~riedl/lectures/Java2001-j2me.pdfhttp://www.ifi.uzh.ch/~riedl/lectures/Java2001-j2me.pdf
  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    20/112

    P a g e | 15

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    4.3.2 CDC

    Connected Device Configuration (CDC) is a superset of the Connected Limited Device

    Configuration (CLDC) to ensure upward compatibility between configurations. Fixed,

    shared connected information devices market is served by the CDC.

    Characteristics of Connected Device Configuration (CDC)

    Wide range of UI capabilities

    2 16 Mb of memory budget

    Processor 16 bit or 32 bit

    Network connectivity

    Examples: high end communicators, Internet TV and TV set boxes

    (J2ME: Introduction, Configurations and Profiles, 2004 )

    4.4 J2ME ProfilesDistinguishing different types of devices is already helped by the configurations. But

    there other devices to be refined more because the configuration might cover some

    devices that have entirely different usage such as fridge and cell phone. Therefore, a

    concept of a profile to achieve application environment portability is provided by the

    J2ME framework.

    A J2ME profile addresses the device category or certain vertical market segment

    demands like the payment and banking application. Due to this profiles are

    implemented on top of the configuration because the profile might consist of libraries

    that are specific of device category more than the libraries provided in the configuration.

    Profiles are arranged for a specific configuration as applications are written to specific

    profile. The Java API classes used by applications are defined by both the profiles and

    the configurations. A device agrees to implement all features and Java API classes

    which are specified by the profile when designed to support a profile and corresponding

    configuration.

    From an implementation point of view, profile is the collection of Java APIs and class

    libraries residing on top of a configuration and providing domain specific capabilities for

    devices in a specific market segment.

    (J2ME: Introduction, Configurations and Profiles, 2004 )

    http://www.ifi.uzh.ch/~riedl/lectures/Java2001-j2me.pdfhttp://www.ifi.uzh.ch/~riedl/lectures/Java2001-j2me.pdfhttp://www.ifi.uzh.ch/~riedl/lectures/Java2001-j2me.pdfhttp://www.ifi.uzh.ch/~riedl/lectures/Java2001-j2me.pdf
  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    21/112

    P a g e | 16

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    4.4.1 Mobile Information Device Profile (MIDP)

    The Mobile Information Device Profile (MIDP) is built on top of the Connected Limited

    Device Configuration (CLDC). MIDP provides a standard platform for resource limited,

    small, wireless connected devices such as the mobile phones and the pager by building

    it upon CLDC. In addition to having limited storage, small screen display, wireless

    connectivity capabilities, limited input methods and devices, processor power and

    battery life. The accommodated two types of devices are the voice communication

    devices and the mobile information appliances.

    (J2ME: Introduction, Configurations and Profiles, 2004 )

    4.4.2 Foundation Profile

    This is built upon the Connected Device Configuration (CDC). There are two purposes

    served by the Foundation Profile which are:

    The foundation profile does not require GUI, it provide profile of the Java 2platform that is suitable for devices that need support for the rich network java

    environment.

    Base profile is provided for inclusion by other profiles that need to build on the

    functionality it provides by adding GUI.

    (J2ME: Introduction, Configurations and Profiles, 2004 )

    4.5 Virtual Machines (VM)K virtual machine is also a Java virtual machine that is developed for resource limited

    and small devices like the pagers, mobile phone and the digital organizers. The CDLC

    is implemented by the KVM. Due to the KVM been implemented in C this made it to be

    easily portable to the various platforms. The KVM is the standard reference

    implementation of J2ME, it came for The Sun and the performance of the KVM is not

    excellent.

    (J2ME: Introduction, Configurations and Profiles, 2004 )

    4.6 ConclusionThis chapter focuses on the JAVA Servlet technology act as a gateway server for the

    client to retrieve stock data through Yahoo Finance. It starts from the introduction to

    Servlet as web server technology and how it is applied to the proposed application. Italso includes the format of URL for retrieving stock quotes from Yahoo and the available

    tags that are needed. The chapter also focused on the stock exchange and J2ME to be

    used during the project.

    http://www.ifi.uzh.ch/~riedl/lectures/Java2001-j2me.pdfhttp://www.ifi.uzh.ch/~riedl/lectures/Java2001-j2me.pdfhttp://www.ifi.uzh.ch/~riedl/lectures/Java2001-j2me.pdfhttp://www.ifi.uzh.ch/~riedl/lectures/Java2001-j2me.pdfhttp://www.ifi.uzh.ch/~riedl/lectures/Java2001-j2me.pdfhttp://www.ifi.uzh.ch/~riedl/lectures/Java2001-j2me.pdf
  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    22/112

    P a g e | 17

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    CHAPTER 4: Servlet

    5.1 Introduction

    JAVA Servlet is the server side programming language for the web based system. It is

    introduced and consists of some similarity with Java Server Pages (JSP) but alsoconsist numbers of differences. JAVA Servlet technology can be used to respond to any

    client request either from web application, mobile phone or any other web application

    media that invoke its class file of its web page. Based on this JAVA Servlet technology,

    it can be used to download the data from Yahoo Finance, and process the information

    before it was sent to the client mobile phone. Although other server side programming

    language such as PHP can be used but Servlet is used due to the interoperability and

    the familiarity of the author to JAVA Programming language.

    5.2 JAVA Servlet Technology

    Servlet collects or receives information from the user or do both and response to

    clicking on certain button on a form as input from user, depending upon what kinds of

    actions are initiated by the form the user fills out. The servlet can track down information

    needed in several ways by retrieving it from the database when the servlet is designed

    to provide information to the user. Example, the servlet can create HTML page

    containing information retrieved/received/collected which can be displayed to user on

    the browser.

    The servlet is usually compared to the Common Gateway Interface (CGI) script in the

    web scripting. Servlet resembles java applet in a programmatic point of view; the servlet

    is written in java programming as an executable and as the CGI script does, servlet is

    usually executed based on respond to an HTML page invocation.

    The servlet is not the only mechanism that interacts with users as in the above way.

    Before servlet came along, the CGI (Common Gateway Interface) script does similar

    operations as well. The CGI scripts were the standard mechanism for creating and

    displaying HTML before the servlet. The servlet has advantages over the Common

    Gateway Interface script and is replacing them quickly in the enterprise computing

    world.

    The CGI (Common Gateway Interface) script spawns a new process each time it isbeen executed, consuming more server resource and more processing time each time it

    is invoked; this is the one way which the servlet is superior to the CGI script. Also the

    CGI script takes fewer advantages of the servers capabilities because they are running

    in processes separate from the servers process and they are platform dependent. E.g.

    servers log file cannot be written from CGI program.

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    23/112

    P a g e | 18

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    The liabilities above do not exist with the servlet. They are scalable and efficient

    because each time they are been executed no new processes are created; instead,

    separate threads within the web server process are handled by the Servlet. They take

    advantages of other server capabilities because they run in the servers own process

    and can write log files of a server. The servlet is designed to fulfill the "Write Once, Run

    Anywhere" promise inherent in java programming, without modification on platform

    servlet can be executed.

    (Servlet Instant Tutorial, 2002 )

    5.3 JAVA Servlet working method

    This figure below shows one of the most common ways of using a servlet.

    Figure 5.3: JAVA Servlet methods

    The steps shown in the above figure consist of:

    A user requests some information by filling out a form containing a link to a

    servlet and clicking the submit button

    The server locates the requested servlet

    The servlet then gathers the information needed to satisfy the users request and

    constructs a Web page containing the information That Web page is then displayed on the users browser

    (Servlet Instant Tutorial, 2002 )

    http://java.sun.com/products/servlet/articles/tutorial/http://java.sun.com/products/servlet/articles/tutorial/http://java.sun.com/products/servlet/articles/tutorial/http://java.sun.com/products/servlet/articles/tutorial/
  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    24/112

    P a g e | 19

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    5.4 Stock Data SourcesBased on the research on the JAVA Servlet technology, the mechanism to download

    stock data from any resources must be achieved in order to provide the information to

    the client. JAVA Servlet will be the one who will download the data and process it for the

    client but the differences is client is not invoking the servlet through input button on the

    web page, but through mobile phone GPRS network.

    One of the most possible solutions is downloading the stock quotes information from

    Yahoo Finance. This is due to several reasons which are:

    Yahoo Finance provide free checking of stock quotes

    Fast responds of stock quotes

    There are lots of information that can be seen on this web site

    US Stock information is available

    Although there are others Stock Quotes provider on the world in web based technology,the familiarity and the method of downloading Yahoo Finance data is much easier then

    any other sources.

    5.5 Downloading Yahoo Finance Stock DataAs mentioned earlier, Yahoo Finance provides mechanism of stock quotes in web

    based form. These data can be downloaded onto the system in the form of CSV

    (Comma Separated Value). Based on this CSV file only, the data can be viewed and

    manipulated using the Microsoft Excel software.

    In order to download the data, the URL of the page must point to certain purpose of

    downloading data. For Yahoo Finance, there are some characteristics to download live

    stock quotes data from them.

    The format of URL is: http://finance.yahoo.com/d/quotes.csv?s=Stock

    Symbols&f=Special tags

    The stock Symbols can either one or multiple stock symbols. If multiple stock symbols is

    going to be downloaded, each of the stock symbol must be separated by + sign.

    The special tags indicate the data that is going to be downloaded from Yahoo finance.

    There are lots of tags maps to certain data that can be downloaded which is shown in

    below table.

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    25/112

    P a g e | 20

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    Figure 5.5: Special tags table(Yahoo Data Download, 2001 )

    http://gummy-stuff.org/Yahoo-data.htmhttp://gummy-stuff.org/Yahoo-data.htm
  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    26/112

    P a g e | 21

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    For example, if the URL of the address is:http://finance.yahoo.com/d/quotes.csv?s=BBDB.TO+NT.TO+GE+MSFT&f=snl1d1t1ohgdr

    The result of the data will be shown as the figure below

    Data Result(Yahoo Data Download, 2001 )

    Based on these data, it can be used to provide the information to the client. Note that,not all the tags is important for the business people, most of the parameter that is

    commonly shown in stock quotes is explained earlier in chapter 1 regarding Stock

    Quotes.

    Using this URL, JAVA Servlet will be used to download the data and parse & process

    the information before sending it to the client.

    Therefore the possible steps of invocation are:

    Client request for viewing stock

    Client specify stock symbol The servlet receive the request and connect to Yahoo Finance

    The servlet download the stock symbols data

    The servlet parse and process the information

    The servlet send the result to the client to view

    http://gummy-stuff.org/Yahoo-data.htmhttp://gummy-stuff.org/Yahoo-data.htm
  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    27/112

    P a g e | 22

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    CHAPTER 6: Fact finding methods for requirement gathering

    6.1 Introduction

    There are some techniques used in the fact finding method to get user requirements

    such as interview, questionnaire, observation, etc. This is done by collecting the sourcefrom the people regarding requirements of the system. It should be clear enough to

    make the one who answering or being interviewed can give their opinion on what to be

    done. Based on this method, the problems or requirements can be identified and make

    it as part of the proposed system requirements and specifications.

    6.2 Various Fact Finding Methods

    There are different types of fact finding methods ranging from background reading,

    questionnaire, interview, and observation. The author decided to use the questionnaire

    as its fact finding techniques.

    6.2.2 Questionnaire

    Questionnaires are a research instrument that can be applied to fact finding in system

    development. They consist of a series of written questions. It is very potential way to get

    the information from any parties. The design of the questionnaire should be careful due

    to there are various types of method in designing the questions. A well design question

    is used effectively to gather overall information regarding the proposed system and

    performance.

    Advantages of questionnaire It is the best way of gathering data/information a large number of individuals.

    If it is well designed, results analysis is easily done.

    Allows anonymity of respondents.

    Easy to gather information.

    Disadvantages of questionnaire

    Difficult to construct the question

    No automatic mechanism for follow up more deeply.

    Time consuming of calculation.

    (Survey Method, 2005)

    http://www.cemca.org/books/chap9.htmhttp://www.cemca.org/books/chap9.htm
  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    28/112

    P a g e | 23

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    6.3 Proposed System Questionnaire and Its analysis

    Based on the analysis of various fact finding method, the used fact finding method that

    will be used is the questionnaire, this is because of the time constraints and also the

    number of respondents is a lot in the college.

    Based on the objective, the author has defined numbers of questions for the

    respondents to answer. It is distributed through various people. Based on the responds

    from respondents the result is being calculated in pie chart percentage.

    SECTION A: Stock Exchange

    1. Do you know about stock exchange?a. Yes b. No

    Figure 6.3.1: Question 1

    The result of the questionnaire shows that the 95% of the people that answered thequestionnaire as familiar with the stock exchange and only few 5% ticked not to knowabout it.

    Yes95%

    No5%

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    29/112

    P a g e | 24

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    2. Would you like to add stock symbols you want to monitor or select from list ofstock symbols?a. Add b. Select

    Figure 6.3.2: Question 2The result of the questionnaire shows that 75% of the people prefer to add the stocksymbol they want to monitor while just 25% of the people would prefer selecting fromthe whole list of the stock exchange for the stock they want to monitor.

    3. Would you like the application to save stock history?a. Yes b. No

    Figure 6.3.3: Question 3The result shows that 89% almost 90% of the people want to save the stock exchangehistory of the stock they entered while few dont mind saving.

    Add75%

    Select25%

    Yes89%

    No11%

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    30/112

    P a g e | 25

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    4. What duration of the Stock exchange history to be?a. 1 week b. 1 Month c. 3 Months d.1 year

    Figure 6.3.4: Question 4The result shows that the people want to keep the history of the stock exchange 25%for 1 week, 25% for a Month, 25% for 3 months and also 25% for a year.

    5. How would you like your stock quotes to be displayed with?a. Percentage b. Price c. Market Capital

    Figure 6.3.5: Question 5The result shows most of the people 79% of them like to view their stock quotes inprices, 13% like to view it in percentage while 8% in market capital.

    1 Week25%

    1 month25%

    3 Months25%

    1 Year25%

    Percentage13%

    Price79%

    Market Capital8%

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    31/112

    P a g e | 26

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    6. Would you like the application to provide you a Stock gainers list?a. Yes b. No

    Figure 6.3.6: Question 6The result shows that almost all the people answered yes they would like the stockgainer list which is the 90% of the people that answered and the 10% dont mind.

    SECTION B: Mobile Phone Usage

    7. What phones are you using now?a. Nokia b. Sony Ericsson c. Blackberry D. HTC e. Others ____________

    Figure 6.3.7: Question 7The result shows that most of people nowadays go for Nokia phone due to the featuresthey offered and the price that is more acceptable than the other brands.

    Yes

    90%

    No

    10%

    Nokia40%

    SonyEricsson

    20%Blackberry

    8%

    HTC12%

    Others20%

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    32/112

    P a g e | 27

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    8. What are the features did you mostly used in the phone except for phone call?a. WAP/ GPRS browsing b. SMS and MMS messaging c. Others ________

    Figure 6.3.8: Question 8The result shows that most used features of the phone is messaging because of cheap,flexible, and supported by any brand of phone except MMS

    9. Have you ever used any services related to business services such as onlinebanking through mobile?a. Yes b. No

    Figure 6.3.9: Question 9The result shows that the people has ever used mobile to perform business relatedactivity, and based on question 10 results, it shows that most of the services used is theonline banking.

    WAP/GPRS25%

    SMS andMMS50%

    Others25%

    Yes78%

    No22%

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    33/112

    P a g e | 28

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    SECTION C: User Opinion

    10. Where do you usually get the information about stock market?

    a. Newspaper b. Television c. Online through Internet d. Others ____________

    Figure 6.3.10: Question 10The result shows that the most used media for retrieving information through theinternet is from online through Internet web. This shows how Internet has growth up totoday. This is due to the convenience which means when using computer, they candirectly check for the stock market.

    11. What type of representation did you prefer in checking the market stock?a. Graph/Chart b. Text only c. Others ____________ (please specify)

    Figure 6.3.11: Question 11The result shows that most of the users want the information of stock market is viewedusing graph. It is because they can check for the status of the shares of each month oryear, whereas for the text, they can only retrieve the information of current share status.

    Newspaper

    16%Television

    10%

    Online

    63%

    Other

    11%

    Graph/Chart

    78%

    Text Only

    20%

    Others

    2%

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    34/112

    P a g e | 29

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    12. What are the business related services you have ever used? (If no, then leavethis blank)The result of this question based on those who answered most of them used the

    banking system via mobile phone and the rest havent used any of such relatedservices.

    13. Will you use this feature in future?a. Yes b. No

    Figure 6.3.13: Question 13The result show that 90% of the user is expecting to use the stock exchange mobilesystem and based on the result on question 13 they are mostly expecting for ease ofuse of the system.

    14. What are your expectations through the mobile stock exchange system?________________________________________________________________________________________________________________________________________________________________________

    Yes90%

    No10%

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    35/112

    P a g e | 30

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    6.4 Questionnaire Result AnalysisBased on the respond of the respondents, the following result analysis has been

    produced.

    Stock exchange is familiar to most of the people.

    All people have mobile nowadays, after through observation 50% of the users

    mobile are capable for such application.

    Mobile phone is frequently used by people. 80% of usage is SMS messaging

    whereas the rest is for the phone call or other features.

    Nowadays most people also using business services through mobile such as

    online banking therefore the proposed system seems to be promising.

    Chart on the stock information is more popular due to they can keep track on the

    price status before buying the shares from the broker.

    The respondents are looking forward to see the proposed system and used it inthe future.

    Mobile used is an alternative way of retrieving stock information rather from the

    newspaper and magazine, as it is more portable and being used every day.

    In overall, reliable system should be produced on the mobile real time stock

    exchange and it is a very promising feature in business especially for the business man

    and share holders.

    6.5 ConclusionIn conclusion, the author has managed to gather some requirement feedback from the

    user through questionnaire as it was distributed up to 30 copies. Some of them can

    cooperate to really fill in what the question is asking but some of them also simply fill in

    without really notice what the question is asking. But most of the copies are being well

    filled in. Based on this result, the functional and non functional requirement will be

    identified in the later chapter.

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    36/112

    P a g e | 31

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    Chapter 7: Functional and non functional requirements of the

    system

    7.1 Introduction

    Software system requirements are usually classified as the functional and the nonfunctional requirements. For example, requirement in security can be said a non

    functional requirement but if developed in much more details, it may lead to some other

    requirement that leads to the functional requirements such as authorization facilities in a

    system. The other types of requirements are the software, hardware and user

    requirements. Hardware requirements are the various components/hardware needed in

    running the system where as software requirement are the applications/softwares that

    required in developing the system. User requirements are the expectations of user of

    the system based on the fact finding methodologies.

    7.2 Hardware RequirementsTo develop this system, the following requirements hardwares are needed.

    Intel Core 2 Duo Processor

    1GB RAM or Above

    250 GB hard disk

    4GB Pen Drive

    SVGA Monitor

    Mouse

    Keyboard

    Mobile Phone supporting GPRS

    7.3 Software RequirementsThese are the software requirements that is needed to develop the system

    Microsoft Windows XP or higher

    Java Development Kit (JDK 1.6.0)

    Microsoft Office

    J2ME Wireless toolkit

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    37/112

    P a g e | 32

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    7.4 User Requirements

    The requirements collected from the questionnaire that has been done.

    7.4.1 Functional Requirements

    Functional requirements can be defined as statements of services the system should

    provide, how the system should react to particular inputs and how the system should

    behave in particular situations. These depend on the type of system that is being

    developed, the expected users of the system and the type of system which is being

    developed. In principle, the functional requirements specification of a system should be

    complete and consistent. Completeness means that all services required by the user

    should be defined. Consistency means that requirements should not have contradictory

    definitions.

    (Software Requirement, 2004)

    Functional requirements of the proposed systems are:

    Stock symbol addition

    User should be able to add Stock Symbol and the system should be able to verify and

    add the symbol entered by the user.

    Share price information retrieving

    This means the system should provide the information of the stock that is being

    requested by the user on certain symbol of stock.

    Detailed stock description

    User should be able to view stock they added and the system can provide a detailed

    description on certain stock symbol such as current price, last price, increment, etc.

    History View

    User should be able to view stock exchange history of certain duration

    Shows a graphical chart for tracking

    This means that the system can provide a chart to shows the status of the stock on

    certain months or year.

    Sorting of own database stock gainers and losers

    User should be able to access the top gainers of the stock symbols added. This means

    the system provides sorting of stock gainers and losers of the user own stock list in themobile phones.

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    38/112

    P a g e | 33

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    7.4.2 Non-Functional Requirements

    Non functional requirements are constraints on the services or functions offered by the

    system. They include timing constraints, constraints on development process,

    standards, etc. Many non functional requirements relate to the system as a whole rather

    than to individual system feature. This means that they are often more critical than

    individual functional requirements. Failure to meet non functional requirements can lead

    to make the whole system unusable. Mostly these requirements arise through user

    needs, time constraints or needs of interoperability with other external factors.

    (Software Requirement, 2004)

    Non-functional requirements of the proposed systems are:

    Performance

    It is measured by the response time and efficiency of the system. This is a veryimportant issue for the success of the system. When retrieving the information of stock

    users do not want to wait for long time as it is important for them to make decision

    whether to buy the shares or not. Therefore good and effective algorithm should be use.

    Reliable

    System should be accurate in the information and no failure on it. There is no error in

    the information displayed as it is very important and recovery from any failure is also

    extremely important.

    Maintainability

    System should be easily maintained. This is due to an error occurred in the code; it can

    be identified easily and solved the problem easily. Maintenance is very important afterthe system is finally developed.

    Usability

    This means that the system should be ease of use, easy to learn and have a good

    interface design for interaction with the users. Bad design will leads to the user

    dissatisfaction and refuse to use the system. This can be achieved through the use of

    GUI and chart in representing the information.

    7.4 Conclusions

    Based on these requirements, the proposed system is being developed. This acts as abaseline that is needed to perform the analysis and design of the system. The

    requirements above are main priorities to be fulfilled on the proposed system whereas

    other unambiguous requirements will be considered after completing the main

    requirements.

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    39/112

    P a g e | 34

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    Chapter 8: Selection of Suitable Tools and Technique for System

    Development

    8.1 Introduction

    The tools and technique or methodologies is important in developing the proposedsystem. Tools are including the software that will be used and techniques are the

    methodologies such as Software Development Life Cycle, Prototyping, Rapid

    Application Development (RAD), etc for development process.

    Based on some reviews on various techniques the author decided to use Software

    Development Life Cycle (SDLC) and part of prototyping method in developing the

    proposed system.

    8.2 Software Development Life Cycle

    SDLC technique will be used as the main technique in the development of the proposed

    system. SDLC or usually called waterfall model is a technique that consists of number

    of steps to be completed in sequence from up to down therefore called waterfall.

    Figure 8.2 SDLC Diagram

    (SDLC, 2005)

  • 7/28/2019 Develop a mobile application for stock exchange monitoring using J2ME.

    40/112

    P a g e | 35

    Develop a mobile application for stock exchange monitoring using J2ME.

    Prepared by: Muazu Muazu BSECUN Double Module Project January, 2010 Session

    SDLC Phases

    Planning

    In this stage, the planning is being established for the project. It includes the time, cost

    and what is the scope of the project. Good planning will leads to the good analysis and

    design in later stage. Therefore later stage is dependable to the previous stage before

    it.

    Planning on this proposed system has been completed through the project specification

    submitted in the earlier phase of the project.

    (SDLC, 2005)

    Analysis

    In this stage, the feasibility study is being done to identify the requirement for the

    system. It is