Vous êtes sur la page 1sur 80

ONLINE SHARE TRADING

ONLINE SHARE TRADING


Minor Project Submitted in Partial Fulfillment of the Requirements for the degree of Masters in Computer Application

By NAME RIYA KAYAL RIMA SAMANTA ENROLMENT NO 09167010005 09167010041 SIGNATURE

Under the guidance of

SANJOY BARMAN RAY

MANAGEMENT INSTITUTE OF DURGAPUR G.T Road, Rajbandh Durgapur-713212 2011

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 1

ONLINE SHARE TRADING


MANAGEMENT INSTITUTE OF DURGAPUR (West Bengal University of technology (WBUT)) FACULTY OF MCA DEPARTMENT

Certificate of Recommendation

This is to certify that RIYA KAYAL and RIMA SAMANTA have completed their project work titled Minor project on: ONLINE SHARE TRADING, under the direct supervision and guidance of Prof. SANJOY BARMAN RAY. I am satisfied with their work, which is being presented for the partial fulfillment of the degree of Master of Computer Application (MCA), West Bengal University of technology (WBUT), Kolkata 700032.

SANJOY BARMAN RAY Asst. Prof. of MCA Dept. (Teacher in charge of Project) Date:

Prof. NIRUPAM BARMAN HOD MCA Department (MANAGEMENT INSTITUTE OF DURGAPUR)

Date:
MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT Page 2

ONLINE SHARE TRADING

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 3

ONLINE SHARE TRADING

West Bengal University of technology (WBUT) FACULTY OF MCA DEPARTMENT


Certificate of Approval * The foregoing Minor project is hereby approved as a creditable study of Master of Computer Application (MCA) and presented in a manner satisfactory to warrant its acceptance as a pre-requisite to the degree for which it has been submitted. It is understood that by this approval the undersigned do not necessarily endorse or any statement made, opinion expressed or conclusion therein but approve this Minor project only for the purpose for which it is submitted.

Signature of the examiners

Final Examination for Evaluation of the Project


Only in case the Minor project is approved

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 4

ONLINE SHARE TRADING

Acknowledgement
We are very grateful to our Principal DR. A. H. ANSARI for providing us with an environment to complete our project successfully. We are deeply indebted to our Head of the Department Mr. NIRUPAM BARMAN, who modeled us both technically and morally for achieving success in project. We are very grateful to our internal guide and Project coordinator Mr. SANJOY BARMAN RAY, for supervising the project and for his valuable advice and help with the books and reference materials. Heartfelt thanks are also conveyed to all the members of the teaching and nonteaching staff of the Department of MCA for their cordial support and help, whenever needed. Finally, we take this opportunity to extend our deep appreciation to our family and friends, for all that they meant to us during the crucial times of the completion of our project.

MANAGEMENT INSTITUTE OF DURGAPUR G.T Road, Rajbandh Durgapur-713212

Date: 28.11.2011

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 5

ONLINE SHARE TRADING

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 6

ONLINE SHARE TRADING

CONTENTS
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. Objective and Scope of the Project -------------------------------- -------7 Theoretical Background --------------------------------------------- -------3 - 5 Definition of Problem ------------------------------------------------ -------9 System Analysis and Design ---------------------------------------- -------10 - 13 System Planning (PERT Chart) ------------------------------------ -------14 - 13 Methodology Adopted and System Implementation ------------ -------16 - 17 Details of Hardware and Software Used -------------------------- -------18 - 19 System Maintenance and Evaluation ------------------------------ -------20 - 22 Cost Benefit Analysis------------------------------------------------- -------23 - 24 Detailed life Cycle of the Project ---------------------------------- -------22 - 28 Input Output Screen Design ---------------------------------------- -------29 - 67 Methodology used for Testing ------------------------------------- -------68 - 71 Testing Report -------------------------------------------------------- -------72 - 79 Source Code of Project ---------------------------------------------- -------80 - 174 User Manual ----------------------------------------------------------- -------175- 178 Brief background of the Organization------------------------ ----------179 - 180 Data Dictionary------------------------------------------------------------181 - 184 Reference-------------------------------------------------------------------185 - 186

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 7

ONLINE SHARE TRADING

OBJECTIVE AND SCOPE OF THE PROJECT


Online Share Trading Software (OSTS) is a software application for trading of share to buy or sell a share. Online share trading system provide capabilities for registering a new client and other share related calculations with the help of server, calculate the account balance of a client after trading of a share, update and deletion of any client by the administrative user, and managing broker-client agreement form by the admin user or broker who is registered to the server. Online Share Trading Software (OSTS) is a web-based application software designed to introduce a conductive and structured information exchange environment for administrative user (or broker) and normal user (or client) of a share trading company. This software enable brokers to supervise client-related activities such as keeping records of daily trading, deletion of client, updating of client data, particulars of ups and downs of share, and all other share-related activities; in short, they provide a complete share trading system. They are designed with diverse application potentials ranging from simple management of clients records at server to management of all clientrelated functions as well as administrative functions of a trading server. Until recently, the common functions of a Online Share Trading Software are to support the maintenance of personal and trading information relating to:

Handling inquiries from prospective clients Handling the registration process Enrolling new clients Automatically creating ups and downs of the share price Handling records of buying, selling, balance , price of share Maintaining records of ups and downs of share price Recording broker client agreement data

This Online Share Trading Software solved all the problems like selling, buying, official procedure of client account balance calculation and trading information of a client. This software solved all the problems for share trading companies like R&R Share Trading Co. These make very easy and time saving for any share trading company.
MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT Page 8

ONLINE SHARE TRADING

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 9

ONLINE SHARE TRADING

DEFINITION OF PROBLEM
We all live in this world with our expectations. Expectations are never ending and that of to get more and more of what we have now. Now a day it is very difficult to maintain any work without computer and internet. Any trading software is maintained now by internet like Online Share Trading Software.

At the same time it must bring all the facilities to a client and broker. This online share trading software makes for R&R Share Trading Co. It brings client registration, client data modification, searching and trading facilities for an administrative user (broker) and showing the details of share price, assumptions of future ups and downs of a share and the trading details of a client. Since this is not connected to the server it will not show the actual ups and downs of the price of a share.

Online Share Trading Software did this for users. The main problem of combining these facilities is done very well in this site. But there was another very essential issue that might cause problem to users. Security is one of the key aspects in any website. Data that user wants to keep only to himself, must not be reachable to others. It is specifically essential in respect to login credentials. To deal with such key aspects was not easy at all. User sessions must be maintained deficiently. Database handling is also a very important issue as the number of users and there data are generally very high and they increase rapidly day-by-day. So the system must be flexible, and database must be independent of any changes in system design. Mainly student information system software deals with a lot of complexity probably the highest among all kinds of websites or systems.

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 10

ONLINE SHARE TRADING

SYSTEM ANALYSIS AND DESIGN


System analysis is a key part of system development in which we determine how the system functions and access what users would like to see in that particular system. System analysis and design for information systems were founded in general systems theory, which emphasizes a close look at all parts of a system. Too often analysts focus on only one component and overlook other equally important components. General systems theory is concerned with "developing a systematic, theoretical framework upon which to make decisions." The idea of systems has become most practical and necessary in conceptualizing the interrelationships and integration of operations, especially when using computers. Thus, a system is a way of thinking about organizations and their problems. It also involves a set of techniques that helps in solving problems. Information systems analysis and design is an organizational improvement process. Systems are built and rebuilt for organizational benefits. Benefits result from adding value during the process of creating, producing and supporting the organization's products and services.

These applications run the gamut of everything businesses do, including transmitting orders and payments to suppliers, fulfilling orders and collecting payments from customers, maintaining business relationships, and establishing electronic marketplaces where businesses can shop online for the best deals on resources they need for assembling their products and services. Although the Internet seems to pervade business these days, it is important to remember that many of the key aspects of business-offering product or service for sale, collecting payment, paying employees, maintaining supplier and client relationships have not changed in the Internet age.
MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT Page 11

ONLINE SHARE TRADING

An important result of system analysis and design is application software. The total information system includes the hardware and systems software on which the application software run, documentation, and training materials, the specific job roles associated with the overall system, controls, and the people who use the software along with their work methods. In the early years of computing; analysis and design was considered an art. Now that the need for systems and software has become so great, people in industry and academia have developed work methods that make analysis and design a disciplined process. Our goal is to help to develop the knowledge and skills needed to understand and follow such software processes.

There are many ways of gathering information of system requirements. Some of the main and traditional techniques of system analysis are listed below. Individual or group interview with diverse needs. Observe workers at selected times. Study business documents. Joint Application Design (JAD). Using group support system to facilitate the sharing of ideas. Using CASE tools to analyze current systems to discover requirements. Iteratively developing system prototypes that refine the understanding of system requirements. Continual user involvement by site visit and other ways. Identifying processes to reengineering the system.
MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT Page 12

ONLINE SHARE TRADING

System design is to plan a solution to the specified problem in the requirement document and is the first step in moving from the problem domain to solution domain. In other words starting with 'what' is needed in the requirement analysis step, now design takes us towards the 'how' episode of the requirement specification. The design of the system is perhaps the most critical factor affecting the quality and hence the reliability of the software to match the user needs. The input of the phase is theses obtained in the previous phase and the output is the 'design document' which is similar to blueprint / plan for the solution and used in the later phase of the development. The design (using leveled DFDs) of the proposed software system has been presented in later on of the project report.

The design phase focuses on the detailed implementation of the system recommended in the feasibility study. Emphasis is on translating performance specifications into design specifications. The design phase is a transition from a user-oriented document to a document oriented to the programmers or data base personnel.

A design methodology is systematic approach to create a design by application of a set of technology and guidelines. The design activities can. be divided into parts based upon the details of the exploration and is as follows: a) System design b) Detailed design System design goes through two phases of development: Logical design and Physical design: When analysts prepare the logical system design, they specify the user needs at a level of detail that virtually
MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT Page 13

ONLINE SHARE TRADING


determines the information flow into and out of the system and the required data resources. Physical design produces the working system by defining the design specifications that tell programmers exactly what the candidate system must do.

Detailed design of the internal logic of the each module is specified. Implementation of the component is described. Coding phases affects both testing and maintained profoundly. Well-written code can rescue the testing and maintenance. Simplicity and clarity is flowed in writing the code.

As far as the requirements of Share Trading system for R&R Share Trading Co., is concerned, we collected them by continuously visiting many popular Share trading software and websites. They helped us to a great extent to collect all necessary information about a Share Trading site. Client Registration, Searching, Entry, Daily Trading, Update, Delete, Assumption on next day share prices are the facilities of this software. So it becomes another very essential requirement of Online Share Trading Software. Buying and Selling of a share is another dicey issue as every share trading software follows it. We get this idea from SHAREKHAN website. The most important requirement of a system is its data security. Many items in Share Trading software is made customized in respect to access. That scenario must not be broken. The password checking system activate for administrator as well as normal user in this software. All these feature make success of Online Share Trading Software for R&R Share Trading Co.

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 14

ONLINE SHARE TRADING

SYSTEM PLANNING (PERT CHART)


One of the most difficult and most error-prone activities when constructing a project schedule is the determination of the time duration for each task within a work breakdown structure. It is particularly problematic to make these estimates when there is a high degree of complexity and uncertainty about a task. PERT (Program Evaluation Review Technique) is a technique that uses to calculate the expected time for a particular task.

For large projects, the dependencies among activities are important in order to determine which are critical activities, whose completion should not be delayed, and which activities are not critical. To represent the dependencies, PERT charts are often used. A PERT chart is a graph-based chart. It can be used to determine the activities that form the "Critical Path", which if delayed will cause the overall project to delay.

Here the total man-hour allotted for the project to be developed is 300 manhours approximately. If on an average, a man-day contains 5 man-hours then the whole project is to be developed within 60 man-days approximately. Here Saturdays, Sundays and other holidays are not taken in consideration to count the total man-days. The PERT chart is described as follows:

While developing PERT chart for Online Share Trading System for R&R Share Trading Co., We allot a maximum time of 100 man-hours for coding.

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 15

ONLINE SHARE TRADING

Project Evolution and Review Technique

20 hrs 20 hrs Start Planning 30 hrs

50 hrs Designing

100 hrs

150 hrs

Coding

50 hrs 220 hrs

Documentation 20 hrs

Testing

200 hrs

Fig: PERT Chart Planning of Online Share Trading Software

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 16

ONLINE SHARE TRADING

METHODOLOGY ADOPTED AND SYSTEM IMPLEMENTATION

First of all the problem should be clearly defined. Then it is required to study the system thoroughly in order to make a clear and transparent conception of what there is in the already existing system and what is to be done to make it computerized. In this purpose, the techniques adopted are the requirement elicitation and requirement analysis.

The requirements are gathered by studying different documents and by interviewing the related and authorized persons formally and informally. After analyzing the requirements a Software Requirement Specification (SRS) is written and it is produced to the appropriate authority of the system to get it approved. After approval of the SRS the actual development work begins. The other facts arid fictions of the system are elicited in order to tune the requirement criteria.

Then the analysis models are developed to represent the system pictorially/ graphically. From these analysis models the system design is generated to represent the components, functions and behavior of the system. In this connection, DFD (Data Flow Diagram), Structure Chart, System Flow Chart etc are generated. Also the database is designed appropriately to make it compatible to the system. The front-end screens are first designed.

Then coding is started. After the coding is completed, different testing

methods are adopted to trap the errors. White-box testing is to be performed


MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT Page 17

ONLINE SHARE TRADING


to focus on the program-control-structure. This is done to ensure that all statements in the program have been executed at least once during testing and that all logical conditions have been exercised. Different types of runtimeerrors are expected to be get trapped by this method of testing. Besides this black-box testing method is to be used for testing the developed project to validate the functional requirements without regard to the internal workings of a program. For this boundary-value analysis technique is used, i.e. the testing of developed software at different boundary-level data is carried out. This ensures program's ability to handle data at limits of acceptability. testing is conducted at the developer's site by a customer. -testing is conducted at one or more customer sites by the end-user of the software. The system is continuously debugged and tuned while conducting the testing process.

After conducting all the aforementioned procedures a user-manual is composed as a guide to the end-users. It includes security aspects, access rights, back up, controls etc. As the implementation starts, the system is launched as software. End users will use it as per need. If any problem arises, they can report it to developer team by mailing through "contact-us" section of the R&R.COM.

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 18

ONLINE SHARE TRADING

System Requirement & Specification(SRS)


Hardware Used:

Processor

: Intel(R) Core(TM)2 Duo CPU

Mother Board

: Intel DH55TC

Graphics Card

: NVIDIA GeForce GT 430

Primary Memory

: 2 GB

Secondary Storage

: 160 GB

Display Unit

: LG Color Monitor 22

Disk Drive

: LG DVD RW 52X

Key Board & Mouse

: Microsoft keyboard and Mouse

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 19

ONLINE SHARE TRADING

Software Used:
Platform : Windows 7 SP III

Language Used

: JSP (version JDK 1.6)

Database

: Oracle 11i

Web Server

: Glassfish V3 Domain

Browser

: Internet Explorer 8

Application Software

: Photoshop CS2

IDE

: Net Beans IDE 6.8

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 20

ONLINE SHARE TRADING

SYSTEM MAINTENANCE AND EVALUATION


Maintenance means restoring something to its original condition. Maintenance is an activity that commences after the software is developed and deployed. Software needs to be maintained not because some of its components "wear out" and need to be replaced, but because there are often some residual errors remaining in the system which must be removed later as they are discovered. Furthermore, the software often must be upgraded and enhanced to include more features and provide more services. This also requires modification of the software. Hence, maintenance is unavoidable for software systems. Once a system is installed, the system is essentially in the maintenance phase. When a system is in the maintenance phase, some person within the systems development group is responsible for collecting maintenance requests from system users and other interested parties, such as system auditors, data center and network management staff, and data analysts. Once collected, each request is analyzed to better understand how it will alter the system and what business benefits and necessities will result from such a change. If the change request is approved, a system change is designed and then implemented. As with the initial development of the system, implemented changes are formally reviewed and tested before installation into operational systems. Maintenance can be defined by describing four activities that are undertaken after a program is released for use. The four different maintenance activities are Correction, Adaptation, Enhancement and Prevention.

. Correction:
Even with the best quality assurance activities, it is likely that the customer will uncover defects in the software. It is generally agreed for large systems as the current one. Maintenance activities related to fixing of errors fall under corrective maintenance. Here, in this case the end-users are advised to record
MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT Page 21

ONLINE SHARE TRADING


any further erroneous result generated by the developed software after its installation. These are to be reported to the developers in order to take proper measures for further debugging and tuning.

. Adaptation:

Maintenance is also needed due to a change in the environment or the requirements of a system. The introduction of a software system affects the work environment. This change in environment (e.g. CPU, Operating System, Business rules, external product characteristics) often changes what is desired from the system. Furthermore, often after the system is installed and the user have had a chance to work with it for some time, some of the needs that were not uncovered during requirement analysis, surface. This occurs since the experience with the software helps the user define the needs more precisely. There might also be changes in the input data, the system environment and output formats. All these require modification of the software. The maintenance activities related to such modifications fall under adaptive maintenance. It is advised to the end-users of the currently developed software to report appropriately to the developers about any environmental changes and about any change in the input-output requirements that would take place after the software would be used for a sufficient period of time.

. Enhancement:
As software is used, the customer/user will recognize additional functions that will provide benefit. Perfective maintenance or enhancement extends the software beyond its original functional requirements.

. Prevention:
Computer software deteriorates due to change and because of this, preventive maintenance, often called software reengineering, must be conducted to enable the software to serve the needs of its end-users. In essence, preventive maintenance makes changes to computer programs so that they can be more easily corrected, adapted and enhanced.
MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT Page 22

ONLINE SHARE TRADING


To recover the system from severe crash of hardware or software the endusers are advised to take a daily back up at the end of everyday in. a suitable secondary storage device, except the current hard disk. Maintenance work is based on existing software, as compared to development work, which creates new software. Consequently, maintenance revolves around understanding existing software and maintainers spent most of their time try to understand the software they have to modify'; Understanding the software involves not only understanding the code, but also the related documents. During the modification of the software, the effects of the change have to be clearly understood by the maintainer since introducing undesired side effects in the system during modification is easy. Maintenance of Online Share Trading Software has already been started by us as the coding ended for it. Actually during the time of testing, we started maintaining it, adding new features to it, modifying the existing code. Now we are working on it to add more advanced features like advance searching like client-name wise or share-name wise, showing the ups and downs of the share price etc. At the same time we are increasing reusability of codes by continuously modifying it, adding classes, making it more and more object oriented. In the long run, this software will be launched as a Software, what is one of our dreams. Then we will take total control of maintenance on it. As we are dealing with the maintenance and will do so in future, the maintenance cost is zero. This work will properly be evaluated by the users of this software when it will be working as successful software.

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 23

ONLINE SHARE TRADING

COST BENEFIT ANALYSIS


It deals with the study of economic feasibility that means whether a project being made will give required benefit to the organization that developed it. Total cost is estimated for the project by the analyst. It includes cost for resources, development cost and cost for maintenance. Once it is achieved, the benefit is calculated. If organization head thinks that the benefit which they are getting from it is ok, then it is declared as economically feasible for them. Otherwise they may reject the project work or may demand more prices for it.

System costs are those which contribute to the cost of developing, implementing and operating a system. System benefits are those products or improvements which result from the system and which benefit the organization. Cost/benefit analysis is a procedure that gives a picture of the various costs, benefits and rules associated with a system. Costs are incurred throughout its life cycle. Benefits are realized in the form of reduced operating costs, improved corporate image, staff efficiency etc. To what extent benefits outweigh costs is the function of cost/benefit analysis.

The determination of costs and benefits entails the following steps: 1. Identify the costs and benefits pertaining to a given project. 2. Categorize the various costs and benefits for analysis. 3. Select a method of evaluation. 4. Interpret the results of the analysis. 5. Take action.

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 24

ONLINE SHARE TRADING


There are several different types of system costs and benefits which the analyst is concerned with 1. Tangible or intangible costs/benefits 2. Direct or indirect costs/benefits and 3. Recurring or nonrecurring costs/benefits. Among these three types of costs/benefits, we consider only the Tangible costs/benefits. Also we do not classify costs/benefits in Direct and Indirect categories. The cost and benefit analysis we made, is based only upon the categorization in recurring and nonrecurring costs/benefits. We aim to use Break-Even Analysis from the comparative cost data we found. In order to determine system costs, the analyst must obtain the information regarding:

Personnel Costs Equipment Costs Supplies and expense Costs Overhead Costs

As an educational level project, Online Share Trading has no economic benefits, but as I made it, its development cost is also nothing except the time that I spend in making it (220 man-hours). Never the less in future, I am aiming to launch this project as user friendly share trading software. As it will gradually be popular, I believe it will start giving revenue by means of advertisements. If I connect to the actual server of share trading and other business issues to it, then it will surely be one of the economic assets of mine.

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 25

ONLINE SHARE TRADING DETAILED LIFE CYCLE OF THE PROJECT

Context Level DFD

NORMAL USER

ONLINE TRADING SYSTEM

ADMINISTRATIVE USER

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 26

ONLINE SHARE TRADING

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 27

ONLINE SHARE TRADING


1st LEVEL DFD
NORMAL USER

CLIENT

1
DETAILS

VERIFIED DATA

LOGIN MODULE

S2 (Client) Table

ADMINISTRATIVE USER

ADMIN USER
CLIENT INFO

VERIFIED DATA

ADMIN TABLE

TRADING DETAILS 2

SHOW PRICE INFORMATION TDETAILS TABLE

TRADING DETAILS

SHOW TRADING MODULE

NEXT DAY PRICE

FUTURE PLAN MODULE

FP (FUTURE PLAN) TABLE

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 28

ONLINE SHARE TRADING

Extended DFD of module 1 (Level 2)

UPDATED DATA OLD DATA ADMIN USER


1.1

UPDATE MODULE

TDETAILS TABLE

REQUEST

DELETE DATA
1.2

DELETE MODULE

TDETAILS TABLE

SEARCH DATA
1.3

SEARCH RESULT
TDETAILS TABLE

SEARCH MODULE

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 29

ONLINE SHARE TRADING

Extended DFD of module 2 (Level 2)

BUY/ SELL

STORE UPDATE BALLANCE


2.1

CLIENT

BALANCE UPDATE MODULE

S2 (CLIENT) TABLE

RESULT SEARCH
2.2

SEARCH BALANCE MODULE

S2 (CLIENT) TABLE

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 30

ONLINE SHARE TRADING ER DIAGRAM OF ONLINE SHARE TRADING


PASS1 UID1 ACNO BRNM TCON S2 (Client Table) BNM OFFPRC BIDQTY QTY SNM RATE IBL HIGH UID1 TDETAILS (TRADING DETAILS)
ANALYSIS

DOB NOTA

GEN MICR

PAN CNO RA IBL

DIFFERENCE TRADE

OFFQTY

CRNT

LOW OPEN BIDPR C ICD

CLS

BUYVL BOS HANDE LS PASS ADMIN STPLOS

ASMP SNM FP (FUTURE PLAN) CLOS

UID1

OPNG

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 31

ONLINE SHARE TRADING

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 32

ONLINE SHARE TRADING

METHODOLOGY USED FOR TESTING


After the coding is completed, different testing methods are adopted to trap the errors. White-box testing is to be performed to focus on the programcontrol-structure. This is done to ensure that all statements in the program have been executed at least once during testing and that all logical conditions have been exercised. Different types of runtime-errors are expected to be get trapped by this method of testing. Besides this black-box testing method is to be used for testing the developed project to validate the functional requirements without regard to the internal workings of a program. For this boundary-value-analysis technique is used, i.e. the testing of developed software at different boundary-level data is carried out. This ensures program's ability to handle data at limits of acceptability. -testing is conducted at the developer's site by a customer. -testing is conducted at one or more customer sites by the end-user of the software. The system is continuously debugged and tuned while conducting the testing process. No program or system design is perfect. Communication between the user and the designer is not always complete or clear, and time is usually short. The result is errors and more errors. When the user will interact with the software in an unexpected and erroneous fashion, the software will be capable to fire an appropriate error message. Testing is a systematical way of eliminate errors from the system. There are many types of testing process available today. Some tests there system manually, some apply testing tools to do so. The manual testing techniques are described briefly below. Unit Testing: Unit testing is testing changes made in an existing or a new program. Unit testing focus on each module separately and assure it function properly. It is used to delete the coding error. The following test is done during the unit testing.

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 33

ONLINE SHARE TRADING


The local data structures are examined to ensure the data stores maintained integrity during all steps in algorithm execution. Independent path are tested to ensure that all statement in the module examined at least once. Boundary condition is tested to ensure that module operate properly, at the boundary to restrict processing. Error handing that are tested. Integration Testing: Many-tested modules are combined into sub-systems, which are then tested. The goal here is to see if the modules can be integrated properly. There are two types of integration testing. *Non-incremental integration. *Incremental integration. Validation Testing: Use to check against the system requirement. Software validation is achieved to a series of bleak box tools that demonstrate conformity with requirements. After each validation testing one of the two possible conditions exist. Function conform the specification and are accepted. A deviation from specification is uncovered and deficiency list is created. The deviation at this stage is rarely corrected. System Testing: System testing is actually a screen of test where primary prepare is to fully exercise into a computer base system. System testing makes a logical assumption that if all the parts of the system are correct, the goal will be achieved successfully. Another reason for system testing is its utility as a useroriented vehicle before implementation. The purpose of system testing is to identify and correct errors in the candidate system. As important as this phase is, it is one that is frequently compromised. Typically, the project is behind
MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT Page 34

ONLINE SHARE TRADING


schedule or the user in eager to go directly to conversion. The best program is worthless if it does not meet user needs. System testing is designed to uncover weaknesses that were not found in earlier tests. This includes forced system failure and validation of the total system as it will be implemented by its users in the operational environment. Generally, it begins with low volumes of transactions based on live data. The volume is increased until the maximum level for each transaction type is reached. The total system is also tested for recovery and fallback after various major failures to ensure that no data are lost during the emergency. All this is done with the old system still in operation. After the candidate system passes the test, the old system is discontinued. The first step in system testing is to prepare a plan that will test all aspects of the system in a way that promotes its credibility among potential users. Although each test has different purpose, all to work to verify that all system elements have been properly integrated and perform the allocated function. At the time of developing Online Share Trading software we applied all these techniques, but we did it in mixed fashion. Actually it is a part of Rapid Application Development that makes the testing along with the on-going development. Due to this type of testing actual it becomes much more easier to debug errors rather than completing the entire coding and then test it part by part and as a whole. This kind of rapid and mixed testing helps me a lot to debug errors from my project. Another very important aspect of my testing is that we take help of the built-in Error Console of Netbeans IDE 6.8, the main browser we used during our entire project work. It clearly shows all coding and design errors as well as warnings indicating its line numbers. This tool helped us to a great extent whenever it becomes impossible for us to debug the error in JSP. We reported all errors that we faced during development and testing in the next topic.

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 35

ONLINE SHARE TRADING


Login.jsp <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>R&R Share Trading Software</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta name="author" content="Jeremie Tisseau" /> <meta name="keywords" content="Free, web, template, free web template, educational, game, school, kids, children" /> <meta name="description" content="A free Web Template for schools." /> <link rel="shorcut icon" href="/favicon.ico" /> <link rel="stylesheet" href="css/style.css" type="text/css" /> <!-- Mootools CORE --> <script type="text/javascript" src="js/mootools-release-1.11.js"></script> <!-- Drop Down Menuhttp://dev.visualdrugs.net/mootools/dropdown_menu.html --> <script src="js/dropDownMenu.js" type="text/javascript"></script> <!--[if IE 7]> <style> #dropdownMenu li ul ul { margin-left: 100px; } </style> <![endif]--> <style type="text/css"> <!-MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT Page 36

ONLINE SHARE TRADING


.style2 {color: #000033} .style4 {color: #006699; font-size: medium; } .style5 { font-family: "Times New Roman", Times, serif; font-weight: bold; font-size: x-large; } .style6 {font-size: medium} .style7 {font-size: 12px} --> </style> <body> <fieldset> <form action="passchk1.jsp" method="post" name="Entry"> <h5 align="center" class="style3 style5" style="color:#660000"><U>R&R Share Trading Software</U></h5> <div id="container"> <div id="wrapper"> <div id="top"> <div class="logo"><a><span>Share Trading Site </span></a></div> <!-- login --> <!-- If you don't need a login section, just delete it below --> </div> <!-- / top --> <div id="content"> <h1>About Share Trading </h1> <p><strong>Share Trading is used for Selling and Buying of Share through the </strong><br /> </p> MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT Page 37

ONLINE SHARE TRADING


<p class="style2">&nbsp;</p> <p class="style2">&nbsp;</p> <h1>Automatic the testing process </h1> <!-- img by foreversouls --> <p><strong>With online Exam you can create and administer exams,tests or quizzes in a secure client-server enviroment.The system is web-enable so you can use either an internal server or link up over the internet or an intranet. No programming is necessary,just input your questions,select the answer type such as yes/no, Matchin choice,Text Answer,True/False, or Numeris.Those being tested scroll thru the exam questions and respondonline from their home computer or workstation.Once the test has been distributed submissions are electronically sent to the Online Exam data processing engine,which stores,scores and tabulates them.Results are published by the reporting module.Detailed records of all data tumed in by each respondent is readily accessible by authorized users from the Online Exam SQL database.That's how easy it is!</strong></p> <p><strong><span class="style4">MULTIPLE APPLICATIONS, USED IT OVER AND OVER AGAIN</span></strong></p> <p><strong><img src="images/lin.jpg" alt="" name="line" width="470" height="8" id="line" /></strong></p> <p><strong>Online Exam offers a practical solution to reach people who cannot be present at a given location at a specific time. With internet/intranet coverage you can reach virtually anyone anywhere at any time. The system offers a simple, yet fast, mechanism to address a variety of applications .Based on the proved "Q Engine" technology from internet Technologies .Online Exam is easy to use, reliable and cost effective..<br /> </strong></p> <a class="backToTop" href="#" title="Back To Top">&nbsp;</a><br /> </div> <div align="center" class="style6"><font color="#996600">LOGIN HERE</font> </div> <table border="2"> <tr> <th width="172" scope="col"><span class="style3">

<label> <div align="center">USER TYPE</div> <span class="style3"> MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT Page 38

ONLINE SHARE TRADING


</label> </span></th> <td colspan="2" align="right"> <select name="ss">

<option> Administrative User</option> <option> Normal User</option> </select>

</tr> <tr> <th width="172" scope="col"><span class="style3"> <label> <div align="center" class="style3">USER ID</div> <span class="style3"> </label> </span></th> <th width="120" scope="col"><input name="a" id="a" type="text" size="20"></th> </tr> <tr> <th width="172" scope="col"><span class="style3"> <label><div align="center" class="style3">PASSWORD</div> </label></span></th> <td><input name="b" id="b" type="password" size="20"></td> </tr> <tr> <td colspan ="2"><div align="center">

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 39

ONLINE SHARE TRADING


<input name="s1" type="submit" value="LOGIN"></div></td> <br>

<% try{ String aa=(String)request.getParameter("dd"); int aa1=Integer.parseInt(aa); if(aa1==1) { %> <br><br>

<% } else { %> <b>Password Wrong</b> <% } } catch(Exception e) { } %> </tr> <tr>

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 40

ONLINE SHARE TRADING


<td colspan="2"><div align="center"><a href="demat.jsp">New User?</a> <br /> </div></td> </tr> </tr> </table> </form> </fieldset>

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 41

ONLINE SHARE TRADING


Balance.jsp <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page language="java" import="java.sql.*"%> <% Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=null; Statement stmt=null; try { con=DriverManager.getConnection("jdbc:odbc:share","scott","tiger"); stmt=con.createStatement(); } catch(Exception e) { System.out.println(e.getMessage()); } String id=request.getParameter("action1"); String crnt=request.getParameter("action3"); String bvl=request.getParameter("action4"); String svl=request.getParameter("action5"); String qty=request.getParameter("action6"); String ibl=request.getParameter("action7"); double s=new Double(crnt).doubleValue(); double bvl1=new Double(bvl).doubleValue(); double svl1=new Double(svl).doubleValue();

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 42

ONLINE SHARE TRADING


double qty1=new Double(qty).doubleValue(); double ibl1=new Double(ibl).doubleValue(); if(s<bvl1 || s>svl1) { if(s<bvl1) { ibl1=ibl1-((bvl1-s)*qty1); } else if(s>svl1) { ibl1=ibl1-((s-svl1)*qty1); } } else { if(s>bvl1) { ibl1=ibl1+((s-bvl1)*qty1); } else if(s<svl1) { ibl1=ibl1+((svl1-s)*qty1); } } String crnt1=String.valueOf(s); String bvl2=String.valueOf(bvl1); String svl2=String.valueOf(svl1);

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 43

ONLINE SHARE TRADING


String qty2=String.valueOf(qty1); String ibl2=String.valueOf(ibl1); stmt.executeUpdate("update tdetails set crnt='" + crnt1 + "',qty='" + qty2 + "',buyvl='" + bvl2 + "',sellvl='" + svl2 + "',ibl='" + ibl2 + "' where uid1='" + id + "'"); con.close(); try { con=DriverManager.getConnection("jdbc:odbc:share","scott","tiger"); stmt=con.createStatement(); } catch(Exception e) { System.out.println(e.getMessage()); } String query="select snm,icd,uid1,ibl from tdetails where uid1='" + id + "'"; ResultSet rs=stmt.executeQuery(query); %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>R&R SHARE TRADING CO.</title> </head> <body bgcolor="2F4F4F"> <center> <h1>Daily Trading</h1> <table border="2" style="text-align: center" width="75%"> <tr> <th colspan="2">Share Name</th> MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT Page 44

ONLINE SHARE TRADING


<th colspan="2">Item Code</th> <th colspan="2">User ID</th> <th colspan="2">Balance</th> <% while(rs.next()) { %> <tr> <th colspan="2"><%=rs.getString(1)%></th> <th colspan="2"><%=rs.getString(2)%></th> <th colspan="2"><%=rs.getString(3)%></th> <th colspan="2"><%=rs.getString(4)%></th> </tr> <%}%> </table> </center> </body> </html> </body> </html>

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 45

ONLINE SHARE TRADING


Agreement.jsp <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page language="java" import="java.sql.*" %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>R&R SHARE TRADING CO.</title> </head> <body bgcolor="2F4F4F"> <center> <form action="aggrement1.jsp" method="post" name="Entry"> <br> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="2" align="center"> <h2>AGGREMENT FORM</h2> </td> </tr> <tr> <td><br>Client Name:</td> <td><br><input type="text" size="20" name="a"></td> </tr> <tr> <td><br>Opening Balance:</td> <td><br><input type="text" size="20" name="b"></td>

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 46

ONLINE SHARE TRADING


</tr> <tr> <td><br>Account Number:</td> <td><br><input type="text" size="20" name="c"></td> </tr> <tr> <td><br>Brocker Charge:</td> <td><br><input type="text" size="20" name="d"></td> </tr> <tr> <td><br>Minimum Balance:</td> <td><br><input type="text" size="20" name="e"></td> </tr> <br> <tr> <td colspan="2" align="center"> <br><input type="submit" value="INSERT" name="submit"></td> </tr> </table> </form> </center> </body> </html>

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 47

ONLINE SHARE TRADING


Agreement1.jsp <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page language="java" import="java.sql.*" %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>R&R SHARE TRADING CO.</title> </head> <body bgcolor="2F4F4F"> <center> <h1>Admin display data</h1> <% Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=null; Statement stmt=null; try { con=DriverManager.getConnection("jdbc:odbc:share","scott","tiger"); stmt=con.createStatement(); } catch(Exception e) { System.out.println(e.getMessage()); } String cnm=request.getParameter("a");

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 48

ONLINE SHARE TRADING


String oopbal=request.getParameter("b"); String acno=request.getParameter("c"); String bchrg=request.getParameter("d"); String minbal=request.getParameter("e"); if(cnm!=null) stmt.executeUpdate("insert into agrmnt(cnm,oopbal,acno,bchrg,minbal) values('" + cnm + "','" + oopbal + "','" + acno + "','" + bchrg + "','" + minbal + "')"); con.close(); try { con=DriverManager.getConnection("jdbc:odbc:share","scott","tiger"); stmt=con.createStatement(); } catch(Exception e) { System.out.println(e.getMessage()); } String query="select * from agrmnt where cnm='" + cnm + "'" ; ResultSet rs=stmt.executeQuery(query); %> <table bgcolor="cyan" align="center" border="4" bordercolorlight="black" bordercolordark="blue" width="80%"> <tbody align="center">

<tr> <th>client Name :</th> <th>Opening Balance :</th> <th>Account Number :</th> MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT Page 49

ONLINE SHARE TRADING


<th>Brocker Charge :</th> <th>Minimum Balance :</th> </tr> <% while(rs.next()) { %> <tr> <td><%=rs.getString(1)%></td> <td><%=rs.getString(2)%></td> <td><%=rs.getString(3)%></td> <td><%=rs.getString(4)%></td> <td><%=rs.getString(5)%></td> </tr> <%}%> </tbody>

</table> </center> </body> </html>

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 50

ONLINE SHARE TRADING


Clientname.jsp <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page language="java" import="java.sql.*"%> <% Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=null; Statement stmt=null; String nota=request.getParameter("b"); try { con=DriverManager.getConnection("jdbc:odbc:share","scott","tiger"); stmt=con.createStatement(); } catch(Exception e) { System.out.println(e.getMessage()); } String query="select * from s2 where nota='" + nota + "'"; ResultSet rs=stmt.executeQuery(query); %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>R&R SHARE TRADING CO.</title> </head>

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 51

ONLINE SHARE TRADING


<body bgcolor="2F4F4F"> <center> <h1>Client Details</h1> <table bgcolor="cyan" align="center" border="4" bordercolorlight="black" bordercolordark="blue" width="80%"> <tbody align="center"> <tr> <th>Pan</th> <th>Name</th> <th>Father's Name</th> <th>Date of Birth</th> <th>Residential Address</th> <th>Contact No.</th> <th>Account No.</th> <th>Bank Name</th> <th>Branch Name</th> <th>MICR No.</th> <th>UID</th> <th>PASSWORD</th> <% while(rs.next()) { %> <tr> <td><%=rs.getString(1)%></td> <td><%=rs.getString(2)%></td> <td><%=rs.getString(3)%></td> <td><%=rs.getString(4)%></td> <td><%=rs.getString(5)%></td> MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT Page 52

ONLINE SHARE TRADING


<td><%=rs.getString(6)%></td> <td><%=rs.getString(7)%></td> <td><%=rs.getString(8)%></td> <td><%=rs.getString(9)%></td> <td><%=rs.getString(10)%></td> <td><%=rs.getString(11)%></td> <td><%=rs.getString(12)%></td> </tr <%}%> </tbody> </table> </center> </body> </html>

Clientname1.jsp <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page language="java" import="java.sql.*" %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>R&R TRADING CO></title> </head> <body bgcolor="2F4F4F"> <center>

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 53

ONLINE SHARE TRADING


<h1>Search By Client Name</h1> <form method="post" action="clientname.jsp"> ENTER CUSTOMER NAME <input type="text" name="b" size="30" value=""> <br><br> <input type="submit" value="search" name="submit"> </center> </form> </body> </html>

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 54

ONLINE SHARE TRADING


dailytrading.jsp <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <% String id=request.getParameter("s"); //out.println(id); %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>R&R SHARE TRADING CO.</title>

</head> <body bgcolor="2F4F4F"> <center> <form action="dailytrading1.jsp" method="post" name="Entry"> <table bgcolor="cyan" align="center" border="1" bordercolorlight="black" bordercolordark="blue" width="80%"> <tr> <tbody align="center"> <tr> <td><font size="4" color="black"><b>SENSEX</b></font></td> <td><font size="4" color="black"><b>NIFTY</b></font></td> <td><font size="4" color="black"><b>MCX</b></font></td> <td><font size="4" color="black"><b>NCDEX</b></font></td> </tr> <td><font size="4" color="black"><b>SENSEX</b></font></td> MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT Page 55

ONLINE SHARE TRADING


<td><font size="4" color="black"><b>NIFTY</b></font></td> <td><font size="4" color="black"><b>MCX</b></font></td> <td><font size="4" color="black"><b>NCDEX</b></font></td> </tbody> </table> <table border="0"> <tr> <td colspan="2" align="center"> <h2>DAILY TRADING FORM</h2> <br> </td> </tr> <tr> <td>Item Code:</td> <td><input type="text" size="20" name="a"></td> </tr> <tr> <td><br>Share Name:</td> <td><br><input type="text" size="20" name="b"></td> </tr> <tr> <td><br>Initial Balance:</td> <td><br><input type="text" size="20" name="h"></td> </tr> <tr> <td><br>Quantity:</td> <td><br><input type="text" size="20" name="c"></td>

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 56

ONLINE SHARE TRADING


</tr> <tr> <td><br>Rate:</td> <td><br><input type="text" size="20" name="d"></td> </tr> <tr> <td><br>Stop Loss:</td> <td><br><input type="text" size="20" name="e"></td> </tr> <tr> <td><br>Buy Value:</td> <td><br><input type="text" size="20" name="f"></td> </tr> <tr> <td><br>Sell Value:</td> <td><br><input type="text" size="20" name="g"></td> </tr> <tr> <td colspan="2" align="right"> <select name="ss"> <option>Buy</option> <option>Sell</option> </select> </tr> <tr> <td colspan="2" align="center"><input type="submit" value="Show Trading" name="submit"></td> </tr> MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT Page 57

ONLINE SHARE TRADING


</table> <input type="hidden" value="<%=id%>" name="action1"> </form> </center> </body> </html>

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 58

ONLINE SHARE TRADING


Dailytrading1.jsp <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page language="java" import="java.sql.*"%> <% Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=null; Statement stmt=null; try { con=DriverManager.getConnection("jdbc:odbc:share","scott","tiger"); stmt=con.createStatement(); } catch(Exception e) { System.out.println(e.getMessage()); } double s=Math.random()*100; String bidqty1=String.valueOf(s); String bidqty=bidqty1.substring(3,8); double aa= Math.random()*100; String bidprc1=String.valueOf(aa); String bidprc=bidprc1.substring(3,6); double bb= Math.random()*100; String offprc1=String.valueOf(bb); String offprc=offprc1.substring(3,7);

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 59

ONLINE SHARE TRADING


double cc= Math.random()*100; String offqty1=String.valueOf(cc); String offqty=offqty1.substring(3,6); double dd=Math.random()*100; String crnt1=String.valueOf(dd); String crnt=crnt1.substring(3,6); String rate=request.getParameter("d"); double f=Math.random()*100; String open1=String.valueOf(f); String open=open1.substring(3,6); double g=Math.random()*100; String high1=String.valueOf(g); String high=high1.substring(3,6); double h= Math.random()*100; String low1=String.valueOf(h); String low=low1.substring(3,6); double i=Math.random()*100; String close1=String.valueOf(i); String cls=close1.substring(3,6); double j =Math.random()*100;// </editor-fold> String diff1=String.valueOf(j); String d=diff1.substring(3,6); String qty=request.getParameter("c"); String snm=request.getParameter("b"); String icd=request.getParameter("a"); double k=Math.random()*100; String bvl=request.getParameter("f");

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 60

ONLINE SHARE TRADING


String svl=request.getParameter("g"); String stls=request.getParameter("e"); String bos=(String)request.getParameter("ss"); String id=request.getParameter("action1"); String ibl=request.getParameter("h"); // <editor-fold defaultstate="collapsed" desc="/*comment*/"> /*out.println(bidqty); out.println(bidprc); out.println(offprc); out.println(offqty); out.println(crnt); out.println(rate); out.println(open); out.println(high); out.println(low); out.println(close); out.println(diff); out.println(bvl); out.println(svl); out.println(stls); out.println(bos);*/ out.println("<center><h2>Trading Details of User "+id+"</h2></center>"); stmt.executeUpdate("insert into tdetails(bidqty,bidprc,offqty,offprc,crnt,rate,open,high,low,cls,difference,qty,snm,icd,buyvl,sellvl,stp los,bos,uid1) values('" + bidqty + "','" + bidprc + "','" + offqty + "','" + offprc + "','" + crnt + "','" + rate + "','" + open + "','" + high + "','" + low + "','" + cls + "','" + d +"','" + qty + "','" + snm + "','" + icd + "','" + bvl + "','" + svl + "','" + stls + "','" + bos + "','" + id +"')"); con.close(); try MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT Page 61

ONLINE SHARE TRADING


{ con=DriverManager.getConnection("jdbc:odbc:share","scott","tiger"); stmt=con.createStatement(); } catch(Exception e) { System.out.println(e.getMessage()); } String query="select bidqty,bidprc,offqty,offprc,crnt,rate,open,high,low,cls,qty,uid1 from tdetails where uid1='" + id + "'"; ResultSet rs=stmt.executeQuery(query); %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>R&R SHARE TRADING CO.</title> </head> <body bgcolor="2F4F4F"> <center> <h1>Daily Trading</h1> <form method="post" action="balance.jsp"> <table bgcolor="cyan" align="center" border="4" bordercolorlight="black" bordercolordark="blue" width="80%"> <tbody align="center"> <tr> <th colspan="2">Bid Quantity</th> <th colspan="2">Bid Price</th> <th colspan="2">Offer Price</th> MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT Page 62

ONLINE SHARE TRADING


<th colspan="2">Offer Quantity</th> <th colspan="2">Current</th> <th colspan="2">Last Trading</th> <th colspan="2">Opening</th> <th colspan="2">High</th> <th colspan="2">Low</th> <th colspan="2">Close</th> <th colspan="2">Quantity</th> <th colspan="2">User ID</th>; <% while(rs.next()) { %> <tr> <th colspan="2"><%=rs.getString(1)%></th> <th colspan="2"><%=rs.getString(2)%></th> <th colspan="2"><%=rs.getString(3)%></th> <th colspan="2"><%=rs.getString(4)%></th> <th colspan="2"><%=rs.getString(5)%></th> <th colspan="2"><%=rs.getString(6)%></th> <th colspan="2"><%=rs.getString(7)%></th> <th colspan="2"><%=rs.getString(8)%></th> <th colspan="2"><%=rs.getString(9)%></th> <th colspan="2"><%=rs.getString(10)%></th> <th colspan="2"><%=rs.getString(11)%></th> <th colspan="2"><%=rs.getString(12)%></th> </tr> <%}%>

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 63

ONLINE SHARE TRADING


</tbody> </table> <input type="hidden" value="<%=id%>" name="action1"> <input type="hidden" value="<%=crnt%>" name="action3"> <input type="hidden" value="<%=bvl%>" name="action4"> <input type="hidden" value="<%=svl%>" name="action5"> <input type="hidden" value="<%=qty%>" name="action6"> <input type="hidden" value="<%=ibl%>" name="action7"> <input type="submit" value="Balance Check" name="submit"> </form> </center> </body> </html>

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 64

ONLINE SHARE TRADING


Delete.jsp <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page language="java" import="java.sql.*" %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>R&R SHARE TRADING CO.</title> </head> <body bgcolor="2F4F4F"> <center> <h1>DELETE</h1> <br> <form method="post" action="deletedisp.jsp"> ENTER CUSTOMER ID <input type="text" name="a" size="30" value=""> <br><br> <input type="submit" value="search" name="submit"> </form> </center> </body> </html>

Delete1.jsp <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 65

ONLINE SHARE TRADING


"http://www.w3.org/TR/html4/loose.dtd"> <%@page language="java" import="java.sql.*" %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Delete Page</title> </head> <body bgcolor="2F4F4F"> <% Connection conn = null; // ResultSet rs=null; Statement st=null; // String sql=null; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); } catch(Exception e) { System.out.println(e.getMessage()); } conn=DriverManager.getConnection("jdbc:odbc:share","scott","tiger"); st=conn.createStatement(); String id=request.getParameter("action1"); String insrecord="delete from s2 where uid1='"+id+"'";

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 66

ONLINE SHARE TRADING


st.executeUpdate(insrecord); out.println("<body bgcolor=#fffff><center><h2>Record Successfully Deleted </h2></center></body>"); conn.close(); st.close(); %> </body> </html>

Deletedisp.jsp <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page language="java" import="java.sql.*" %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title> R&R SHARE TRADING CO. </title> </head> <body bgcolor="2F4F4F"> <% String id; Connection con = null; ResultSet rs=null; Statement st=null; String sql=null; try { MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT Page 67

ONLINE SHARE TRADING


Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); } catch(Exception e) { System.out.println(e.getMessage()); } con=DriverManager.getConnection("jdbc:odbc:share","scott","tiger"); st=con.createStatement(); id=request.getParameter("a"); if(id!=null) { sql="select * from s2 where uid1='"+id+"'"; rs=st.executeQuery(sql); if(rs.next()==false) out.println("<center><p>&nbsp;<p><h1>SORRY! Customer not found</H1></CENTER>"); else { rs=st.executeQuery(sql); %> <center> <h1>Delete Display</h1> <table border=1 width="80%"> <tr> <th>Pan<th>Name of applicants<th>Father's name</th><th>Date of birth<th>Residential Adresss <th>Contact Number</th> <th>Account Number</th><th>Bank Name</th><th>Branch Name</th> <th>Micr no</th><th>user id</th><th>Password</th> MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT Page 68

ONLINE SHARE TRADING


</tr> <% while(rs.next()) { %> <tr> <td><%=rs.getString(1) %></td> <td><%=rs.getString(2) %></td> <td><%=rs.getString(3) %></td> <td><%=rs.getString(4) %></td> <td><%=rs.getString(5) %></td> <td><%=rs.getString(6) %></td> <td><%=rs.getString(7) %></td> <td><%=rs.getString(8) %></td> <td><%=rs.getString(9) %></td> <td><%=rs.getString(10) %></td> <td><%=rs.getString(11) %></td> <td><%=rs.getString(12) %></td> </tr> <% } %> </table> </center> <head> <title>Delete form</title> </head>

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 69

ONLINE SHARE TRADING


<form name="form1" action="delete1.jsp" method="post" onSubmit="return validate(form1)" > <center> <h2><font color="BLUE">CUSTOMER DELETE FORM FOR ID : <%=id%> </h2> <input type="hidden" value="list" name="action"> <input type="hidden" value="<%=id%>" name="action1"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="2" align="center"><input type="submit" value="Delete" name="submit"></td> </tr> </table> </form> </center> </body> </html> <% } } %>

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 70

ONLINE SHARE TRADING


Demat.jsp <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>R&R SHARE TRADING CO.</title> </head> <body bgcolor="2F4F4F"> <center> <form action="demat1.jsp" method="post" name="Entry"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="2" align="center"> <h2>DEMAT OPENING FORM</h2> <br> </td> </tr> <tr> <td>PAN:</td> <td><input type="text" size="20" name="a"></td> </tr> <tr> <td><br>Name of the Applicant:</td> <td><br><input type="text" size="20" name="b"></td> <td><br> (Enter more than 6 letter)</td>

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 71

ONLINE SHARE TRADING


</tr> <tr> </tr> <tr> <td><br>Father's Name:</td> <td><br><input type="text" size="20" name="c"></td> </tr> <tr> <td><br>Date of Birth:</td> <td><br><input type="text" size="20" name="d"></td> </tr> <tr> <td><br>Residential Address:</td> <td><br><input type="text" size="20" name="e"></td> </tr> <tr> <td><br>Contact No.:</td> <td><br><input type="text" size="20" name="f"></td> </tr> <tr> <td><br>Account No.:</td> <td><br><input type="text" size="20" name="g"></td> </tr> <tr> <td><br>Bank Name:</td> <td><br><input type="text" size="20" name="h"></td> </tr>

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 72

ONLINE SHARE TRADING


<tr> <td><br>Branch Name:</td> <td><br><input type="text" size="20" name="i"></td> </tr> <tr> <td><br>Initial Balance:</td> <td><br><input type="text" size="20" name="k"></td> </tr> <tr> <td><br>MICR No.:</td> <td><br><input type="text" size="20" name="j"></td> </tr> <tr> <td><br>Gender: <input type="radio" name="option" value="Male">Male <input type="radio" name="option" value="Female">Female </td> </tr> <tr> <td><br>Terms and Conditions:</td> <td><br><input type="checkbox" name="agree" value="agree">I Agree </td> </tr> <tr> <td colspan="2" align="center"><input type="submit" value="Insert" name="submit"></td> <td colspan="2" align="center"><input type="reset" value="Reset" name="submit1"></td> </tr>

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 73

ONLINE SHARE TRADING


</table> </form> </center> </body> </html>

Demat1.jsp <% Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=null; Statement stmt=null; try { con=DriverManager.getConnection("jdbc:odbc:share","scott","tiger"); stmt=con.createStatement(); } catch(Exception e) { System.out.println(e.getMessage()); } String pan1=request.getParameter("a"); String NOTA1=request.getParameter("b"); String fn1=request.getParameter("c"); String dob1=request.getParameter("d"); String ra1=request.getParameter("e"); String cno1=request.getParameter("f"); String acno1=request.getParameter("g");

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 74

ONLINE SHARE TRADING


String bnm1=request.getParameter("h"); String brnm1=request.getParameter("i"); String ibl=request.getParameter("k"); String micr1=request.getParameter("j"); String g=request.getParameter("option"); String h=request.getParameter("agree"); double s=Math.random()+1; String a1=String.valueOf(s); String a2=a1.substring(3,6); stmt.executeUpdate("insert into s2(pan,NOTA,fn,dob,ra,cno,acno,bnm,brnm,micr,uid1,pass1,gen,tcon,ibl) values('" + pan1 + "','" + NOTA1 + "','" + fn1 + "','" + dob1 + "','" + ra1 + "','" + cno1 + "','" + acno1 + "','" + bnm1 + "','" + brnm1 + "','" + micr1 + "','" + NOTA1.substring(1,4) + "','" + a2 + "','"+g+"','"+h+"','" + ibl + "')"); con.close(); try { con=DriverManager.getConnection("jdbc:odbc:share","scott","tiger"); stmt=con.createStatement(); } catch(Exception e) { System.out.println(e.getMessage()); } String query="select * from s2 where pan='" + pan1 + "'" ; ResultSet r=stmt.executeQuery(query); %> <body bgcolor="2F4F4F"> <center><h1>Client Information</h1>

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 75

ONLINE SHARE TRADING


<table bgcolor="cyan" align="center" border="4" bordercolorlight="black" bordercolordark="blue" width="80%"> <tr> <tbody align="center"> <tr> <td><font size="4" color="black"><b>Pan</b></font></td> <td><font size="4" color="black"><b>Name of Applicant</b></font></td> <td><font size="4" color="black"><b>Father's Name</b></font></td> <td><font size="4" color="black"><b>Date of Birth</b></font></td> <td><font size="4" color="black"><b>Residential Address</b></font></td> <td><font size="4" color="black"><b>Contact No.</b></font></td> <td><font size="4" color="black"><b>Account No.</b></font></td> <td><font size="4" color="black"><b>Bank Name</b></font></td> <td><font size="4" color="black"><b>Branch Name</b></font></td> <td><font size="4" color="black"><b>MICR No.</b></font></td> <td><font size="4" color="black"><b>User ID</b></font></td> <td><font size="4" color="black"><b>Password</b></font></td> <td><font size="4" color="black"><b>GENDER</b></font></td> <td><font size="4" color="black"><b>TERMS & CONDITION</b></font></td> <td><font size="4" color="black"><b>Intial Balance</b></font></td> </tr> <% while(r.next()) { %> <tr> <td><font size="4" color="black"><b><%=r.getString(1)%></b></font></td> <td><font size="4" color="black"><b><%=r.getString(2)%></b></font></td> <td><font size="4" color="black"><b><%=r.getString(3)%></b></font></td> MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT Page 76

ONLINE SHARE TRADING


<td><font size="4" color="black"><b><%=r.getString(4)%></b></font></td> <td><font size="4" color="black"><b><%=r.getString(5)%></b></font></td> <td><font size="4" color="black"><b><%=r.getString(6)%></b></font></td> <td><font size="4" color="black"><b><%=r.getString(7)%></b></font></td> <td><font size="4" color="black"><b><%=r.getString(8)%></b></font></td> <td><font size="4" color="black"><b><%=r.getString(9)%></b></font></td> <td><font size="4" color="black"><b><%=r.getString(10)%></b></font></td> <td><font size="4" color="black"><b><%=r.getString(11)%></b></font></td> <td><font size="4" color="black"><b><%=r.getString(12)%></b></font></td> <td><font size="4" color="black"><b><%=r.getString(13)%></b></font></td> <td><font size="4" color="black"><b><%=r.getString(14)%></b></font></td> <td><font size="4" color="black"><b><%=r.getString(15)%></b></font></td> </tr> <%}%> </tbody> </table> <tr> <br> <a href="login.jsp">Want to Login?</a> </tr> </center>

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 77

ONLINE SHARE TRADING

DATA DICTIONARY
A Database is a collection of interrelated data stored with minimum redundancy to Serve many users quickly and efficiently. A Data Dictionary on the other hand is the Information to how the original data or records are stored on the database. So it is the data about data. Following is a catalogue of the data elements used in the system. It will clearly describe the database with all its elements.

List of table use by the system

TABLE NUMBER
1 2 3 4

TABLE NAME
ADMIN S2 FP TDETAILS

Details of Table Designs


TABLE NAME : ADMIN Field Name
UID1 PASS

Type
VARCHAR2 VARCHAR2

Length
10 10

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 78

ONLINE SHARE TRADING


TABLE NAME: S2

Field Name
PAN NOTA FN DOB RA CNO ACNO BNM BRNM MICR UID1 PASS1 GEN TCON IBL

Type
VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2

Length
10 20 30 10 50 10 20 20 20 20 20 20 10 10 20

TABLE NAME: FP Field Name


ASMP OPNG CLOS ICD DURATION FEES BUYVL STPLOS BOS UID1 IBL

Type
VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2

Length
10 10 10 10 10 10 10 10 10 10 10

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 79

ONLINE SHARE TRADING


TABLE NAME: TDETAILS

Field Name
BIDQTY BIDPRC OFFQTY OFFPRC CRNT RATE OPN HIGH LOW CLS DIFFERENCE QTY SNM ICD DURATION FEES BUYVL STPLOS BOS UID1 IBL

Type
VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2 VARCHAR2

Length
10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10

MCA 3RD YEAR (5TH SEMESTER) MINOR PROJECT

Page 80

Vous aimerez peut-être aussi