Professional Documents
Culture Documents
TABLE OF CONTENTS
1 TITLE OF PROJECT 1
INTRODUCTION
1.1 1.2 1.3 Background Objectives Purpose and Scope 1.3.1 Purpose 1.3.2 Scope
2-3
5-16
5. SYSTEM DESIGN 4.1 Process Modules 4.2 Input of the Project 4.3 Output of the Project 4.4 Procedural Design 4.2.3 Data Structure
17-23
6 CONCLUSIONS
5.1 Limitations of the System 5.2 Future Scope of the Project
24 -25
Page 0
TITLE OF PROJECT
Page 1
BACKGROUND
This project has been implemented to accomplish the needs of daily task of SBI Bank. Daily activity contains almost all the activity of banking of any banking organization. Daily task begins after the 2.00 oclock general day but at 12.00 oclock to Saturday; when cash is close. But the first step of daily activity is updating general ledger and maintains the background transaction like ledger update of master table, this is the reason that any bank doesnt perform transaction after closing the cash because it effects badly to subsequent process. Subsequently we update cash book and then update balance sheet. In this project we include all these activity which is maintained in any banking organization daily to daily. In this project we include account detail, loans detail, transaction, head office account etc.
OBJECTIVE
Capability:-This project title is Daily banking System. As far as daily banking is concerned it means the daily work necessary work of bank .There is various features is provided by daily banking system. This improves capability in three ways. (a)Improve processing speed:-The daily banking system maintains a no of functions provided by its back end language (Oracle). It maintains DDL statements to keep all the data in memory until the program is terminated, so this will improve the processing speed. (b) Increase volume: - Daily banking system maintains the process of high volume of activities for advantage of greater security. All the information is integrated and available in memory so this volume of data will increase. (c)Faster Retrieval of data:-To perform query in database is tedious task, because the path of data storing is vital factor .The daily banking system designed as back end Oracle and front end java, so faster retrieval of data is possible.
CONTROL
(a)Greater accuracy and consistency:-By including well structured module this project has a more accurate database with no inconsistency and minimized redundancy. It calculates arithmetic operation more accurately, because java fully supports math co-processor. b) Better security:-We use Oracle as back end so Oracle has a best security level wise and by using object oriented approach all the inner mechanism is
Page 2
En.Roll-063514872 Appin Technology Lab encapsulated. There are three level of security, first is data level second is user level and last one is programmer level.
COST
(a) Monitor cost:-This system doesnt need any paper work, because almost all the data is stored in table so, it saves the extra expenses on paper.
(b) Reduce cost:-Using machine work we can get a better result greater with
greater accuracy rather than manual system. It also reduced the human resource and human labor which indirectly affects the whole and sole budget of organization.
SCOPE
Daily Banking System scope defined by constraints of attributes which represents of achievement of SBI Bank day-to-day transaction. Main functionality of this project is providing the facility of customer transaction of your account, which is he not ware about where place transaction is performed and takes easily.
PURPOSE
This project achieve all type of transaction properly and get excepted output, any project focus to use easy user interactive environment and focus all project which create and update all type of transaction.
Page 3
The purpose of the Daily Banking System survey is to identify the value type of the person taking the survey. That's it. To find out about a person's product ownership, media preferences, hobbies, additional demographics, or attitudes (for example, about global warming), the questions in the Background survey integrate into larger questionnaires that ask about these topics. For example, the Daily Transaction questions integrate into all questions also integrate into our own Consumer Financial Decisions' MacroMonitor survey, giving us in-depth information about how each type uses, invests, and saves money. Information for use by the public is available in the Database Store. All intellectual-property rights of materials that you download are owned by Strategic Business Insights and cannot be reprinted or resold. application developers face a dizzying array of platforms, languages, frameworks and technical artifacts to choose from. The paper survey, classifies, and compares technologies supporting Web application development. The classification is based on foundational technologies; integration with other information sources; and dynamic content generation. The paper further survey and classify software engineering techniques and tools that have been adopted from traditional programming into Web programming. The paper concludes that, although the infrastructure problems of the Web have largely been solved, the cacophony of technologies for applications reflects the lack of a solid model tailored for this domain.Examine the advantages of moving to a Software as a Service model to better meet the challenges of growth, competition and regulatory compliance.Executive Summary, Introduction, DEPOSITS in Bank Occurrences of Low Grade Transaction , This type of Transaction Scenario in Bank , Status of Utilisation of Low Grade Transaction as Basic in consumer , Status of Beneficial Utilisation of High level Implementin database as Front line implementaion, Impact Assesment on Environment due to direct utilisation of low grade rock Application Developments , When he stays in India for less than or upto 182 days during the preceding financial year. The period of stay may not be continuous and the same shall be calculated by adding up the days of his stay in India during that financial year. Thus a student who goes for studies abroad and his stay in India during a financial year is less than 182 days, then he shall be treated as non-resident Indian for the next financial year. Similarly, tourists and all others who have gone out of India without the purpose of taking up employment or starting any business abroad, shall be treated as non-residents if, their stay in India during the preceding financial year was less than or upto
Page 4
En.Roll-063514872 Appin Technology Lab 182 days.When he goes or stays outside India for any of the following purposes:
PROBLEM DEFINITION
Performing the banking modules, each module broad itself in banking system but here is only describe a part of transaction following that DAY WISEDEPOSIT TO ALL ACCOUNT SEPARATELY: This is to store the information of the all account in daily database and entered to fetching data. TOTAL DIPOSIT PER DAY: To handle total deposit of account per day and store and fetch all branch. Account wise total deposit. Total matured fixed account. Total fixed account across fifty thousands. . SOFTWARE REQUIREMENT SPECIFICATION (SRS) The Requirement analysis involves obtaining a clear and through understanding of the product to be developed. SRS should be a consistent, correct, unambiguous and complete, document. SRS is an Interface of the System They identifies which is to flow from and to to the system. Normally IEEE standard is followed .A typical format of SRS is as follow:INTRODUCTION Purpose Scope Objectives Organization and Report OVERALL DESCRIPTION Product Description Users of Project Assumptions Made. SPECIFIC REQUIREMENTS Interface Requirements User Requirements Hardware Requirements Software Requirements Logical Database Requirements. BASIC PROCESSING ACTION OF THE SYSTEM APPENDICES Input/Output formats Instruction for Security Page 5
En.Roll-063514872 Appin Technology Lab Results of Fact Finding Data Model Functional Model Process Specification
En.Roll-063514872 Appin Technology Lab Planning, for our purposes, can be though of as determining all the small tasks that must be carried out in order to accomplish the goal. There are some charts define that planning system under here:
GANTT CHART:
Work Task 1.System Analysis Overview Existing System Preliminary Investigation Identification of Need Proposed Computer Based System 2.Feasibility study Technical Feasibility Economical Feasibility Operation Feasibility 3.System Design User Interface Design Data Base Design Coding the Application 4.Testing Unit Testing Acceptance Testing 5.Implementation Training personal Conversion Procedure Post Implementation Review Week 1 Week 2 Week 3 Week 4 Week 5
Page 7
Figure 1
This application has developed using the following configution and it will run smoothly almost on same conguration :HARDWARE REQUIREMENTS: PROCESSOR RAM HARD DISK DRIVE CACHE MEMORY MONITOR KEY BOARD MOUSE SOFTWARE REQUIREMENTS: OPERATING SYSTEM BACK-END FRONT-END : WINDOWS XP : ORACLE 9i : JAVA (jdk1.5 Onwards) : PENTIUM 4 : 512 MB : 10.2 GB : 256 KB : VGA with 640 X 480 : 104 Keys : Optical mouse
PRELIMINARY PRODUCT DESCRIPTION:Functionality of daily Banking System project is fulfilling all requirements of client which perform all query task related to transaction, primarily define three modules which perform different task.
Page 8
CONCEPTUAL MODULES
DFD LEVEL 0
CUSTOMER DETAILS
CUSTOMER DETAILS
ACCOUNT DETAILS
FIXED A/C CURRENT A/C CURRENT A/C LOAN A/C LOANS ACCOUNT
Page 9
Order
SLIP PRODUCT
CUSTOMER Billing Information Customer Name and address COLLECT PAYMENT CUSTOMER DETAILS
ACOUNT DETAILS
Figure 3 Page 10
Verify
TRANSACTION
LOAN
Verify
MATURE
FIXED A/C
Figure 4 Page 11
COLLECT PAYMENT
Verify MATURE
CUSTOMER DETAIL
updates
CURRENT A/C
Figure 5 Page 12
LOAN_DETAILS
PROCESS ORDER
Verify
CUSTOMER
name,cust_id
LOAN TYPE
Check A/c,cust
ACCOUNT DETAIL
Updates TRANSFER
LOAN_DETAILS
Page 13
Page 14
Customer Detail
Request form
1 Process Deposit and Withdrawal
Account Detail
Result
Customer Detail
Figure 7
Page 15
data retrive
entry
Final passbook
Transaction
Figure 8
Page 16
ER Diagrame
Page 17
PROCESS MODULES :-
1. CUSTOMER DETAILS: This module includes the all the master data about a customer which required by a bank. This module is also a master table. The attributes of this module is customer code, customer name, nominee name, nominee name nominee address etc, where customer code is primary key. This module is linked with another table shaving a/c, current a/c etc. The pictorial representation of this module is as follows. LOAN_DETAILS CUSTOMER DETAILS ACCOUNT DETAILS
2.
ACCOUNT DETAILS
This includes details of an account. If any account opens in the bank then it first inserted into this module. It stores account no, type, customer id and their opening date. This module is linked with Saving account, current account, recurring account and fixed deposit account. It can be depicted as:
CURRENT ACCOUNT
ACCOUNT DETAILS
SAVING ACCOUNT
Page 18
3. SAVING ACCOUNT:
This module stores the account condition of shaving type account. This account is best for medium level customer. In this module account id is foreign key. In this account you can get interest 3.5 percent by bank. 4. CURRENT ACCOUNT: This module contains the detail of account of current type. In the current account we can perform transaction more than one times in a day, but we can not get any interest by bank. This is one of the oldest account and more popular account. In this module account id is foreign key.
Page 19
En.Roll-063514872 Appin Technology Lab received by or pay To. This module updates all the next modules, because it is the base of daily transaction.
7. GENERAL LEDGER: This is also an important factor of daily banking; because it is necessary to be stored the daily transaction affects head wise. This module stores such data means total deposit and total withdrawal of daily banking. The main attributes of module is shdp, crdp, shdp, crdp, shdp, crbl, shbl etc. 8. HEAD OFFICE A/C: This module keeps data that how much amount is deposit at the head office. Due to some reason any bank can not keeps too many amount in his branch. RBI suggests that a branch keeps maximum 30 percent amount of his total deposit cash. The main attributes of this module is date amount. 9. LOANS DETAILS: This module shows that how many amounts are sanctioned by bank as loans, because this is needed in balance sheet. The attributes of this is date balance amount. 10. ACCOUNT TRANSFER: This module includes all the information about transferred account. Some times customer wishes that his account to be transferred to another desired branch due to such reason, bank provides such facility. The main attributes of this module is account id, account name, transferred bank etc. Stores we stores data head wise and also stores last day balance and last cash in hand. The main attributes of this module is date dsh, dcr, drc, last day balance, csh, csh, crc ,cash in hand etc.
Page 20
DATASTRUCTURE:
1. CUSTOMER DETAIL Fields Customer_code Customer_name Customer_lcadd Customer_pradd D.O.B Age Sex Phone_no Pan_no Merita_status Nationality Qualification Nominee_name Nominee _add Nominee_relation Occupation Data type Varchar2 Varchr2 Varchar2 Varchar2 Date Number Varchar2 Number Number Varchar2 Varchar2 Varchar2 Varchar2 Varchar2 Varchar2 Varchar2 Width 10 30 60 60 3 4 12 12 10 15 15 30 40 15 15 Precision Key Constraint Primary key
2. ACCOUNT DETAIL: Field Account_id Customer_id Open_date Account_name Data type Varchar2 Varchar2 Date Varchar2 Width 10 10 15 Page 21 precision Key Constraint Primary key Foreign key
3. CURRENT ACCOUNT:
Width 10 15
Precision
4. TRANSACTION:
Data type Varchar2 Varchar2 Varchar2 Varchar2 Number Varchar2 Varchar2 Date
Width 10 15 10 30 15 15 30
Precision
5. SAVING A/C: Field Date Deposit Withdrawal Balance_amount Data type Date Number Number Number 10 10 10 Page 22 Width Precision Key Constraint Primary key
6. GENERAL LEDGER: Field Date Saving_dposit Saving_withdrawal S_balance Current_dposit Current_withdrawal Current_balance Recurring_deposit Recurring_withdrawal Recurring_balance Fixed_deposit Fixed_withdrawal Fixed_balance Field Account_id Date Balance_amount Data type Date Number Number Number Number Number Number Number Number Number Number Number Number Data type Varchar2 Date Number Width 15 15 15 15 15 15 15 15 15 15 15 15 Width 10 15 Precision Key Constraint Foreign key Precision Key Constraint Primary key
7. LOAN DETAILS:
Width 10 15
Precision
8.Account Close
Page 23
9. ACCOUNT TRASNFER: Field Account_id Transfer_to Account_type Transferred_date Amount Data type Varchar2 Varchar2 Varchar2 Date Varchar2 Width 10 30 15 10 Precision Key Constraint Foreign key
10. HEAD OFFICE ACCOUNT: Field Date Deposit Withdrawal Balance_amount 11. FIXED DEPOSIT: Field Account_id Fixed_term Fixed_amount Fixed_date Interest Maturity_date Maturity_amount Data type Varchar2 Number Number Date Number Date Number 15 2 2 Width 10 5 15 Precision Key Constraint Foreign key Data type Date Number Number 10 10 Width Precision Key Constraint Primary_key
Page 24
Page 25
Page 26
Page 27
TABLE OF CONTENTS
1 INTRODUCTION
1.1 1.2 1.3 Background Objectives Purpose and Scope 1.3.1 Purpose 1.3.2 Scope
28-29
30 -44
3. SYSTEM DESIGN
3.1 Basic Modules 3.2 Input of the Project 3.3 Output of the Project 3.4 Procedural Design 3.5 Data Structure 3.6 Conceptual Models. 3.6.1 DFD 3.6.2 E-R Diagram
45 - 52
53 - 57 58 - 65
66 -165
166 182
183 - 191
6 CONCLUSIONS
6.1 Limitations of the System 6.2 Future Scope of the Project REFERENCES 7 GLOSSARY
193 -199
200 201
Page 28
1.1Background
Daily Banking System has been created with the help of two master minded programming language Java and Oracle. The former being in the foreground and the later in the background respectively. The background language is favorite of many of the programmers because it offers the much wanted structured query facility. Moreover Oracle provides high security as the database is stored in the logical area called db Engine. As dbEngine is created in the virtual memory and end-user cannot access that directly it . With these thoughts in mind Daily Banking System has been developed after brainstorming the needs and requirements of the SBI (State Bank of India).
1.2Objective
1.2.1 Capability:- The suggested name Daily Banking System where business activity are influenced by an Banks ability to process transaction quickly and efficiently information system add capability in three ways. Improved Processing Speed:-The Row material management System used number of functions and DLL to keep all transaction in the memory until the programmed is to be terminated which increase the inherent Speed of the computer for processing data. Increased Volume:-Daily Banking System Provides to Process of greater amount of activities to take advantage of new transaction, because of data available in main memory all information are integrated and depends upon memory, this volume of data may also be increased. Faster Retrieval of Information: - locating and retrieving information from storage, there is need to some complex searching. The Daily Banking System designed as front-end Java and Back end oracle i.e. SQL which supports more complex methods. So faster retrievals of information.
1.3 Ccontrol
1.3.1Greater Accuracy and Consistency: - Carrying out computing steps including arithmetic, correctly and consistency because of Java fully support math co-processor .
Page 29
En.Roll-063514872 Appin Technology Lab 1.3.2Better Security: - Safeguarding sensitive and important by making it accessible only to authorize persons. There are three level securities, one is data level, second is user level and third is administrator level.
1.5 Cost
1.5.1 Monitor Cost:- Daily Banking System is a completely paperless S/W, so there is no need of extra paperwork to retrieve information from database. 1.5.2Reduce cost: - Using computing capability to process data at a lower cost then possible with other method while maintaining accuracy and performance level.
1.6 Competitiveness
As per S/W competitive Daily Banking System is designed in such a way that it faces modernized S/W competitiveness as per S/W limitations. It consists of accuracy, flexibility, better documentation and other S/W requirements facilities in modern era.
Page 30
En.Roll-063514872 Appin Technology Lab Solution that you need? The next set of questions enables the software engineer to gain a better Understanding of the problem and the customer to voice his or her perceptions about a solution:How would you characterize good output that would be generated by a successful solution? y What problem(s) will this solution address? y Can you show me (or describe) the environment in which the solution will be used? y Will special performance issues or constraints affect the way the solution is approached? The final set of question focuses on the effectiveness of the meeting: Are you the right person to answer these questions? Are your answers? Official? Are my questions relevant to the problem that you have? Am I asking too many questions? Can anyone else provide additional information? Should I be asking you anything else? Account wise total deposit. Total matured fixed account. Total fixed account across fifty thousands. . According to the above concepts I went to State Bank of India and met its staffs, management, and some persons related with the organizational work, which advised me related with my project.
Page 32
En.Roll-063514872 Appin Technology Lab tests to uncover errors and ensure that defined input will product actual results that agree with required results. Support: - Software will undoubtedly undergo change after it is delivered to the customer (a possible exception is embedded software). Change will occur because errors have been encountered, because the software must be adapted to accommodate change in its external environment (e.g., a change required because of a new operating system or peripheral device), or because the customer requires functional or performance enhancements. Software support/ maintenance reapply each of the preceding phases to an existing program rather than a new one.
Page 33
En.Roll-063514872 Appin Technology Lab Description fraction of total time Software Phase Typical
D O C U M E
15% Development of a detailed Plan to Solve Problems 2.Alogrithm design 10% Precise Formulation of problem 1. Specification 10% Initial Statement of Problems
N T A T I O N
15%
3. Coding
50 %
Modificatio n of Program
5.Modification
Page 34
En.Roll-063514872 Appin Technology Lab Figure 3: Waterfall Model of Software Life Cycle
Page 35
Clients:
Pentium II or higher Processor SVGA Color Monitor At least 2 GB Hard Disc 64 MB RAM Mouse and Keyboard
Page 36
Network (LAN):
16 Port Hub UTP (Cat-5) Cables & Connectors TCP/IP Protocol
Clients:
Window 95/98/2000 Professional Oracle Developer 2000 (Form 6.0) Jdk 1.5.
2. 4. 3 Description of Software & Hardware Tools: Database Management System (DBMS) A database management system (DBMS) consists of collection of interrelated data and a set of program to access those data. The collection of data, usually referred to as the database, contains information about one particular enterprise. The primary goal of DBMS is to provide an environment that is both convenient and efficient to use database information. Feature of Database Management System: DBMS permits the following facility/capability: (A).Creating of file, addition to data, deletion of data; creation, addition and deletion of entire files. (B) Retrieving data collectively or selectively. (a)The data stored can be sorted or indexed at the user direction and discretion. (b)Various reports can be produced from the system. These may be either standardized report or that may be specifically generated according to specific user definition. (c)Mathematical functioned can be performed and the data stored in the database can be manipulated with these functions to perform the desired calculations. (d)To maintain data integrity and database use
Page 37
Relational Database Management System:Relational Database Management System (RDBMS) have much more advantage over DBMS. One of the main advantages of Relational Data Base Management System is that it is based on mathematical theory of relation. So, its database management system has the capability to recombine the data elements to for, different relations thus giving great flexibility in the uses of data. The data structure aspects of RDBMS deals with defining tables, its various attributes etc. Tables are nothing but the logical structure in relational system, not the physical structure, we can also say that tables represent an abstraction of the way the data is physically stored. Capabilities of RDBMS: (a)Easy access to data (b)Flexibility in data modeling (c)Reduced data storage and redundancy (d) Independence of physical and logical data design. (e)A high-level data manipulation language (SQL) (f)It also frees the user from details of storage structure and access method. Oracle 9i Database Server:Oracle is an object-relational database in simple way, we know, a relational database is nothing more than a collection of tables of data. An object relational database supports all the features of the relational database. It also supports object-oriented concepts and features. In other words, an object-relational database management system (ORDBMS) extends the capability of the RDBMS to supports the object-oriented concept. Users can use MS-ACCESS as an RDBMS or take advantage of its objectoriented features. Oracle 8.0 Productivity and Utility :ORACLE is a kernel package that has a number of tools that can be purchased separately and integrated the kernel and add-ons. The tools allow the user to create database objects, like procedure, trigger function etc. some of tools are: y SQL*PLUS y PL/SQL The ORACLE RDBMS is a central ORACLE product. It includes the database manager and several tools intended to assist the users and DBA in the maintenance and use of data. The core of RDBMS is the kernel. The kernel handles the following task: y y y y y Manages storage and definition of data Controls and limits data access and concurring Allows backup and recovery of data Interprets SQL and PL/SQL
Page 38
En.Roll-063514872 Appin Technology Lab y SQL * PLUS: - SQL*PULS is the command line interface to the oracle database. It is a powerful oracle product that can take you instruction for oracle, Check them for correctness, submit them to oracle and then modify or reformat the response oracle gives, based on orders or directions that you have set in place. It interacts with you, which means you can talk back. You can give directions, and it will follow them precisely. It will tell you if it doesnt understand something you have told it to do. As we get started, just think of SQL*PLUS as a co-workeran assistant follows your instructions and helps you do your work more quickly. SQL: - SQL is a data sub-language. That is to say, the purpose of SQL is to interface to a relational database such as Oracle and all SQL statement are instructions to the database. In this it differs from general purposes programming language like C and BASIC. Among the features of SQL are the following: y It provides sets of data as groups rather than as individual units. y It provides automatic navigation to the data. y It uses statements that are complex and powerful. The flow-control statements of most programming languages are absent in SQL y They are provided in Oracles extension to standard SQL called PL/SQL. y SQL provides commands for a variety of tasks including: Querying data. Inserting, updating and deleting rows in a table. Creating, replacing altering and dropping objects. Controlling access to the database and its objects. Guaranteeing database consistency and integrity. PL/SQL: - PL/SQL stand for procedural language extension to SQL PL/SQL available primly as an enabling technology within other softer products; it does not exit as a stand along Language. PL/SQL is powerful language, which incorporate many of most advance elements of procedural languages including: y Explicit block structure. y Conditional and sequential control statements. y Loops of various kinds. y Exception handlers for use in event-based error handling. Construct that help in the development of modular code functions, procedures and Packages (collection of related program and variables); packages are often referred to as Poor mans objects. y User-defined data type such as object and nested table (with the oracle object option). PL/SQL is integrated tightly into oracle SQL language: we can execute SQL statement directly from our procedural program. Conversely, we can also call PL/SQL function from within a SQL statement. We have use PL/SQL in the oracle relational database in the oracle server and in client side application development tools such as oracle forms. PL/SQL is closely integrated into SQL language, yet it add programming construct that are not native to this standard relational data base language. PL/SQL is a usual and an unusually powerful Programming language .PL/SQL support Page 39
En.Roll-063514872 Appin Technology Lab packages which allow us to perform object Oriented design. PL/SQL provides a powerful mechanism for trapping and with exception handlers resolving errors. The tight integration of PL/SQL with SQL provides developer with the best of both worlds-declarative and procedural logic. Java (Jdk 1.5) :Java is an object oriented, internet programming language, it main features are:- (a)Platform Independent.(b)Security Internent programming deals with development such program which are stored on the web server and transmitted over the network as for the response to be executed within client browser Internet Programs interactivily the webpages: Internet Programming as following differences for conventional programming plateform of client not know in advands in case of internet programming. Client need to be a resore that the program downloaded the Network wont harm his/her system. Now feature of java API which are used in this Project:Java API that facilated development of GUI Application in java. This API Provides reusable GUI Componets and Helper Classes and interfaces AWT:-At the roof of Awt Componet Hierachy as an abstract class Name componet which declares functionality Common to all Awt Componets Container:- is an abstract subclass of componet which adds the feature of containership to a componet window or panel are two non abstract subclasses of container window represnts a rectangular resion that has border and titlebar A panel is borderless and titleless window. Frame:- is a subclass of window i.e the additional fnlity of containg menu. SWING:- is a the extension of AWT which facilated development of soficiticated GUI Application in java difference between AWT and SWING Swing Componets are plateform independent whereas awt component are plateform dependents.Swing componets supports richer functionality as compare to AWT componts. Look and feel of Awt Componets vary from one plateform to another whereas look and feel of swing components remain consistent across all plateforms. Swing Componests are designed are MVC Model Architecture Where AWT Componets are Designed Peer architecture Support for Oracle 9i and PL/SQL:- Java is the best development environment for ORACLE9i and PL/SQL9. We use the same wizard to build applications that exploit relational databases and Oracle9i object-relational capabilities. We can build forms, reports, and charts that leverage the simplicity and power of object tables, and work with them just like relational data. Oracle Developer also utilizes the digital media capabilities of Oracle9i, enabling you to create applications that seamlessly combine time-series, spatial, image, sound, and textual information with relational and object data.
Page 40
LAN: - Local Area Networks, generally called LANs, are privately owned networks within a single building or campus of unto a few kilometers inside. They are widely used to connect personal computers and workstations in company offices and factories to share resources (e.g., printers) and exchange information. LANs are distinguished from other kinds of networks by three characteristics: (a) Their size (b) Their transmission technology and (c) Their topology Traditional LANs run at speeds of 10 to 100 Mbps, have low delay (tens of microseconds), and make very few errors. Newer LANs may operate at higher speeds, unto hundreds of Mbps. UTP: -UTP stands for Unshielded Twisted Pair. Twisted pair cabling comes in several varieties, two of which are important for computer networks. Category 3 twisted pair consists of two insulated wires gently together. Four such pairs are typically grouped together in a plastic sheath for protection and to keep the eight wires together. This scheme allowed unto four regular telephones or to multilane telephones in each office to connect the telephone company equipment in the closet. Category 5 twisted pair is similar to category 3 twisted pair, but with more twists per centimeter and Teflon insulation, which results in less crosstalk and a better quality signal over long distances. Both of these wiring types are often referred to as UTP. TCP/IP Protocol: -Transmission Control Protocol (TCP)/Internet Protocol (IP) is a set of protocols developed to allow computers of all sizes from different vendors, running different operating systems, to communicate or to share resources across the networks. This was designed to provide a reliable end-to-end byte stream over an unreliable inter networks. TCP is a connectionoriented protocol while IP is a connectionless protocol.
Page 41
En.Roll-063514872 Appin Technology Lab Report the findings to management, with recommendation outlining the acceptances or rejection of the proposal. Considering above criteria I also keep in mind that the requirements are clearly understandable when the clarification of project request is enquired. The data of the Row material management system, which are collected by me during preliminary investigation, are through:y y y y Reviewing organization Documents Onsite observation and Conducting interviews.
SYSTEM ENGINEERING
SOFTWARE DESIGN
Page 42
En.Roll-063514872 Appin Technology Lab Economic analysis is the most frequently used technique for evaluation of the effectiveness of a proposed system. More commonly known as Cost/Benefit analysis, the procedure is to determine the benefits and saving that are expected from a proposed system and compare them with costs. If benefits outweigh costs, a decision is taken to design and implement the system. Other weight costs, a decision is taken to design and implement the system. Otherwise, further justification or alternative in the proposed system will have to be made if is to have a chance of being approved. This is an on going effort that improves in accuracy at each phase of the system life cycle. Before establishing Economical Feasibility so as to justify the expenses that different organization working under this category has to bear for this Software. It is crystal clear that the user or Customer of this Software has no need to invest heavy amount for this software. As my project has been written in such a language, which is a platform Independent. It has also the feature of WORM. It means it possess the technology of Write Once & Run every one There is no any heavy expense on the maintenance of this Software. Also there is no need to expense a heavy amount on the set of Very Expert Personals because it is very easy and user-friendly software. It is fully tighten protection of Secret Password and User Name for unauthorized access of this Software. For different types of Process or Operation, Reports or Query and Output also, there is no need of heavy expenditure. 2. 5. 4 Operational Feasibility My project is also fit in Operational Feasibility Study. As I have explained before this about Technical Feasibility and Economical Feasibility, this Software is very easy and user-friendly. I have used a very easy menu system and also used some control buttons in the easy way by which one can choose the options on his desire. Though this is fully protected with the security by word (Password and user name), if both are matched only then one can get access of this software. Various Reports, Forms and Queries can be generated on the fingertips for the user. In nutshell we can say that it has following operational features: a) It is User-Friendly. (b) It is having less paperwork. (c) Efficient tractability. (d)Query can be generated. (e)Various Reports and Forms can be generated. (f)Fully protected by Password and User Name for unauthorized access.
Page 44
software
Application hardw are Regulatory agencies Customers, Vendors Genarl Technical Cost Systems/ Programmers Operators/ supplies hardw are/ software
Nonmanagem ent
Operator
Economic Saving
Benefits
Sup pli e s Oper ato , rs ex pens e, Cle rical / Pers on n Equ ipm el, en t
Tangible
Intangible
Page 45
The system design process is not a step adherence of clear procedures and guidelines. Though, certain clear procedures and guidelines have emerged in recent days, but still much of design work depends on knowledge and experience of the designer. When designer starts working on system design, he will face different type of problems. Many of these will be due to constraints imposed by the user or limitation of the hardware and software available in the market. Sometimes, it is difficult to enumerate the complexity of the problems and solutions thereof since the variety of likely problems is so great and no solutions are exactly similar. However, following considerations should be kept in mind during the system-designing phase.
Page 46
En.Roll-063514872 Appin Technology Lab CUSTOMER DETAIL :This module includes the all the master data about a customer which required by a bank. This module is also a master table. The attributes of this module is customer code, customer name, nominee name, nominee name nominee address etc, where customer code is primary key. This module is linked with another table shaving a/c, current a/c etc. The pictorial representation of this module is as follows. LOAN_DETAILS CUSTOMER DETAILS ACCOUNT DETAILS
ACCOUNT DETAILS :This includes details of an account. If any account opens in the bank then it first inserted into this module. It stores account no, type, customer id and their opening date. This module is linked with shaving account, current account, recurring account and fixed deposit account. It can be depicted as:
CURRENT ACCOUNT
ACCOUNT DETAILS
SHAVING ACCOUNT
Page 47
En.Roll-063514872 Appin Technology Lab SHAVING ACCOUNT:This module stores the account condition of shaving type account. This account is best for medium level customer. In this module account id is foreign key. In this account you can get interest 3.5 percent by bank. CURRENT ACCOUNT:This module contains the detail of account of current type. In the current account we can perform transaction more than one times in a day, but we can not get any interest by bank. This is one of the oldest account and more popular account. In this module account id is foreign key.
En.Roll-063514872 Appin Technology Lab Mainly, following five parts have been included in the system design process: 3.2.6Output Design: - The starting point of the design process is the proper knowledge of system requirements, which will normally be converted in terms of output. 3.2.7 Input Design: - Once the output requirements have been finalized, the next step is to find out what data need to be made available to the system to produce the desired outputs. The basic documents in which these data are available need to be identified. If necessary, these documents may have to be revised or new documents may have to be introduced. 3.2.8 File Design:-Once the input data is captured in the system, these may have to be preserved either for a short or long period. These data will generally be stored in files in a logical manner. The designer will have to devise the techniques of storing and retrieving data from these files. 3.2.9 Procedure Design:-This step involves specification of how processing will be performed in this, there are two aspects: y Computer procedure. y Non-computer procedure. y The computer procedure will specify what Functions will be carried out on computer, What will be different programs and in What sequence the programs will be run. The non-computer procedure will specify the manual procedures for feeding input data, receiving outputs etc. 3.2.10 Control Design:-The control design indicates necessary procedures which will ensure correctness of processing, accuracy of data, timely output etc. This will ensure that the system is functioning as per plan.
En.Roll-063514872 Appin Technology Lab Input records? What medium should be used for Recording the input? 3.4 Output Design Presenting the data processed by a computer-based information system in an attractive and usable form has become very essential. Success and acceptance of a system to some extent depend on good presentation. Therefore, system analysts must know fully how to design output report in an attractive way. Many new output devices are being introduced in the market because of recent development in computer technology. There are three main reasons why outputs from the computer are required. (a)For communicating to the persons concerned. (b)For re-input to the computer for being connected with other data and further processing. (c)For Permanent storage. 3.4.1Output Design Consideration: - Outputs to be produced usually depends upon the following consideration: Type of User and Purpose:-Generally different levels of users will have different requirements from the system. Some want exception reports (e.g. When sales fall below a certain level), some want summary reports (e.g. sales quantity and value for each region) while some want details (e.g. list of invoices for a period). Again statutory reports will normally be as per requirement specified under the law and the designer will not have much flexibility to change the format. Content:-The data that are needed to be included in the output. These will be related to the purpose of the input. Format:-This refers to the arrangement of data on the report, size of the paper, titles, headlines, color of the paper etc. Frequency and Timing:- At what frequency (daily, weekly, monthly, annually etc.) and when (after annual closing of accounts, after the end of the fiscal year, before the last day of every month etc.) Volume: -Often sheer volume of the output deters one from using the outputs. The sheer bulk of the report may also create problems for handling, filing or printing time. Sequence:-The usefulness of an output very often depends on the sequence of data printed. A proper sequence will also help distribution of outputs to different users (e.g. pay-slips printed department wise facilitates easier payment). Quality:-This relates to the content, appearance and accuracy of the output generated for external users should be given special attention in respect of its get-up, quality of paper etc. Type of Stationary:-Reports can be generated on ordinary blank stationery or on specially printed stationary which is useful when most of the contents of the input (e.g. Invoice, pay-slips etc.) are constant. This type of stationary has the following advantages: (a)Save Computer time. (b)Attractive appearance convenient to use by the user. Page 50
En.Roll-063514872 Appin Technology Lab requirements that determine hardware configurations. System analyst is responsible for designing the files and selecting their contents, selecting from options available for organizing the data. File organization may be sequential, index sequential, inverted list or random. Each method has its own uses and abuses. An integral approach to file design is the database. The general theme is to handle information as an integrated whole, with a minimum of redundancy and improved performance. Various software techniques are applied to manipulate, describe and manage data. Irrespective of type of data structure used, the main objectives of database are accurate and integrity, successful recovery from failure, privacy and security of data. Files are the heart of a computer application. The basic terms used to describe file are Data item, Record, File and Database. Data Item: -A basic or individual element of data is called data item. Each Data item is assigned a value. Data item is sometimes referred to as a field. Record:-The collection of related data items is called a record. The analyst also determines the length and type of each field. File: -File is a collection of related records. Each record in a file is included because it pertains to the same entity. Database:-The highest level in the hierarchy is the database. It is a set of inter-related files for real time processing. It contains the necessary data for problem solving and can be used for several users who are accessing data concurrently. Types of Files:-There are various types of files in which the records are collected and maintained they are categorized as: y Master file. y Transaction file. y Table file. y Report file. y Back-up file. y Dump file y Library file. Master File:-Master files are the most important type of file. Most file design activities concentrate here. In a business application, these are considered to be very significant; they contain the essential records for maintenance of the organizational business. Transaction File:-A transaction file is a temporary file used for two purposes. First of all, it is used to accumulate data about events as they occur. Secondly, it helps in updating master files to reflect the result of current transactions. The term transaction refers to any business event that affect the organization and about which data is captured. Examples of common transaction in the organization are making purchases, hiring of workers and recording of sales. Table File:-A special type of master file is included in many systems to meet specific requirements. where data must be referenced repeatedly. Table files are permanent files containing reference data used in processing transaction, updating master file of producing output. As memory space and make the program maintenance easier by storing data in a file, that otherwise would be included in programs or master file records.
Page 52
En.Roll-063514872 Appin Technology Lab Report File:-Report files are collected contents of individual output reports of documents produced by the system. They are created by the system where many reports are produced by the system but printer may not be available for all the reports. This situation frequently arises when the computer carries out three functions- Input, Processing and Output simultaneously, rather than executing each function in sequence. In this case, the computer writes the report contents to a file on the disk or secondary storage device, where it remains until it can be printed. That file is called the report file, which contains the unprinted output data. The process of creating it is known as spooling, which means that output that cannot be printed when it is produced is spooled into a report file. Then, depending on the availability of printer, the system will be instructed to read the report file and print the output on the printer. Backup File:-It is a copy of master, transaction or table file that is made to ensure a copy is available if anything happens wrong to the original. Dump File:-This is a copy of computer-held data at a particular point of time. This may be copy of master file to be retained to help recovery in the event of a possible corruption of the master file or it may be part of a program in which error is being traced. Library File: Library file generally contains application programs, utility programs and system software packages.
Page 53
3.4 DATASTRUCTURE
1. CUSTOMER DETAIL Fields Customer_code Customer_name Customer_lcadd Customer_pradd D.O.B Age Sex Phone_no Pan_no Merita_status Nationality Qualification Nominee_name Nominee _add Nominee_relation Occupation Data type Varchar2 Varchr2 Varchar2 Varchar2 Date Number Varchar2 Number Number Varchar2 Varchar2 Varchar2 Varchar2 Varchar2 Varchar2 Varchar2 Width 10 30 60 60 3 4 12 12 10 15 15 30 40 15 15 Precision Key Constraints Primary key
2. ACCOUNT DETAIL: Field Account_id Customer_id Data type Varchar2 Varchar2 Width 10 10 precision Key Constraints Primary key Foreign key
Page 54
15
3. CURRENT ACCOUNT:
Width 10 15
Precision
4 TRANSACTIONS:
Field Serial_no Tr_mode Account_id Account_name Amount Field Tr_type Pay_to/received_by Account_id Date Date Balance_amount
Data type Varchar2 Varchar2 Varchar2 Varchar2 Number Data type Varchar2 Varchar2 Varchar2 DateDate Number
Width 10 15 10 30 15 Width 15 30 10 15
Precision
Precision
5. SAVING A/C:
6. FIXED A/C
Page 55
7. GENERAL LEDGERS:
Field Date Shaving_dposit Shaving_withdrawal Sh_balance Current_dposit Current_withdrawal Current_balance Recurring_deposit Recurring_withdrawal Recurring_balance Fixed_deposit Fixed_withdrawal Fixed_balance
Data type Date Number Number Number Number Number Number Number Number Number Number Number Number
Width 15 15 15 15 15 15 15 15 15 15 15 15
Precision
8 LOAN DETAILS: Field Date Deposit Withdrawal Balance_amount Data type Date Number Number Number Width 10 10 10 Precision Key Constraints Primary key
9 ACCOUNT TRASNFER: Field Account_id Transfer_to Account_type Field Account_id Date Balance_amount Data type Varchar2 Varchar2 Varchar2 Data type Varchar2 Date Number Width 10 30 15 Width 10 15 Page 56 Precision Key Constraints Foreign key
Precision
10
Width 10 5 15 2 15
Precision
10. HEAD OFFICE ACCOUNT: Field Data type Width Date Date Deposit Number 10 Withdrawal Number 10 Balance_amount 11. FIXED DEPOSIT
Precision
Page 57
Field Cdate Csaving Ccurrent Crecurring Cfixed Choffice Cloans Lday_balance Crtotal Dsaving Dcurrent Drecurring Dfixed Dhoffice Dloans Cash_in_hand Dtotal Remark
Data type Date Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number
Width 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50
Precision
13 Balance Sheet
Field Bdate Saving Recurring Current1 Fixed Total Cash_in_hand As_loans Hoffice Grand_total Remarks Data type Date Number Number Number Number Number Number Number Number Number Number Width 50 50 50 50 50 50 50 50 50 50 Precision Key Constraints Primary key
Page 58
DFD LEVEL 0
CUSTOMER DETAILS
CUSTOMER DETAILS
ACCOUNT DETAILS
Page 59
En.Roll-063514872 Appin Technology Lab ACCOUNT DETAILS FIXED A/C FIXED A/C CURRENT A/C LOAN A/C LOANS ACCOUNT
CURRENT A/C
Page 60
ORDER
PRODUCT
Order
PROCESS_ ORDERR
verify
CUSTOMER Billing Information Customer Name and address COLLEC T PAYMEN T CUSTOMER DETAILS
ACOUNT DETAILS
Page 61
FIXED A/C
DFD LEVEL 1
FIXED A/C
PROCES S_OPEN
Verify Transaction
LOAN
Verify Mature
Fill Form updates
Loan Form
FIXED A/C
Page 62
CURRENT A/C
DFD LEVEL 1
Verify
Loan Form
Verify
COLLEC TPAYMEN T
Mature
Updates Customer-details
CURRENT A/C
Page 63
LOAN A/C
DFD LEVEL 1
LOAN_DETAILS
PROCESS ORDER
Verify Form
name,cust_id
LOAN_TY PE
Check a/c,cust
Account Details
Updates Transfer
LOAN_DETAILS
Page 64
Request form
1 Process Deposit and Withdrawal
Account Detail
Result
Customer Detail
Page 65
data retrive
entry
Final passbook
Transaction
figure 14:
DFD LEVEL-2
Page 66
CNAME
ACC_N AME
CUS_ID
CUSTOMER_ DETAILS
HAS
ACCOUNT_ DETAILS
PHONE_ NO
M 1
IS A
SAVING A/C IS A
AMOUNT DATE
11
ACC_ID
M
LOAN FIXED A/C CURRENT A/C
DATE
AMOUNT
WITHDRAW
Page 67
4.1Coding Detail:Main Form Code import pg.*; import java.awt.*; import javax.swing.*; import java.awt.event.MouseListener; import java.awt.event.*; import java.awt.event.MouseEvent; import java.lang.*; public class MyProject //this is main program of this project{ private JMenuBar mb; private JMenu mtr,tr,rp,ex,hl,mor; private JMenuItem ctd,acd,gd,ld; private JMenuItem cac,sac,rcac,fxac,tr1,actf,accl,csb,bls,cgr,hac,gnl,atr; private JMenuItem rp1,rp2,rp3,rp4,rp5,rp6,rp7,rp8,rp9; private JMenuItem ys,no; private JFrame frm; private JLabel tl,lb,nm; private String[]images={"brand.gif"}; private ImageIcon picture; private JPanel pl; private JLabel lg1; public MyProject() //constructor of class MyProject {pl =new JPanel();frm=new JFrame("Daily Banking System"); frm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frm.setLayout(null); tl=new JLabel("DAILY BANKING SYSTEM"); Color cl =new Color(35,74,135); tl.setForeground(cl); Font ft =new Font("Bookman Old Style",Font.BOLD,55); tl.setFont(ft); Font ft1 =new Font("Arial",Font.ITALIC,50); tl.setBounds(30,170,750,60); lb=new JLabel("FOR"); lb.setFont(ft1); lb.setForeground(cl); lb.setBounds(300,240,150,50); Icon log=new ImageIcon(getClass().getResource("brand.gif")); lg1 = new JLabel(log);Icon log1=new ImageIcon(getClass().getResource("main lg.gif")); nm =new JLabel(log1); frm.add(lg1); nm.setBounds(300,10,550,205); lg1.setBounds(100,290,580,220); Page 68
En.Roll-063514872 Appin Technology Lab frm.add(tl); frm.add(lb); mb=new JMenuBar(); mtr=new JMenu("Master"); tr=new JMenu("Transaction"); rp=new JMenu("Report"); ex=new JMenu("Exit"); mtr.setMnemonic('M'); tr.setMnemonic('T'); rp.setMnemonic('R'); ex.setMnemonic('E'); ctd =new JMenuItem("Customer Detail"); acd =new JMenuItem("Account Detail"); gd =new JMenuItem("Gurrantor Detail"); ld =new JMenuItem("Loan Detail"); gnl =new JMenuItem("General Ledger"); atr =new JMenuItem("Account Transfer"); cac =new JMenuItem("Current Account"); sac =new JMenuItem("Saving Account"); rcac=new JMenuItem("Reccuring Account"); fxac=new JMenuItem("Fixed Account"); tr1 =new JMenuItem("Transaction"); actf=new JMenuItem("Account Transfer"); accl=new JMenuItem("Account Close"); csb =new JMenuItem("Cash Book"); bls =new JMenuItem("Balance Sheet"); cgr =new JMenuItem("Customer Gurrnator"); hac =new JMenuItem("Head Office Account"); rp1 =new JMenuItem("Day wise deposit to all account seperately"); rp2 =new JMenuItem("Total deposit perday"); rp3 =new JMenuItem("Monthly total deposit"); rp4 =new JMenuItem("Account wise total deposit"); rp5 =new JMenuItem("Total account opening in a session"); rp6 =new JMenuItem("Total closed account "); rp7 =new JMenuItem("Total transfered account"); rp8 =new JMenuItem("Total matured fixed account"); rp9 =new JMenuItem("Total fixed account above 50 thousands"); ys =new JMenuItem("Yes"); no =new JMenuItem("No"); frm.setJMenuBar(mb); mb.add(mtr);mb.add(tr);mb.add(rp);mb.add(ex); mtr.add(ctd);mtr.add(acd); mtr.add(gd);mtr.add(ld);tr.add(cac);tr.add(sac); tr.add(fxac);tr.add(rcac);tr.add(tr1);tr.add(accl); tr.add(atr);tr.add(gnl);tr.add(csb);tr.add(bls); tr.add(cgr);tr.add(hac); rp.add(rp1);rp.add(rp2);rp.add(rp3);rp.add(rp4); rp.add(rp5);rp.add(rp6);rp.add(rp7);rp.add(rp8); rp.add(rp9); ex.add(ys); Page 69
En.Roll-063514872 Appin Technology Lab ex.add(no); ctd.addActionListener(new ctdlistener()); acd.addActionListener(new acdlistener()); ld.addActionListener(new ldlistener()); gd.addActionListener(new gdlistener()); cac.addActionListener(new caclistener()); sac.addActionListener(new saclistener()); fxac.addActionListener(new fxclistener()); rcac.addActionListener(new rcaclistener()); tr1.addActionListener(new trlistener()); actf.addActionListener(new acflistener()); accl.addActionListener(new acllistener()); //here listener used for event handling gnl.addActionListener(new gnlistener()); atr.addActionListener(new atrlistener()); csb.addActionListener(new csblistener()); bls.addActionListener(new blslistener()); cgr.addActionListener(new cgrlistener()); hac.addActionListener(new haclistener()); rp1.addActionListener(new rp1listener()); rp2.addActionListener(new rp2listener()); rp3.addActionListener(new rp3listener()); rp4.addActionListener(new rp4listener()); rp5.addActionListener(new rp5listener()); rp6.addActionListener(new rp6listener()); rp7.addActionListener(new rp7listener()); rp8.addActionListener(new rp8listener()); rp9.addActionListener(new rp9listener()); ys.addActionListener(new yslistener()); no.addActionListener(new nolistener()); Color clr =new Color(204,204,255); frm.getContentPane().setBackground(clr); frm.setSize(800,600 ); frm.setVisible(true);} private class ctdlistener implements ActionListener { public void actionPerformed(ActionEvent e) { Projectpkg pk=new Projectpkg();}} private class acdlistener implements ActionListener { public void actionPerformed(ActionEvent e) { AccountDetail ad =new AccountDetail(); }} private class ldlistener implements ActionListener { public void actionPerformed(ActionEvent e) { LoanDetail dl =new LoanDetail(); }} private class gdlistener implements ActionListener Page 70
En.Roll-063514872 Appin Technology Lab { public void actionPerformed(ActionEvent e { GurrantorDetail gd =new GurrantorDetail(); }} private class caclistener implements ActionListener { public void actionPerformed(ActionEvent e) { CurrentAccount ca =new CurrentAccount(); }} private class saclistener implements ActionListener { public void actionPerformed(ActionEvent e) { SavingAccount sv =new SavingAccount(); }} private class fxclistener implements ActionListener { public void actionPerformed(ActionEvent e)
{
FixedAccount fx =new FixedAccount(); }} private class rcaclistener implements ActionListener { public void actionPerformed(ActionEvent e) { RecurringAccount rc =new RecurringAccount(); }} private class trlistener implements ActionListener { public void actionPerformed(ActionEvent e) { Transaction td =new Transaction(); }} private class acflistener implements ActionListener { public void actionPerformed(ActionEvent e) { AccountTransfer at =new AccountTransfer(); }} private class acllistener implements ActionListener { public void actionPerformed(ActionEvent e) { AccountClose adcl =new AccountClose(); }} private class atrlistener implements ActionListener { public void actionPerformed(ActionEvent e) { Page 71
En.Roll-063514872 Appin Technology Lab AccountTransfer at =new AccountTransfer(); }} private class csblistener implements ActionListener { public void actionPerformed(ActionEvent e) { CashBook chb =new CashBook(); }} { public void actionPerformed(ActionEvent e) { BalanceSheet bl =new BalanceSheet(); }} private class cgrlistener implements ActionListener { public void actionPerformed(ActionEvent e) { CustomerGurrantor cg = new CustomerGurrantor(); }} private class haclistener implements ActionListener { public void actionPerformed(ActionEvent e) { HOfficeAccount hc =new HOfficeAccount(); }} private class rp1listener implements ActionListener { public void actionPerformed(ActionEvent e) { RP1 rp1 =new RP1(); }} private class rp2listener implements ActionListener { public void actionPerformed(ActionEvent e) { RP2 rp2 =new RP2(); }} private class rp3listener implements ActionListener { public void actionPerformed(ActionEvent e) { RP3 rp3 =new RP3(); }} private class gnlistener implements ActionListener { public void actionPerformed(ActionEvent e) { JOptionPane.showMessageDialog(null,"General Ledger clicked"); GeneralLedger gl =new GeneralLedger(); }} Page 72
En.Roll-063514872 Appin Technology Lab private class rp4listener implements ActionListener { public void actionPerformed(ActionEvent e) { RP4 rp4 =new RP4(); }} private class rp5listener implements ActionListener { public void actionPerformed(ActionEvent e) { RP5 rp5 =new RP5(); }} private class rp6listener implements ActionListener { public void actionPerformed(ActionEvent e) { RP6 rp6 =new RP6(); }} private class rp7listener implements ActionListener { public void actionPerformed(ActionEvent e) { RP7 rp7 =new RP7(); }} private class rp8listener implements ActionListener { public void actionPerformed(ActionEvent e) { RP8 rp8 =new RP8(); }} private class rp9listener implements ActionListener { public void actionPerformed(ActionEvent e) { RP9 rp9 =new RP9(); }} private class yslistener implements ActionListener { public void actionPerformed(ActionEvent e) { System.exit(0); }} private class nolistener implements ActionListener { public void actionPerformed(ActionEvent e) { JOptionPane.showMessageDialog(null,"No clicked"); }}} //end class MyProject Page 73
En.Roll-063514872 Appin Technology Lab User and Password Class import pg.*; import java.io.*; import java.lang.*; import javax.swing.*; import java.awt.event.*; import java.awt.*; import java.util.Vector; import javax.swing.table.AbstractTableModel; public class Lg extends JFrame{ JButton bt; JLabel lb,lb1; private ImageIcon log1; public Lg() { super("WELCOME"); setLayout(null); lb=new JLabel("DAILY BANKING SYSTEM"); Color cl=new Color(120,145,220); lb.setFont(new Font("chinyen",Font.BOLD+Font.ITALIC,30)); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); bt=new JButton("Continue"); add(bt); bt.setBounds(325,400,120,30); bt.addActionListener(new btListener()); add(lb); lb.setBounds(200,100,400,50); log1=new ImageIcon(getClass().getResource("brand.gif")); lb1=new JLabel(log1); add(lb1); lb1.setBounds(190,150,400,200); setSize(800,600); setVisible(true); getContentPane().setBackground(cl); } private class btListener implements ActionListener { public void actionPerformed(ActionEvent e) { password l=new password(); }} public class password extends JFrame { JButton bt,bt1; private JLabel nmtext1,passtext1; private JPasswordField passtext; private int fr=0,fr1=0; private JTextField nmtext; char c[]=new char[20]; public password() Page 74
En.Roll-063514872 Appin Technology Lab { super("PASSWORD FORM"); setLayout(null); bt=new JButton("Login"); bt1=new JButton("Cancel"); nmtext=new JTextField(); passtext=new JPasswordField(); nmtext1=new JLabel("NAME"); passtext1=new JLabel("PASSWORD"); add(bt); bt.setBounds(30,130,100,30); bt.addActionListener(new btListener()); bt1.addActionListener(new buttoneListener()); add(bt1); bt1.setBounds(150,130,100,30); add(nmtext1); nmtext1.setBounds(30,30,150,30); add(nmtext); nmtext.setBounds(80,30,150,30); add(passtext1); passtext1.setBounds(10,80,150,30); add(passtext); passtext.setBounds(80,80,150,30); setBounds(200,200,300,200); setVisible(true); } private class btListener implements ActionListener { public void actionPerformed(ActionEvent e) { String val1=nmtext.getText(); val1.trim(); c=passtext.getPassword(); String val2=new String(c); val2.trim(); if(val1.equals("ratnesh") && val2.equals("pass")) { fr=1; MyProject mn=new MyProject(); dispose(); } if(val2.equals("pass")) { fr=1; } else if(fr==0) { JOptionPane.showMessageDialog(null,"Invalid Name/password,please try again"); nmtext.setText(""); Page 75
En.Roll-063514872 Appin Technology Lab passtext.setText(""); } else { JOptionPane.showMessageDialog(null,"Invalid password,please try again"); nmtext.setText(""); passtext.setText(""); }}} private class buttoneListener implements ActionListener { public void actionPerformed(ActionEvent e) { dispose(); }}}} //Here starts Package class(pg) customer_detail Class package pg; import javax.swing.*; import java.awt.*; import java.awt.BorderLayout; import javax.swing.border.Border; import java.awt.event.*; import java.sql.*; import java.sql.DriverManager.*; public class Projectpkg { String str1,str2,str3,str4,str5,str6,str7,str8,str9,str10,str11,str12,str13,str14,str15,str16 String t; JFrame fr; JLabel cd,cn,cld,cpd,dob,age,sex,phn,pan,mrt,ntn,qlf,nmn,nad,nmr,ocp; JTextField cdt,cnt,cldt,cpdt,dobt,aget,sext,phnt,pant,mrtt,ntnt,qlft,nmnt,nadt,nmrt,ocpt,sh; JButton ad,dl,sr,up,ex,sv,fs,pr,nx,ls; JPanel pl; JLabel lb,lg; Connection connection; ResultSet rs; Statement statement; Icon log,flg,plg,nlg,llg; public Projectpkg() { pl =new JPanel(); fr=new JFrame("SBI Cutome Detail"); fr.setLayout(null); cd=new JLabel("Customer code"); cn=new JLabel("Customer name"); cld =new JLabel("Customer Local address"); cpd =new JLabel("Customer Permanent address"); Page 76
En.Roll-063514872 Appin Technology Lab dob =new JLabel("Date of birth"); age =new JLabel("Age"); lb =new JLabel("Customer Details"); Font ft =new Font("Century",Font.BOLD,30); lb.setFont(ft);Color cl2 =new Color(0,0,153);lb.setForeground(cl2); log =new ImageIcon(getClass().getResource("sbi_logo.gif")); flg =new ImageIcon(getClass().getResource("prev.gif")); plg =new ImageIcon(getClass().getResource("prev1.gif")); nlg =new ImageIcon(getClass().getResource("Next.gif")); llg =new ImageIcon(getClass().getResource("Next1.gif")); lg = new JLabel(log);sex=new JLabel("sex");phn=new JLabel("Phone");pan=new JLabel("Pan no");mrt=new JLabel("MeritaStatus"); ntn=new JLabel("Nationality");qlf=new JLabel("Qualification"); nmn=new JLabel("Nominee name");nad=new JLabel("Nominee address"); nmr=new JLabel("Nominee relation");ocp=new JLabel("Occupation"); cdt =new JTextField(10);cnt =new JTextField(10);sh =new JTextField(10);cldt=new JTextField(10);cpdt=new JTextField(10);dobt=new JTextField(10);aget=new JTextField(10);sext=new JTextField(10); phnt=new JTextField(10);pant=new JTextField(10);mrtt=new JTextField(10); ntnt=new JTextField(10);qlft=new JTextField(10);nmnt=new JTextField(10);nadt=new JTextField(10);nmrt=new JTextField(10);ocpt=new JTextField(10);fs =new JButton(flg);pr =new JButton(plg);nx =new JButton(nlg);ls =new JButton(llg);ad =new JButton("Clear"); dl =new JButton("Delete");sr =new JButton("Search");up =new JButton("Update"); sv =new JButton("Save"); ex =new JButton("Exit");Color cl1 =new Color(247,223,213);fs.addActionListener(new fslistener());pr.addActionListener(newprlistener());nx.addActionListener(new nxlistener());ls.addActionListener(new lslistener());ad.addActionListener(new adlistener());dl.addActionListener(new adlistener());sr.addActionListener(new srlistener())up.addActionListener(new uplistener());ex.addActionListener(new exlistener()); sv.addActionListener(new svlistener(); fr.setLayout(null);fr.getContentPane().setBackground(cl1); fr.add(lb); fr.add(lg); fr.add(ad); fr.add(dl); fr.add(sr); fr.add(sv);fr.add(up);fr.add(ex);fr.add(sh);fr.add(fs);fr.add(pr);fr.add(nx);fr.ad d(ls);ad.setBounds(130,500,75,25);dl.setBounds(230,500,75,25); sr.setBounds(330,500,75,25);up.setBounds(430,500,75,25);sv.setBounds(530, 500,75,25);ex.setBounds(630,500,75,25); fs.setBounds(290,450,22,25);pr.setBounds(322,450,22,25);sh.setBounds(354, 450,40,25); nx.setBounds(404,450,22,25);ls.setBounds(436,450,22,25); fr.add(cd);fr.add(cdt);fr.add(cn);fr.add(cnt);fr.add(cpd); fr.add(cpdt); fr.add(cld); fr.add(cldt); fr.add(dob);fr.add(dobt); fr.add(age); fr.add(aget); fr.add(sex); fr.add(sext); fr.add(phn); fr.add(phnt);fr.add(pan);fr.add(pant);fr.add(mrt);fr.add(mrtt); fr.add(ntn); fr.add(ntnt); fr.add(qlf); fr.add(qlft); fr.add(nmn); fr.add(nmnt);fr.add(nmr);fr.add(nmrt);fr.add(nad);fr.add(nadt);fr.add(ocp); fr.add(ocpt);lb.setBounds(30,70,300,30);lg.setBounds(350,70,350,60); cd.setBounds(10,155,200,25);cdt.setBounds(200,155,150,25); cn.setBounds(10,190,200,25);cnt.setBounds(200,190,150,25); cpd.setBounds(10,225,200,25);cpdt.setBounds(200,225,150,25); cld.setBounds(10,260,200,25);cldt.setBounds(200,260,150,25); Page 77
En.Roll-063514872 Appin Technology Lab dob.setBounds(10,295,100,25);dobt.setBounds(200,295,150,25); age.setBounds(10,330,200,25);aget.setBounds(200,330,150,25); sex.setBounds(10,365,200,25);sext.setBounds(200,365,150,25); phn.setBounds(10,400,200,25);phnt.setBounds(200,400,150,25); pan.setBounds(410,155,200,25); pant.setBounds(600,155,150,25); mrt.setBounds(410,190,200,25);mrtt.setBounds(600,190,150,25); ntn.setBounds(410,225,200,25);ntnt.setBounds(600,225,150,25); qlf.setBounds(410,260,200,25);qlft.setBounds(600,260,150,25); nmn.setBounds(410,295,200,25);nmnt.setBounds(600,295,150,25); nmr.setBounds(410,330,200,25);nmrt.setBounds(600,330,150,25); nad.setBounds(410,365,200,25);nadt.setBounds(600,365,150,25); ocp.setBounds(410,400,200,25);ocpt.setBounds(600,400,150,25); Color cl =new Color(255,255,0);pl.setBackground(cl);fr.add(pl); fr.setSize(800,600);fr.setVisible(true);connect(); }public void connect() {try { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); connection=DriverManager.getConnection("jdbc:odbc:mydn1","system","oral e"); statement=connection.createStatement(); } catch(SQLException e) { JOptionPane.showMessageDialog(null,"Connection error"+e); }} catch(Exception ex) { JOptionPane.showMessageDialog(null,"Not connected"+ex); }} private class adlistener implements ActionListener { public void actionPerformed(ActionEvent e) { cdt.setText(" ");cnt.setText(" "); cldt.setText(" ");cpdt.setText(" "); dobt.setText(" ");aget.setText(" ");sext.setText(" ");phnt.setText(" "); pant.setText(" "); mrtt.setText(" ");ntnt.setText(" ");qlft.setText(" "); nmnt.setText(" ");nadt.setText(" ");nmrt.setText(" ");ocpt.setText(" "); }} private class svlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { str1= cdt.getText();str2= cnt.getText(); str3= cldt.getText(); str4= cpdt.getText(); str5= dobt.getText();str6= aget.getText(); str7= sext.getText();str8= phnt.getText();str9= pant.getText(); Page 78
En.Roll-063514872 Appin Technology Lab str10= mrtt.getText();str11= ntnt.getText();str12= qlft.getText(); str13= nmnt.getText();str14= nadt.getText();str15= nmrt.getText(); str16= ocpt.getText(); statement.executeUpdate("insert into customer_detail values('"+str1+"','"+str2+"','"+str3+"','"+str4+"',to_date('"+str5+"','DD-MMYYYY'),'"+str6+"','"+str7+"','"+str8+"','"+str9+"','"+str10+"','"+str11+"','"+str 12+"','"+str13+"','"+str14+"','"+str15+"','"+str16+"') "); statement.executeUpdate("Commit"); JOptionPane.showMessageDialog(null,"Value inserted"); } catch(SQLException se) { JOptionPane.showMessageDialog(null,"Could not inserted " +se); }}} private class dllistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { str1=cd.getText(); statement.executeUpdate("delete from customer_detail where code=' "+str1+" ' " ); statement.executeUpdate("Commit"); JOptionPane.showMessageDialog(null,"deleted"); } catch(SQLException se) { JOptionPane.showMessageDialog(null,"Could not deleted "+se); }} } private class uplistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { str1= cdt.getText();str2= cnt.getText(); str3= cldt.getText(); str4= cpdt.getText(); str5= dobt.getText(); str6= aget.getText(); str7= sext.getText();str8= phnt.getText();str9= pant.getText(); str10= mrtt.getText();str11= ntnt.getText();str12= qlft.getText(); str13= nmnt.getText(); str14= nadt.getText(); str15= nmrt.getText(); str16= ocpt.getText();statement.executeUpdate("Update Customer_detail set cd='"+str1+"',cdnm ='"+str2+"',ctladd='"+str3+"',ctpadd='"+str4+"',dob= to_date('"+str5+"'),age;to_number('"+str6+"'),sex='"+str7+"',phone=to_numbe r('"+str8+"'),panno=to_number('"+str9+"'),mrstatus= '"+str10+"', nationality= '"+str11+"',qualification ='"+str12+"',nominee_nm='"+str13+"',nominee_add='"+str14+"',nominee_rel= '"+str15+"',occupation='"+str16+"' where cd='"+str1+"' ");JOptionPane.showMessageDialog(null,"Value updated"); } Page 79
En.Roll-063514872 Appin Technology Lab catch(SQLException se) { JOptionPane.showMessageDialog(null,"Could not updated"+se); }}} private class srlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { t=JOptionPane.showInputDialog("Enter the customer id for searching"); ResultSet rs;rs=statement.executeQuery("select *from customer_detail where cd='"+t+"' ");rs.next();cdt.setText(rs.getString(1));cnt.setText(rs.getString(2)); cldt.setText(rs.getString(3));cpdt.setText(rs.getString(4)); dobt.setText(rs.getString(5));aget.setText(rs.getString(6)); sext.setText(rs.getString(7)); phnt.setText(rs.getString(8)); pant.setText(rs.getString(9)); mrtt.setText(rs.getString(10)); ntnt.setText(rs.getString(11));qlft.setText(rs.getString(12)); nmnt.setText(rs.getString(13));nadt.setText(rs.getString(14)); nmrt.setText(rs.getString(15));ocpt.setText(rs.getString(16)); JOptionPane.showMessageDialog(null,"Found"); } catch(SQLException se) { JOptionPane.showMessageDialog(null,"Data not found"+se); }}} private class exlistener implements ActionListener { public void actionPerformed(ActionEvent e) {fr.dispose(); }} private class fslistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { rs = statement.executeQuery("Select *from Customer_detail"); rs.next(); cdt.setText(rs.getString(1));cnt.setText(rs.getString(2)); cldt.setText(rs.getString(3));cpdt.setText(rs.getString(4)); dobt.setText(rs.getString(5));aget.setText(rs.getString(6)); sext.setText(rs.getString(7));phnt.setText(rs.getString(8)); pant.setText(rs.getString(9));mrtt.setText(rs.getString(10)); ntnt.setText(rs.getString(11));qlft.setText(rs.getString(12)); nmnt.setText(rs.getString(13));nadt.setText(rs.getString(14));nmrt.setText(rs.g etString(15));ocpt.setText(rs.getString(16)); } catch(SQLException sqle) { Page 80
En.Roll-063514872 Appin Technology Lab JOptionPane.showMessageDialog(null,sqle); }}} private class prlistener implements ActionListener { public void actionPerformed(ActionEvent e) { int k=0,t;try { rs= statement.executeQuery("select count(*) from Customer_detail"); rs.next();t=rs.getInt(1);rs = statement.executeQuery("select * from Customer_detail"); while(rs.next()) { k++; if(k==t) break; } cdt.setText(rs.getString(1));cnt.setText(rs.getString(2)); cldt.setText(rs.getString(3));cpdt.setText(rs.getString(4)); dobt.setText(rs.getString(5));aget.setText(rs.getString(6)); sext.setText(rs.getString(7));phnt.setText(rs.getString(8)); pant.setText(rs.getString(9));mrtt.setText(rs.getString(10)); ntnt.setText(rs.getString(11));qlft.setText(rs.getString(12)); nmnt.setText(rs.getString(13));nadt.setText(rs.getString(14)); nmrt.setText(rs.getString(15));ocpt.setText(rs.getString(16)); } catch(SQLException sqle) { JOptionPane.showMessageDialog(null,sqle); }}} private class nxlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { str1=cdt.getText(); rs = statement.executeQuery("select * from Customer_detail"); while(rs.next()) { str2= rs.getString(1);if(str1.compareTo(str2)==0) break; } cdt.setText(rs.getString(1));cnt.setText(rs.getString(2)); cldt.setText(rs.getString(3));cpdt.setText(rs.getString(4)); dobt.setText(rs.getString(5));aget.setText(rs.getString(6)); sext.setText(rs.getString(7));phnt.setText(rs.getString(8)); pant.setText(rs.getString(9)); mrtt.setText(rs.getString(10)); ntnt.setText(rs.getString(11));qlft.setText(rs.getString(12)); nmnt.setText(rs.getString(13));nadt.setText(rs.getString(14)); nmrt.setText(rs.getString(15));ocpt.setText(rs.getString(16)); Page 81
En.Roll-063514872 Appin Technology Lab } catch(SQLException sqle) { JOptionPane.showMessageDialog(null,sqle); }} } private class lslistener implements ActionListener { public void actionPerformed(ActionEvent e) { int c=0,k=0; try { rs = statement.executeQuery("select * from Customer_detail"); while(rs.next()) { c++; } rs = statement.executeQuery("select * from Customer_detail"); while(rs.next()) { if(k==c-1) break; k++; } cdt.setText(rs.getString(1));cnt.setText(rs.getString(2)); cldt.setText(rs.getString(3));cpdt.setText(rs.getString(4)); dobt.setText(rs.getString(5));aget.setText(rs.getString(6)); sext.setText(rs.getString(7));phnt.setText(rs.getString(8)); pant.setText(rs.getString(9));mrtt.setText(rs.getString(10)); ntnt.setText(rs.getString(11));qlft.setText(rs.getString(12)); nmnt.setText(rs.getString(13));nadt.setText(rs.getString(14)); nmrt.setText(rs.getString(15));ocpt.setText(rs.getString(16)); } catch(SQLException sqle) { JOptionPane.showMessageDialog(null,sqle); }}} } Account details code:package pg; import javax.swing.*; import java.awt.*; import java.sql.*; import java.awt.event.*; public class AccountDetail extends JFrame { private JButton svbtn,srbtn,exbtn,adbtn,upbtn,fs,pr,nx,ls; private JLabel aclb,cdlb,opdlb,acnlb,lb,lg; private JTextField actxt,cdtxt,opdtxt,acntxt,txt; private JComboBox jbm,jbx; Page 82
En.Roll-063514872 Appin Technology Lab private String str[]={" ","saving_account","recurring_account","fixed_account","Current_account"}; private String names[]= new String[50]; private JPanel acpl,cdpl,dtpl,acnpl,btnpl,lgpl,prpl; private Container container; private String str1,str2,str3,str4,t; Connection connection; Statement statement; int x,i; ResultSet rs; Icon log,flg,plg,nlg,llg; public AccountDetail() //constructor of AcccountDetail { super("Account Detail"); container =getContentPane(); container.setLayout(new GridLayout(7,1)); svbtn =new JButton("Save"); srbtn =new JButton("Search"); exbtn =new JButton("Exit"); adbtn =new JButton("Clear"); upbtn =new JButton("Update"); svbtn.addActionListener(new svlistener()); srbtn.addActionListener(new srlistener()); exbtn.addActionListener(new exlistener()); adbtn.addActionListener(new adlistener()); upbtn.addActionListener(new uplistener()); aclb =new JLabel("Account id "); Color cl2 =new Color(0,0,153); Font ft =new Font("Bookman Old Style",Font.BOLD,15); lb =new JLabel("Account Detail"); lb.setFont(ft); lb.setForeground(cl2); Icon log =new ImageIcon(getClass().getResource("sbi_logo.gif")); lg =new JLabel(log); flg =new ImageIcon(getClass().getResource("prev.gif")); plg =new ImageIcon(getClass().getResource("prev1.gif")); nlg =new ImageIcon(getClass().getResource("Next.gif")); llg =new ImageIcon(getClass().getResource("Next1.gif")); fs =new JButton(flg); pr =new JButton(plg); nx =new JButton(nlg); ls =new JButton(llg); fs.addActionListener(new fslistener()); pr.addActionListener(new prlistener()); nx.addActionListener(new nxlistener()); ls.addActionListener(new lslistener()); cdlb =new JLabel("Customer id "); opdlb =new JLabel("Open date "); acnlb =new JLabel("Account name "); actxt =new JTextField(10); Page 83
En.Roll-063514872 Appin Technology Lab cdtxt =new JTextField(10); opdtxt =new JTextField(10); acntxt =new JTextField(10); txt =new JTextField(5); try //here customer_id extracted from customer_detail; { i=1; names[0]=" "; connect();rs=statement.executeQuery("select * from customer_detail"); while(rs.next()) { names[i]=rs.getString(1); i++; } jbm= new JComboBox(names); } catch(SQLException e) { JOptionPane.showMessageDialog(null,e); } jbm.addItemListener(new jbmlistener()); Color cl =new Color(247,223,213); acpl =new JPanel(); acpl.setBackground(cl); cdpl =new JPanel();cdpl.setBackground(cl);dtpl =new JPanel(); dtpl.setBackground(cl); acnpl =new JPanel();acnpl.setBackground(cl); btnpl =new JPanel();btnpl.setBackground(cl); gpl =new JPanel();lgpl.setBackground(cl); prpl =new JPanel(); prpl.setBackground(cl); jbx =new JComboBox(str); lgpl.add(lb);lgpl.add(lg);prpl.add(fs);prpl.add(pr); prpl.add(txt);prpl.add(nx);prpl.add(ls);acpl.add(aclb);acpl.add(actxt); cdpl.add(cdlb);cdpl.add(cdtxt);cdpl.add(jbm);dtpl.add(opdlb);dtpl.add(opdtxt); acnpl.add(acnlb);acnpl.add(jbx);btnpl.add(svbtn);btnpl.add(adbtn); btnpl.add(srbtn);btnpl.add(upbtn);btnpl.add(exbtn);container.add(lgpl); container.add(acpl);container.add(cdpl);container.add(dtpl);container.add(acn pl);container.add(btnpl);container.add(prpl);setVisible(true);setSize(500,500); } //end constructor public void connect() //for connection Oracle { try { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); connection=DriverManager.getConnection("jdbc:odbc:mydn1","system","orac le"); statement=connection.createStatement(); Page 84
En.Roll-063514872 Appin Technology Lab } catch(SQLException e) { JOptionPane.showMessageDialog(null,"Exception"+e); }} catch(Exception ex) { JOptionPane.showMessageDialog(null,"Not Connected"+ex); }} private class adlistener implements ActionListener { public void actionPerformed(ActionEvent e) { jbm.setSelectedItem(" "); actxt.setText(" ");cdtxt.setText(" ");opdtxt.setText(" ");jbx.setSelectedItem(" "); } } private class svlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { str1 =actxt.getText(); str2 =cdtxt.getText(); str3 =opdtxt.getText(); i=jbx.getSelectedIndex(); str4 =str[i]; t=str4.substring(0,5); System.out.println(t); statement.executeUpdate("insert into account_detail values('"+str1+"','"+str2+"',to_date('"+str3+"'),'"+str4+"')"); statement.executeUpdate("commit"); JOptionPane.showMessageDialog(null,"Inserted"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,ex); }
}} private class uplistener implements ActionListener { public void actionPerformed(ActionEvent e) { str1 =actxt.getText(); str2 =cdtxt.getText(); Page 85
En.Roll-063514872 Appin Technology Lab str3 =opdtxt.getText(); str4 =acntxt.getText(); try { statement.executeUpdate("update account_detail set account_id ='"+str1+"',customer_id='"+str2+"',open_date= to_date('"+str3+"'),account_name='"+str4+"' "); statement.executeUpdate("commit"); JOptionPane.showMessageDialog(null,"Updated"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,ex); }}} private class dllistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { str1 =actxt.getText(); statement.executeUpdate("delete from account_detail where account_id='"+str1+"' ");statement.executeUpdate("Commit"); JOptionPane.showMessageDialog(null,"deleted"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,ex); }}} private class srlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { t=JOptionPane.showInputDialog("Enter account_id for searching"); rs=statement.executeQuery("select account_id,customer_id,to_char(open_date,'DD/MM/YY'),account_name from account_detail where account_id='"+t+"' "); rs.next();actxt.setText(rs.getString(1));cdtxt.setText(rs.getString(2)); jbm.setSelectedItem(rs.getString(2));opdtxt.setText(rs.getString(3)); acntxt.setText(rs.getString(4));JOptionPane.showMessageDialog(null,"Found" );} catch(SQLException ex) { JOptionPane.showMessageDialog(null,"Not found"); }}} private class exlistener implements ActionListener { Page 86
En.Roll-063514872 Appin Technology Lab public void actionPerformed(ActionEvent e) { dispose(); }} private class jbmlistener implements ItemListener { public void itemStateChanged(ItemEvent e) { x=jbm.getSelectedIndex(); str1=names[x]; cdtxt.setText(str1); }} // classes for previous next.. button private class fslistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { rs = statement.executeQuery("Select *from Account_detail");rs.next(); actxt.setText(rs.getString(1));cdtxt.setText(rs.getString(2));jbm.setSelectedIte m(rs.getString(2));opdtxt.setText(rs.getString(3)); acntxt.setText(rs.getString(4)); } catch(SQLException sqle) { JOptionPane.showMessageDialog(null,sqle); } }} private class prlistener implements ActionListener { public void actionPerformed(ActionEvent e) { int k=0,t; try { rs= statement.executeQuery("select count(*) from Account_detail"); rs.next(); t=rs.getInt(1); rs = statement.executeQuery("select * from Account_detail"); while(rs.next()) { k++; if(k==t) break; } actxt.setText(rs.getString(1)); cdtxt.setText(rs.getString(2)); jbm.setSelectedItem(rs.getString(2)); opdtxt.setText(rs.getString(3)); acntxt.setText(rs.getString(4)); Page 87
En.Roll-063514872 Appin Technology Lab } catch(SQLException sqle) { JOptionPane.showMessageDialog(null,sqle); }}} private class nxlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { str1=actxt.getText(); rs = statement.executeQuery("select * from Account_detail"); while(rs.next()) { str2= rs.getString(1); if(str1.compareTo(str2)==0) break;} actxt.setText(rs.getString(1)); cdtxt.setText(rs.getString(2)); jbm.setSelectedItem(rs.getString(2)); opdtxt.setText(rs.getString(3)); acntxt.setText(rs.getString(4)); } catch(SQLException sqle) { JOptionPane.showMessageDialog(null,sqle); }}} private class lslistener implements ActionListener { public void actionPerformed(ActionEvent e) { int c=0,k=0; try { rs = statement.executeQuery("select * from Account_detail"); while(rs.next()) { c++; } rs = statement.executeQuery("select * from Account_detail"); while(rs.next()) { if(k==c-1) break; k++; } actxt.setText(rs.getString(1));cdtxt.setText(rs.getString(2));jbm.setSelectedIte m(rs.getString(2));opdtxt.setText(rs.getString(3));acntxt.setText(rs.getString(4 )); Page 88
En.Roll-063514872 Appin Technology Lab } catch(SQLException sqle) { JOptionPane.showMessageDialog(null,sqle); }}} } //end class AccountDetail; Current Account Code package pg; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.sql.*; public class CurrentAccount extends JFrame { private JButton srtn,uptn,dltn,svtn,adtn,extn,fs,pr,nx,ls; private JLabel acl,dtl,bl,lb,lg; private JTextField dtxt,btxt,txt; private JComboBox jbx;private String str[]=new String[50]; Connection connection;Statement statement;ResultSet rs; private String str1,str2,str3;int i; private String t; Icon log,flg,plg,nlg,llg; public CurrentAccount() //constructor{ setLayout(null);srtn =new JButton("Search");uptn =new JButton("Update");dltn =new JButton("Delete");svtn =new JButton("Insert/Save");adtn =new JButton("Add");extn =new JButton("Exit");Color cl2 =new Color(0,0,153); Font ft =new Font("Bookman Old Style",Font.BOLD,30); lb =new JLabel("Current Account Detail"); lb.setFont(ft);lb.setForeground(cl2);Icon log =new ImageIcon(getClass().getResource("sbi_logo.gif"));lg =new JLabel(log); flg =new ImageIcon(getClass().getResource("prev.gif")); plg =new ImageIcon(getClass().getResource("prev1.gif")); nlg =new ImageIcon(getClass().getResource("Next.gif")); llg =new ImageIcon(getClass().getResource("Next1.gif"));fs =new JButton(flg);pr =new JButton(plg);nx =new JButton(nlg);ls =new JButton(llg);fs.addActionListener(new fslistener());pr.addActionListener(new prlistener());nx.addActionListener(new nxlistener());ls.addActionListener(new lslistener()); srtn.addActionListener(new srlistener());uptn.addActionListener(new uplistener()); dltn.addActionListener(new dllistener()); svtn.addActionListener(new svlistener());adtn.addActionListener(new adlistener());extn.addActionListener(new exlistener()); acl =new JLabel("Account id");dtl =new JLabel("Date"); bl =new JLabel("Balance amount");dtxt =new JTextField(); btxt =new JTextField();txt =new JTextField(); try { i=1; str[0]=" "; connect(); rs=statement.executeQuery("select * from account_detail"); Page 89
En.Roll-063514872 Appin Technology Lab while(rs.next()) { str[i]=rs.getString(1); i++; } jbx= new JComboBox(str); } catch(SQLException e) { JOptionPane.showMessageDialog(null,e); } add(lb);add(lg);add(txt);add(fs); add(pr); add(nx); add(ls);add(acl);add(dtl);add(bl);add(srtn);add(uptn);add(dltn); add(svtn);add(adtn);add(extn);add(dtxt);add(btxt);add(jbx); lb.setBounds(20,100,360,35);lg.setBounds(400,100,350,50); acl.setBounds(150,250,100,30);jbx.setBounds(280,250,150,30); dtl.setBounds(150,285,100,30);dtxt.setBounds(280,285,150,30); bl.setBounds(150,320,100,30);btxt.setBounds(280,320,150,30); fs.setBounds(290,360,22,25);pr.setBounds(322,360,22,25); txt.setBounds(354,360,44,25);nx.setBounds(404,360,22,25); ls.setBounds(436,360,22,25);adtn.setBounds(50,400,80,25);srtn.setBounds(16 0,400,80,25);svtn.setBounds(270,400,80,25);uptn.setBounds(380,400,80,25); dltn.setBounds(490,400,80,25);extn.setBounds(600,400,80,25); Color clr =new Color(247,223,213);getContentPane().setBackground(clr); setVisible(true); setSize(800,600); } public void connect() { try { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); connection=DriverManager.getConnection("jdbc:odbc:mydn1","system","orac le"); statement=connection.createStatement(); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,"Error"+ex); }} catch(Exception e) { JOptionPane.showMessageDialog(null,"Not connected"+e); }} private class adlistener implements ActionListener { Page 90
En.Roll-063514872 Appin Technology Lab public void actionPerformed(ActionEvent e) {dtxt.setText(" "); btxt.setText(" "); }} private class svlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { i=jbx.getSelectedIndex(); str1=str[i]; str2=dtxt.getText(); str3=btxt.getText(); statement.executeUpdate(" insert into current_Account values ( '"+str1+"', '"+str2+"', '"+str3+"' ) "); statement.executeUpdate("commit"); JOptionPane.showMessageDialog(null,"Inserted"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,"not inserted"+ex); }}} private class uplistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { i=jbx.getSelectedIndex(); str1=str[i]; str2=dtxt.getText();str3=btxt.getText(); statement.executeUpdate("update current_Account set account_id='"+str1+"',tdate='"+str2+"',balance_amount=to_number('"+str3+"') ");statement.executeUpdate("commit");JOptionPane.showMessageDialog(null ,"Updated"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,"not update"+ex); }}} private class srlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { t=JOptionPane.showInputDialog(null,"Enter accountid for searching"); statement.executeQuery("select * from current_account where account_id='"+t+"' ");rs.next();jbx.setSelectedItem(rs.getString(1)); Page 91
En.Roll-063514872 Appin Technology Lab dtxt.setText(rs.getString(2));btxt.setText(rs.getString(3)); JOptionPane.showMessageDialog(null,"Found"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,"not found"); }}} private class exlistener implements ActionListener { public void actionPerformed(ActionEvent e) { dispose(); }} private class dllistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { t=JOptionPane.showInputDialog(null,"Enter accountid to be deleted"); statement.executeUpdate("delete from current_account where account_id='"+t+"' "); tatement.executeUpdate("commit"); JOptionPane.showMessageDialog(null,"inserted"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,"Not inserted"); }}} private class fslistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { rs = statement.executeQuery("Select *from current_Account"); rs.next(); txt.setText("1"); jbx.setSelectedItem(rs.getString(1)); dtxt.setText(rs.getString(2)); btxt.setText(rs.getString(3)); } catch(SQLException sqle) { JOptionPane.showMessageDialog(null,sqle); } }} private class prlistener implements ActionListener { public void actionPerformed(ActionEvent e) Page 92
En.Roll-063514872 Appin Technology Lab { int k=0,t; try { int i=jbx.getSelectedIndex(); str1=str[i]; rs= statement.executeQuery("select count(*) from current_account"); rs.next(); t=rs.getInt(1); txt.setText(String.valueOf(t)); rs = statement.executeQuery("select * from current_account"); while(rs.next()) { k++; if(k==t-1) break; } jbx.setSelectedItem(rs.getString(1)); dtxt.setText(rs.getString(2)); btxt.setText(rs.getString(3)); } catch(SQLException sqle) { JOptionPane.showMessageDialog(null,sqle); }}} private class nxlistener implements ActionListener { public void actionPerformed(ActionEvent e) { int c=0; try { int i=jbx.getSelectedIndex(); str1=str[i]; JOptionPane.showMessageDialog(null,"str1="+str1);rs = statement.executeQuery("select * from current_account"); while(rs.next()) { str2=rs.getString(1); JOptionPane.showMessageDialog(null,"str2="+str2); if(str1.compareTo(str2)==0) break; } rs = statement.executeQuery("select * from current_account"); while(rs.next()) { c++; } txt.setText(String.valueOf(c)); jbx.setSelectedItem(rs.getString(1)); dtxt.setText(rs.getString(2)); Page 93
En.Roll-063514872 Appin Technology Lab btxt.setText(rs.getString(3));} catch(SQLException sqle) { JOptionPane.showMessageDialog(null,sqle); }}} private class lslistener implements ActionListener { public void actionPerformed(ActionEvent e) { int c=0,k=0; try { rs = statement.executeQuery("select * from current_account"); while(rs.next()) { c++; } txt.setText(String.valueOf(c)); rs = statement.executeQuery("select * from current_account"); while(rs.next()) { if(k==c-1) break; k++; } jbx.setSelectedItem(rs.getString(1)); dtxt.setText(rs.getString(2)); btxt.setText(rs.getString(3)); } catch(SQLException sqle) { JOptionPane.showMessageDialog(null,sqle); }}}} Saving Account code package pg; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.sql.*; public class SavingAccount extends JFrame { private JButton srtn,uptn,dltn,svtn,adtn,extn,fs,pr,nx,ls; private JLabel acl,dtl,bl,lb,lg; private JTextField dtxt,btxt,txt; private JComboBox jbx; private String str[]=new String[50]; Connection connection; Statement statement; ResultSet rs; private String str1,str2,str3; Page 94
En.Roll-063514872 Appin Technology Lab int i; private String t; Icon log,flg,plg,nlg,llg; public SavingAccount() { setLayout(null); srtn =new JButton("Search");uptn =new JButton("Update");dltn =new JButton("Delete");svtn =new JButton("Insert/Save");adtn =new JButton("Add");extn =new JButton("Exit");Color cl2 =new Color(0,0,153); Font ft =new Font("Bookman Old Style",Font.BOLD,30);lb =new JLabel("Saving Account Detail");lb.setFont(ft);lb.setForeground(cl2); Icon log =new ImageIcon(getClass().getResource("sbi_logo.gif")); lg =new JLabel(log);flg =new ImageIcon(getClass().getResource("prev.gif")); plg =new ImageIcon(getClass().getResource("prev1.gif")); nlg =new ImageIcon(getClass().getResource("Next.gif")); llg =new ImageIcon(getClass().getResource("Next1.gif")); fs =new JButton(flg);pr =new JButton(plg);nx =new JButton(nlg); ls =new JButton(llg); fs.addActionListener(new fslistener());pr.addActionListener(new prlistener());nx.addActionListener(new nxlistener());ls.addActionListener(new lslistener()); srtn.addActionListener(new srlistener());uptn.addActionListener(new uplistener());dltn.addActionListener(new dllistener());svtn.addActionListener(new svlistener());adtn.addActionListener(new adlistener()); extn.addActionListener(new exlistener());acl =new JLabel("Account id"); dtl =new JLabel("Date");bl =new JLabel("Balance amount"); dtxt =new JTextField();btxt =new JTextField();txt =new JTextField(); try { i=1;str[0]=" "; connect(); rs=statement.executeQuery("select * from account_detail"); while(rs.next()) { str[i]=rs.getString(1); i++; } jbx= new JComboBox(str); } catch(SQLException e) { JOptionPane.showMessageDialog(null,e); } add(lb);add(lg);add(txt);add(fs); add(pr);add(nx);add(ls);add(acl);add(dtl); add(bl);add(srtn);add(uptn);add(dltn);add(svtn);add(adtn);add(extn);add(dtxt) add(btxt);add(jbx);lb.setBounds(20,100,360,35);lg.setBounds(400,100,350,50 acl.setBounds(150,250,100,30);jbx.setBounds(280,250,150,30);dtl.setBounds( 150,285,100,30);dtxt.setBounds(280,285,150,30);bl.setBounds(150,320,100,3 0);btxt.setBounds(280,320,150,30);fs.setBounds(290,360,22,25);pr.setBounds (322,360,22,25); txt.setBounds(354,360,44,25);nx.setBounds(404,360,22,25); Page 95
En.Roll-063514872 Appin Technology Lab ls.setBounds(436,360,22,25);adtn.setBounds(50,400,80,25);srtn.setBounds(16 0,400,80,25);svtn.setBounds(270,400,80,25);uptn.setBounds(380,400,80,25); dltn.setBounds(490,400,80,25);extn.setBounds(600,400,80,25); Color clr =new Color(247,223,213);getContentPane().setBackground(clr); setVisible(true);setSize(500,600); } public void connect() { try { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); connection=DriverManager.getConnection("jdbc:odbc:mydn1","system","orac le");statement=connection.createStatement(); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,"Error"+ex); }} catch(Exception e) { JOptionPane.showMessageDialog(null,"Not connected"+e); }} private class adlistener implements ActionListener { public void actionPerformed(ActionEvent e) { dtxt.setText(" ");btxt.setText(" "); }} private class svlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { i=jbx.getSelectedIndex(); str1=str[i]; str2=dtxt.getText(); str3=btxt.getText(); statement.executeUpdate(" insert into Saving_Account values ( '"+str1+"', '"+str2+"', '"+str3+"' ) "); statement.executeUpdate("commit"); JOptionPane.showMessageDialog(null,"Inserted"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,"not inserted"+ex); }}} Page 96
En.Roll-063514872 Appin Technology Lab private class uplistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { i=jbx.getSelectedIndex(); str1=str[i]; str2=dtxt.getText();str3=btxt.getText(); statement.executeUpdate("update Saving_Account set account_id='"+str1+"',tdate='"+str2+"',balance_amount=to_number('"+str3+"') ");statement.executeUpdate("commit");JOptionPane.showMessageDialog(null ,"Updated");} catch(SQLException ex) { JOptionPane.showMessageDialog(null,"not update"+ex); }}} private class srlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { t=JOptionPane.showInputDialog(null,"Enter accountid for searching"); statement.executeQuery("select * from Saving_account where account_id='"+t+"' "); rs.next(); jbx.setSelectedItem(rs.getString(1));dtxt.setText(rs.getString(2)); btxt.setText(rs.getString(3));JOptionPane.showMessageDialog(null,"Found"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,"not found"); } }} private class exlistener implements ActionListener { public void actionPerformed(ActionEvent e) { dispose(); } } private class dllistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { t=JOptionPane.showInputDialog(null,"Enter accountid to be deleted"); statement.executeUpdate("delete from Saving_account where account_id='"+t+"' "); statement.executeUpdate("commit"); Page 97
En.Roll-063514872 Appin Technology Lab JOptionPane.showMessageDialog(null,"inserted"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,"Not inserted"); }}}private class fslistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { rs = statement.executeQuery("Select *from Saving_Account"); rs.next(); jbx.setSelectedItem(rs.getString(1)); dtxt.setText(rs.getString(2)); btxt.setText(rs.getString(3)); } catch(SQLException sqle) { JOptionPane.showMessageDialog(null,sqle); } }} private class prlistener implements ActionListener { public void actionPerformed(ActionEvent e) { int k=0,t; try { rs= statement.executeQuery("select count(*) from saving_account"); rs.next(); t=rs.getInt(1); rs = statement.executeQuery("select * from Saving_account"); while(rs.next()) { k++; if(k==t) break;} jbx.setSelectedItem(rs.getString(1)); dtxt.setText(rs.getString(2));btxt.setText(rs.getString(3)); }catch(SQLException sqle) { JOptionPane.showMessageDialog(null,sqle); }}} private class nxlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { str1=btxt.getText(); rs = statement.executeQuery("select * from saving_account"); Page 98
En.Roll-063514872 Appin Technology Lab while(rs.next()) { str2= rs.getString(1); if(str1.compareTo(str2)==0) break; } jbx.setSelectedItem(rs.getString(1));dtxt.setText(rs.getString(2)); btxt.setText(rs.getString(3));} catch(SQLException sqle) { JOptionPane.showMessageDialog(null,sqle); }}} private class lslistener implements ActionListener { public void actionPerformed(ActionEvent e) { int c=0,k=0; try { rs = statement.executeQuery("select * from saving_account"); while(rs.next()) { c++;} rs = statement.executeQuery("select * from saving_account"); while(rs.next()) { if(k==c-1) break; k++; } jbx.setSelectedItem(rs.getString(1)); dtxt.setText(rs.getString(2)); btxt.setText(rs.getString(3)); } catch(SQLException sqle) {JOptionPane.showMessageDialog(null,sqle); }}} } Balance Sheet Code package pg; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.sql.*; public class BalanceSheet extends JFrame { private JLabel dl,sl,rl,cl,fl,tl,cnl,lnl,hdl,dtl,rmk,lb,lg; private JTextField dlt,slt,rlt,clt,flt,tlt,cnlt,lnlt,hdlt,dtlt,rmkt; private JButton ad,up,sv,dl1,sr,ex; Connection connection; Statement statement;ResultSet rs;Icon log; Page 99
En.Roll-063514872 Appin Technology Lab private String str1,str2,str3,str4,str5,str6,str7,str8; private String str9,str10,str11,str12,t;public BalanceSheet() {super("Daily Banking System(SBI)");setLayout(null);Color cl2 =new Color(0,0,153);Font ft =new Font("Bookman Old Style",Font.BOLD,30); lb =new JLabel("Balance sheet");lb.setFont(ft);lb.setForeground(cl2);Icon log =new ImageIcon(getClass().getResource("sbi_logo.gif"));lg =new JLabel(log);dl=new JLabel("Date");sl=new JLabel("Saving A/C"); rl=new JLabel("Recurring A/C");cl=new JLabel("Current A/C"); fl=new JLabel("Fixed A/C");tl=new JLabel("Grand Total");cnl=new JLabel("Cash in hand");lnl=new JLabel("As Loans");hdl=new JLabel("Head office A/C");dtl=new JLabel("Grand Total");rmk=new JLabel("Remarks"); ad =new JButton("Clear");up =new JButton("Update");dl1=new JButton("Delete");sr =new JButton("Search");sv =new JButton("Save/Insert");ex =new JButton("Exit");dlt =new JTextField();slt =new JTextField();rlt =new JTextField();clt =new JTextField();flt =new JTextField();tlt =new JTextField();cnlt =new JTextField();lnlt =new JTextField();hdlt =new JTextField();dtlt =new JTextField(); rmkt =new JTextField();lb.setBounds(20,50,360,35);lg.setBounds(400,50,350,50);dl.setB ounds(50,200,75,25); dlt.setBounds(135,200,100,25); sl.setBounds(50,235,75,25); cnl.setBounds(285,235,75,25); slt.setBounds(135,235,100,25); cnlt.setBounds(380,235,100,25); rl.setBounds(50,270,75,25); lnl.setBounds(285,270,75,25); rlt.setBounds(135,270,100,25); lnlt.setBounds(380,270,100,25); cl.setBounds(50,305,75,25); hdl.setBounds(285,305,75,25); clt.setBounds(135,305,100,25); hdlt.setBounds(380,305,100,25); fl.setBounds(50,340,75,25); dtl.setBounds(285,340,75,25); flt.setBounds(135,340,100,25); dtlt.setBounds(380,340,100,25); tl.setBounds(50,375,75,25); tlt.setBounds(135,375,100,25); rmk.setBounds(50,410,75,25); rmkt.setBounds(135,410,100,25); ad.setBounds(25,435,100,25); sv.setBounds(150,435,100,25); sr.setBounds(275,435,100,25); up.setBounds(400,435,100,25); dl1.setBounds(525,435,100,25); ex.setBounds(650,435,100,25); ad.addActionListener(new adlistener()); sv.addActionListener(new svlistener()); sr.addActionListener(new srlistener());dl1.addActionListener(nedllistener()); // up.addActionListener(new uplistener()); add(dl);add(sl);add(rl);add(cl);add(fl);add(tl);add(cnl);add(lnl);add(hdl);add(dt l);add(rmk);add(dlt);add(slt);add(rlt);add(clt);add(flt);add(tlt); add(cnlt);add(lnlt);add(hdlt);add(dtlt);add(rmkt);add(ad);add(sv);add(sr);add(d l1);add(up); add(lb); add(lg);setSize(800,600); setVisible(true); setResizable(false);Color clr =new Color(247,223,213); getContentPane().setBackground(clr);connect();} public void connect() { try { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Page 100
connection=DriverManager.getConnection("jdbc:odbc:mydn1","system","orac le"); statement=connection.createStatement(); } catch(SQLException e) { JOptionPane.showMessageDialog(null,"Exception"+e); }} catch(Exception ex) { JOptionPane.showMessageDialog(null,"Not Connected"+ex); }} private class adlistener implements ActionListener { public void actionPerformed(ActionEvent e) { dlt.setText(" ");slt.setText(" ");rlt.setText(" "); clt.setText(" ");flt.setText(" ");tlt.setText(" "); cnlt.setText(" ");lnlt.setText(" ");hdlt.setText(" "); dtlt.setText(" ");rmkt.setText(" ");}} private class svlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { str1 =dlt.getText();str2 =slt.getText();str3 =rlt.getText(); str4 =clt.getText();str5 =flt.getText(); str6 =tlt.getText(); str7 =cnlt.getText();str8 =lnlt.getText();str9 =hdlt.getText(); str10 =dtlt.getText();str11 =rmkt.getText(); statement.executeUpdate("insert into balance_sheet values(to_date('"+str1+"'),'"+str2+"','"+str3+"','"+str5+"','"+str6+"','"+str7+"','" +str8+"','"+str9+"','"+str10+"','"+str11+"')");statement.executeUpdate("commit "); JOptionPane.showMessageDialog(null,"Inserted"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,ex); }}} /*private class uplistener implements ActionListener { public void actionPerformed(ActionEvent e) { str1 =dlt.getText();str2 =slt.getText();str3 =rlt.getText(); str4 =clt.getText();str5 =flt.getText(); str6 =tlt.getText(); str7 =cnlt.getText();str8 =lnlt.getText();str9 =hdlt.getText(); Page 101
En.Roll-063514872 Appin Technology Lab str10 =dtlt.getText();str11 =rmkt.getText(); try { statement.executeUpdate("update balance_sheet set bdate =to_date( '"+str1+"'), saving ='"+str2+"',recurring = '"+str3+"',current1 = '"+str4+"',fixed='"+str5+"',total='"+str6+"',cash_in_hand='"+str7+"',as_loans=' "+str8+"',hoffice='"+str9+"',grand_total='"+str10+"',remarks='"+str11+"')); statement.executeUpdate("commit"); JOptionPane.showMessageDialog(null,"Updated"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,ex); } } }*/ private class dllistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { str1 =JOptionPane.showInputDialog(null,"Enter date for deleting"); statement.executeUpdate("delete from balance_sheet where bdate='"+str1+"' "); statement.executeUpdate("Commit"); JOptionPane.showMessageDialog(null,"deleted"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,ex); }}} private class srlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { t=JOptionPane.showInputDialog("Enter account_id for searching"); ResultSet rs; rs=statement.executeQuery("select *from general_ledger where account_id='"+t+"' "); rs.next();dlt.setText(rs.getString(1));slt.setText(rs.getString(2)); rlt.setText(rs.getString(3));clt.setText(rs.getString(4)); flt.setText(rs.getString(5));tlt.setText(rs.getString(6)); cnlt.setText(rs.getString(7));lnlt.setText(rs.getString(8)); hdlt.setText(rs.getString(9));dtlt.setText(rs.getString(10)); rmkt.setText(rs.getString(11)); Page 102
JOptionPane.showMessageDialog(null,"Found"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,"Not found"); }}} private class exlistener implements ActionListener { public void actionPerformed(ActionEvent e) { dispose(); }}} CashBook package pg; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.sql.*; public class CashBook extends JFrame { private JLabel dl,csl,ccl,crl,cfl,chl,cll,ldl,ctl,dsl,dcl,drl,dfl,dhl,dll,ckl,dbl,rmk,cr,dr,lb; private JTextField dt,cst,cct,cft,crt,cht,clt,ldt,ctt,dst,dct,dft,drt,dht,fht,dlt,ckt,dbt,rmt; private JButton sv,cl,up,sr,dl1,ex;private String str1,t,str2,str3,str4,str5,str6,str7,str8,str9,str10,str11,str12,str13,str14,str15,str1 6,str17,str18,str19,str20; Connection connection;Statement statement; ResultSet rs;Icon log; private JLabel nm,lg; public CashBook() { super("Daily Banking System(sBI)"); setLayout(null); Color cl2 =new Color(0,0,153); Font ft =new Font("Bookman Old Style",Font.BOLD,30); lb =new JLabel("Cash Book"); lb.setFont(ft); lb.setForeground(cl2); Icon log =new ImageIcon(getClass().getResource("sbi_logo.gif")); lg =new JLabel(log); sv =new JButton("Save/Insert"); cl =new JButton("Clear"); up =new JButton("Update"); dl1=new JButton("Delete"); ex =new JButton("Exit"); sr =new JButton("Search"); sv.addActionListener(new svlistener());cl.addActionListener(new adlistener());dl1.addActionListener(new dllistener()); Page 103
En.Roll-063514872 Appin Technology Lab sr.addActionListener(new srlistener());ex.addActionListener(new exlistener());nm =new JLabel("Cash Book");dl =new JLabel("Date"); cr =new JLabel("Credit");dr =new JLabel("Debit");csl =new JLabel("Saving A/C ");ccl =new JLabel("Current A/C ");crl =new JLabel("Reccuring A/C "); cfl =new JLabel("Fixed A/C ");chl =new JLabel("Head office a/c"); cll =new JLabel("Loan A/C ");ldl =new JLabel("Last day balance "); ctl =new JLabel("Grand Total ");dsl =new JLabel("Saving A/C "); dcl =new JLabel("Current A/C ");drl =new JLabel("Recurring A/C "); dfl =new JLabel("Fixed A/C ");dhl =new JLabel("Head Office A/C "); dll =new JLabel("Loans Account ");ckl =new JLabel("Cash in hand "); dbl =new JLabel("Grand Total ");rmk =new JLabel("Remarks "); cct =new JTextField(10);crt =new JTextField(10); cft =new JTextField(10);cst =new JTextField(10); dst =new JTextField(10); cht =new JTextField();clt =new JTextField(10); ldt =new JTextField(10);ctt =new JTextField(10);dct =new JTextField(10); drt =new JTextField(10);dft =new JTextField(10);dht =new JTextField(10); dlt =new JTextField(10);ckt =new JTextField(10);dbt =new JTextField(10); rmt =new JTextField(10);dt =new JTextField(10);add(dl);add(ccl); add(cct); add(crl); add(crt);add(cfl); add(cft);add(cll);add(clt);add(dt); add(ldl); add(ldt); add(ctl); add(ctt);add(dsl);add(dst); add(dcl); add(drl); add(drl);add(dfl);add(dft); add(csl); add(cst); add(dhl); add(dht);add(dll);add(dlt);add(ckl);add(ckt);add(dbl);add(dbt);add(rmk); add(rmt);add(cr);add(dr); add(dct); add(drt); add(chl); add(cht); add(cl); add(sr); add(up); add(dl1);add(sv); add(ex); add(lg); add(lb); lb.setBounds(20,50,360,35);lg.setBounds(400,50,350,50); dr.setBounds(50,150,75,25);cr.setBounds(325,150,75,25); csl.setBounds(25,200,100,25);dsl.setBounds(300,200,100,25); cst.setBounds(150,200,100,25); dst.setBounds(425,200,100,25); ccl.setBounds(25,235,100,25); dcl.setBounds(300,235,100,25); cct.setBounds(150,235,100,25); dct.setBounds(425,235,100,25); crl.setBounds(25,270,100,25); drl.setBounds(300,270,100,25); crt.setBounds(150,270,100,25);drt.setBounds(425,270,100,25); cfl.setBounds(25,305,100,25); dfl.setBounds(300,305,100,25); cft.setBounds(150,305,100,25); chl.setBounds(25,340,100,25); cht.setBounds(150,340,100,25); dft.setBounds(425,305,100,25); cll.setBounds(25,370,100,25); dhl.setBounds(300,340,100,25); clt.setBounds(150,370,100,25); dht.setBounds(425,340,100,25); ldl.setBounds(25,410,100,25); dll.setBounds(300,375,100,25); ldt.setBounds(150,410,100,25); dlt.setBounds(425,375,100,25); ctl.setBounds(25,445,100,25); ckl.setBounds(300,410,100,25); ctt.setBounds(150,445,100,25); ckt.setBounds(425,410,100,25); dbl.setBounds(300,445,100,25);dbt.setBounds(425,445,100,25); dl.setBounds(25,480,100,25); rmk.setBounds(300,480,100,25); dt.setBounds(150,480,100,25); rmt.setBounds(425,480,100,25); cl.setBounds(25,520,100,25);sv.setBounds(150,520,100,25); up.setBounds(275,520,100,25);sr.setBounds(400,520,100,25); dl1.setBounds(525,520,100,25); ex.setBounds(650,520,100,25); setResizable(false);Color clr =new Color(247,223,213); getContentPane().setBackground(clr);setSize(800,600); setVisible(true);connect(); Page 104
En.Roll-063514872 Appin Technology Lab } public void connect() { try { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); connection=DriverManager.getConnection("jdbc:odbc:mydn1","system","orac le"); statement=connection.createStatement(); } catch(SQLException e) { JOptionPane.showMessageDialog(null,"Exception"+e); }} catch(Exception ex) { JOptionPane.showMessageDialog(null,"Not Connected"+ex); }} private class adlistener implements ActionListener { public void actionPerformed(ActionEvent e) { dt.setText(" ");cst.setText(" "); cct.setText(" ");cft.setText(" ");crt.setText(" "); cht.setText(" ");clt.setText(" ");ldt.setText(" ");ctt.setText(" "); dst.setText(" ");dct.setText(" ");dft.setText(" ");drt.setText(" ");dht.setText(" ");fht.setText(" ");dlt.setText(" ");ckt.setText(" ");dbt.setText(" ");rmt.setText(" ");}} private class svlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { str18=dt.getText();str1 =cst.getText();str2 =cct.getText();str3 =crt.getText(); str4 =cft.getText();str5 =cht.getText(); str6 =clt.getText();str7 =ldt.getText(); str8 =ctt.getText();str9 =dst.getText();str10 =dct.getText();str11 =drt.getText();str12 =dft.getText();str13 =dht.getText();str14 =dlt.getText(); str15 =ckt.getText();str16 =dbt.getText();str17 =rmt.getText(); statement.executeUpdate("insert into cash_book values(to_date('"+str18+"'),'"+str2+"','"+str3+"','"+str5+"','"+str6+"','"+str7+"',' "+str8+"','"+str9+"','"+str10+"','"+str11+"','"+str12+"','"+str13+"','"+str14+"','" +str15+"','"+str16+"','"+str17+"')");statement.executeUpdate("commit"); JOptionPane.showMessageDialog(null,"Inserted"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,ex); } }} private class uplistener implements ActionListener Page 105
En.Roll-063514872 Appin Technology Lab { public void actionPerformed(ActionEvent e) { str18=dt.getText();str1 =cst.getText();str2 =cct.getText();str3 =crt.getText(); str4 =cft.getText();str5 =cht.getText(); str6 =clt.getText();str7 =ldt.getText(); str8 =ctt.getText();str9 =dst.getText();str10 =dct.getText();str11 =drt.getText();str12 =dft.getText();str13 =dht.getText();str14 =dlt.getText(); str15 =ckt.getText();str16 =dbt.getText();str17 =rmt.getText(); try { statement.executeUpdate("update cash_book set cdate =to_date( '"+str18+"'), csaving ='"+str1+"',ccurrent = '"+str2+"',crecurring= '"+str3+"',cfixed='"+str4+"',choffice='"+str5+"',cloans='"+str6+"',lday_blance ='"+str7+"',crtotal='"+str8+"',dsaving='"+str9+"',dcurrent='"+str10+"',drecurri ng='"+str11+"',dfixed='"+str12+"',dhoffice='"+str13+"',dloans='"+str14+"',cas h_in_hand='"+str15+"',dtotal='"+str16+"',remark='"+str17+"' where cdate='"+str18+"' ");statement.executeUpdate("commit"); JOptionPane.showMessageDialog(null,"Updated"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,ex); }}} private class dllistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { str1 =JOptionPane.showInputDialog(null,"Enter date for deleting"); statement.executeUpdate("delete from cash_book where cdate='"+str1+"' "); statement.executeUpdate("Commit"); JOptionPane.showMessageDialog(null,"deleted"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,ex); }}} private class srlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { t=JOptionPane.showInputDialog("Enter date for searching"); rs=statement.executeQuery("select *from cash_book where cdate='"+t+"' "); rs.next();dt.setText(rs.getString(1));cst.setText(rs.getString(2));cct.setText(rs.g etString(3));crt.setText(rs.getString(4));cft.setText(rs.getString(5));cht.setText (rs.getString(6));clt.setText(rs.getString(7));ldt.setText(rs.getString(8));ctt.set Page 106
En.Roll-063514872 Appin Technology Lab Text(rs.getString(9));dst.setText(rs.getString(10));dct.setText(rs.getString(11)) ;drt.setText(rs.getString(12));dft.setText(rs.getString(13));dht.setText(rs.getStr ing(13));dlt.setText(rs.getString(13));ckt.setText(rs.getString(13));dbt.setText( rs.getString(13));rmt.setText(rs.getString(13)); JOptionPane.showMessageDialog(null,"Found"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,"Not found"); }}} private class exlistener implements ActionListener { public void actionPerformed(ActionEvent e) { dispose(); } }} Fixed Account Code package pg; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.awt.*; import java.sql.*; public class FixedAccount extends JFrame { private JComboBox jbx;private JLabel adl,ftl,fml,fdl,inl,mdl,ma,lb,lg; private JTextField fdt,ft1,dt,intr,mdt,mrt;private String str[]= new String[50]; private JButton svb,srb,exb,dlb,upb,adb,fs,pr,nx,ls;Connection connection; Statement statement;ResultSet rs;private int i;private String str1,str2,str3,str4,str5,str6,str7,t;Icon log,flg,plg,nlg,llg; public FixedAccount() { super("Fixed Account"); setLayout(null);adl =new JLabel("Account id"); ftl =new JLabel("Fixed Term");fml =new JLabel("Fixed Amount"); fdl =new JLabel("Fixed Date");inl =new JLabel("Interest"); mdl =new JLabel("Maturity Date");ma =new JLabel("Maturity Amount"); fdt =new JTextField();ft1 =new JTextField();dt =new JTextField();intr =new JTextField();mdt =new JTextField();mrt =new JTextField(); for(i=0;i<50;i++) { str[i]=""; } try { i=1; str[0]=" "; connect(); rs=statement.executeQuery("select * from account_detail"); while(rs.next()) Page 107
En.Roll-063514872 Appin Technology Lab { str[i]=rs.getString(1); i++; } jbx= new JComboBox(str); } catch(SQLException e) { JOptionPane.showMessageDialog(null,e); } Color cl2 =new Color(0,0,153); Font ft =new Font("Bookman Old Style",Font.BOLD,30); lb =new JLabel("Fixed Account Detail"); lb.setFont(ft);lb.setForeground(cl2);Icon log =new ImageIcon(getClass().getResource("sbi_logo.gif"));lg =new JLabel(log); flg =new ImageIcon(getClass().getResource("prev.gif"));plg =new ImageIcon(getClass().getResource("prev1.gif"));nlg =new ImageIcon(getClass().getResource("Next.gif"));llg =new ImageIcon(getClass().getResource("Next1.gif"));fs =new JButton(flg); pr =new JButton(plg);nx =new JButton(nlg);ls =new JButton(llg); fs.addActionListener(new fslistener());pr.addActionListener(new prlistener()); nx.addActionListener(new nxlistener());ls.addActionListener(new lslistener()); svb =new JButton("Save/Insert");srb =new JButton("Search"); adb =new JButton("Clear");dlb =new JButton("Delete");exb =new JButton("Exit");upb =new JButton("Update"); svb.addActionListener(new svlistener());srb.addActionListener(new srlistener()); adb.addActionListener(new adlistener());dlb.addActionListener(new dllistener());exb.addActionListener(new exlistener()); add(lb);add(lg);add(fs);add(pr);add(nx);add(ls);add(adl);add(jbx);add(ftl);add( fdt);add(fdl);add(fml);add(inl);add(mdl);add(ma);add(ft1);add(dt);add(intr);ad d(mdt);add(mrt);add(svb);add(srb);add(adb);add(dlb);add(exb);add(upb); lb.setBounds(20,50,360,35);lg.setBounds(400,50,350,50);adl.setBounds(100,1 00,100,25);jbx.setBounds(250,100,150,30); ftl.setBounds(100,150,100,25); fdt.setBounds(250,150,150,30);fml.setBounds(100,200,100,25); ft1.setBounds(250,200,150,30);fdl.setBounds(100,250,100,25); dt.setBounds(250,250,150,30); inl.setBounds(100,300,100,25); intr.setBounds(250,300,150,30); mdl.setBounds(100,350,100,25); mdt.setBounds(250,350,150,30); ma.setBounds(100,400,100,25); mrt.setBounds(250,400,150,30); fs.setBounds(290,450,22,25); pr.setBounds(322,450,22,25); // txt.setBounds(354,450,44,25); nx.setBounds(404,450,22,25); ls.setBounds(436,450,22,25); adb.setBounds(50,500,100,30); svb.setBounds(170,500,100,30); Page 108
En.Roll-063514872 Appin Technology Lab srb.setBounds(290,500,100,30); upb.setBounds(410,500,100,30); dlb.setBounds(530,500,100,30); exb.setBounds(650,500,100,30); Color clr =new Color(247,223,213); getContentPane().setBackground(clr); setSize(800,600); setVisible(true);
} public void connect() { try { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); connection=DriverManager.getConnection("jdbc:odbc:mydn1","system","orac le"); statement=connection.createStatement(); } catch(SQLException e) { JOptionPane.showMessageDialog(null,"Exception"+e); } } catch(Exception ex) { JOptionPane.showMessageDialog(null,"Not Connected"+ex); } } private class adlistener implements ActionListener { public void actionPerformed(ActionEvent e) { fdt.setText(" ");ft1.setText(" ");dt.setText(" "); intr.setText(" ");mdt.setText(" ");mrt.setText(" "); } } private class svlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try Page 109
En.Roll-063514872 Appin Technology Lab { i=jbx.getSelectedIndex();str1 =str[i]; str2 =fdt.getText();str3 =ft1.getText(); str4 =dt.getText();str5 =intr.getText(); str6 =mdt.getText();str7 =mrt.getText(); statement.executeUpdate("insert into fixed_account values('"+str1+"','"+str2+"','"+str3+"','"+str4+"','"+str5+"','"+str6+"','"+str7+"') "); statement.executeUpdate("commit"); JOptionPane.showMessageDialog(null,"Inserted"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,ex); }
} } private class uplistener implements ActionListener { public void actionPerformed(ActionEvent e) { i=jbx.getSelectedIndex(); str1 =str[i]; str2 =fdt.getText(); str3 =ft1.getText();str4 =dt.getText(); str5 =intr.getText();str6 =mdt.getText(); str7 =mrt.getText(); try { statement.executeUpdate("update Fixed_account set account_id ='"+str1+"',fixedterm='"+str2+"',fixedamount= ('"+str3+"'),fixeddate=to_date('"+str4+"'),Interest='"+str5+"' ,maturitydate=to_date('"+str6+"),maturityamount='"+str7+"'where account_id='"+str1+"' "); statement.executeUpdate("commit"); JOptionPane.showMessageDialog(null,"Updated"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,ex); } } } private class dllistener implements ActionListener { public void actionPerformed(ActionEvent e) { Page 110
En.Roll-063514872 Appin Technology Lab try { i=jbx.getSelectedIndex(); str1 =str[i]; statement.executeUpdate("delete from Fixed_account where account_id='"+str1+"' "); statement.executeUpdate("Commit"); JOptionPane.showMessageDialog(null,"deleted"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,ex); } } } private class srlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { t=JOptionPane.showInputDialog("Enter account_id for searching"); ResultSet rs; rs=statement.executeQuery("select *from Fixed_Account where account_id='"+t+"' "); rs.next(); jbx.setSelectedItem(rs.getString(1)); fdt.setText(rs.getString(2)); ft1.setText(rs.getString(3)); intr.setText(rs.getString(5)); mrt.setText(rs.getString(7)); ResultSet rk; rk=statement.executeQuery("select to_char(fixeddate,'DD/MM,YY'),to_char(maturitydate,'DD/MM/YY') from fixed_Account where account_id='"+t+"' "); dt.setText(rk.getString(1)); mdt.setText(rk.getString(2)); JOptionPane.showMessageDialog(null,"Found"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,"Not found"); } } } private class exlistener implements ActionListener { Page 111
private class fslistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { rs = statement.executeQuery("Select *from fixed_Account"); rs.next(); jbx.setSelectedItem(rs.getString(1)); fdt.setText(rs.getString(2)); ft1.setText(rs.getString(3)); dt.setText(rs.getString(4)); mdt.setText(rs.getString(6)); intr.setText(rs.getString(5)); mrt.setText(rs.getString(7)); } catch(SQLException sqle) { JOptionPane.showMessageDialog(null,sqle); } } } private class prlistener implements ActionListener { public void actionPerformed(ActionEvent e) { int k=0,t; try { int i=jbx.getSelectedIndex(); str1=str[i]; rs= statement.executeQuery("select count(*) from fixed_account"); rs.next(); t=rs.getInt(1); rs = statement.executeQuery("select * from fixed_account"); while(rs.next()) { k++; Page 112
En.Roll-063514872 Appin Technology Lab if(k==t-1) break; } jbx.setSelectedItem(rs.getString(1)); fdt.setText(rs.getString(2)); dt.setText(rs.getString(4)); mdt.setText(rs.getString(6)); ft1.setText(rs.getString(3)); intr.setText(rs.getString(5)); mrt.setText(rs.getString(7)); } catch(SQLException sqle) { JOptionPane.showMessageDialog(null,sqle); }
} } private class nxlistener implements ActionListener { public void actionPerformed(ActionEvent e) { int c=0; try { int i=jbx.getSelectedIndex(); str1=str[i]; JOptionPane.showMessageDialog(null,"str1="+str1); rs = statement.executeQuery("select * from fixed_account"); while(rs.next()) { str2=rs.getString(1); JOptionPane.showMessageDialog(null,"str2="+str2); if(str1.compareTo(str2)==0) break; } rs = statement.executeQuery("select * from fixed_account"); while(rs.next()) { c++;
En.Roll-063514872 Appin Technology Lab fdt.setText(rs.getString(2)); ft1.setText(rs.getString(3)); dt.setText(rs.getString(4)); mdt.setText(rs.getString(6)); intr.setText(rs.getString(5)); mrt.setText(rs.getString(7));
} catch(SQLException sqle) { JOptionPane.showMessageDialog(null,sqle); } } } private class lslistener implements ActionListener { public void actionPerformed(ActionEvent e) { int c=0,k=0; try { rs = statement.executeQuery("select * from fixed_account"); while(rs.next()) { c++;
} rs = statement.executeQuery("select * from fixed_account"); while(rs.next()) { if(k==c-1) break; k++; } jbx.setSelectedItem(rs.getString(1)); fdt.setText(rs.getString(2)); ft1.setText(rs.getString(3)); dt.setText(rs.getString(4)); mdt.setText(rs.getString(6)); intr.setText(rs.getString(5)); mrt.setText(rs.getString(7)); } catch(SQLException sqle) { JOptionPane.showMessageDialog(null,sqle); } Page 114
} } } Genral Ledger package pg; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.sql.*; public class GeneralLedger extends JFrame { JLabel dl,sdl,swl,sbl,cdl,cwl,cbl,rdl,rwl,rbl,fdl,fwl,fbl,crl,dbl,lb,lg; JTextField dt,sdt,swt,sbt,cdt,cwt,cbt,rdt,rwt,rbt,fdt,fwt,fbt; JButton sv,ad,sr,ex,cl,dl1; Connection connection; Statement statement; ResultSet rs; int n1,n2,tl; Icon log ; private String str1,t,str2,str3,str4,str5,str6,str7,str8,str9,str10,str11,str12,str13; public GeneralLedger() {super("Daily Banking System"); setLayout(null); Color cl2 =new Color(0,0,153); Font ft =new Font("Bookman Old Style",Font.BOLD,30); lb =new JLabel("General Ledger"); lb.setFont(ft); lb.setForeground(cl2); Icon log =new ImageIcon(getClass().getResource("sbi_logo.gif")); lg =new JLabel(log); crl=new JLabel("Credit"); dbl=new JLabel("Debit"); dl =new JLabel("Date"); sdl=new JLabel("Saving A/C"); swl=new JLabel("Saving A/C"); sbl =new JLabel("Saving Balance"); cdl =new JLabel("Current A/C"); cwl =new JLabel("Current A/C"); cbl =new JLabel("Current Balance"); rdl =new JLabel("Recurring A/C"); rwl =new JLabel("Recurring A/C"); rbl =new JLabel("Recurring Balance"); fdl =new JLabel("Fixed A/C"); fwl =new JLabel("Fixed A/C"); fbl =new JLabel("Fixed Balance"); dt =new JTextField(15); Page 115
En.Roll-063514872 Appin Technology Lab sdt=new JTextField(15); swt=new JTextField(15); sbt=new JTextField(15); cdt=new JTextField(15); cwt=new JTextField(15); cbt=new JTextField(15); rdt=new JTextField(15); rwt=new JTextField(15); rbt=new JTextField(15); fdt=new JTextField(15); fwt=new JTextField(15); fbt=new JTextField(15); sbt.setEditable(false); cbt.setEditable(false); rbt.setEditable(false); fbt.setEditable(false); // sdt.addFocusListener(new sbtlistener()); // swt.addFocusListener(new swlistener()); sv =new JButton("Save/Insert"); ad =new JButton("Update"); ex =new JButton("Exit"); cl =new JButton("Clear"); dl1 =new JButton("Delete"); sr =new JButton("Search"); sv.addActionListener(new svlistener()); ad.addActionListener(new uplistener()); ex.addActionListener(new exlistener()); cl.addActionListener(new adlistener()); dl1.addActionListener(new dllistener()); sr.addActionListener(new srlistener()); lb.setBounds(20,50,360,35); lg.setBounds(400,50,350,50); dl.setBounds(200,100,50,25); dt.setBounds(280,100,100,25); dbl.setBounds(75,125,60,25); crl.setBounds(350,125,60,25); sdl.setBounds(25,150,75,25); swl.setBounds(250,150,75,25); sbl.setBounds(525,150,100,25); sdt.setBounds(125,150,100,25); swt.setBounds(345,150,100,25); sbt.setBounds(650,150,100,25); cdl.setBounds(25,185,75,25); cwl.setBounds(250,185,75,25); cbl.setBounds(525,185,100,25); cdt.setBounds(125,185,100,25); cwt.setBounds(345,185,100,25); cbt.setBounds(650,185,100,25); rdl.setBounds(25,220,85,25); rwl.setBounds(250,220,85,25); rbl.setBounds(525,220,100,25); rdt.setBounds(125,220,100,25); rwt.setBounds(345,220,100,25); rbt.setBounds(650,220,100,25); Page 116
En.Roll-063514872 Appin Technology Lab fdl.setBounds(25,255,75,25); fwl.setBounds(250,255,75,25); fbl.setBounds(525,255,100,25); fdt.setBounds(125,255,100,25); fwt.setBounds(345,255,100,25); fbt.setBounds(650,255,100,25); add(dl); add(dt); add(sdl); add(swl); add(sbl); add(sdt); add(swt);add(sbt); add(cdl); add(cwl); add(cbl); add(cdt); add(cwt); add(cbt); add(rdl); add(rwl); add(rbl); add(rdt); add(rwt); add(rbt); add(fdl); add(fwl); add(fbl); add(fdt); add(fwt); add(fbt); add(ad); add(sv); add(ex); add(dl1); add(cl); add(dbl); add(crl);add(sr); sv.setBounds(50,400,100,25); add(lb); add(lg); ad.setBounds(175,400,100,25); cl.setBounds(300,400,100,25); sr.setBounds(425,400,100,25); dl1.setBounds(550,400,100,25); ex.setBounds(700,400,75,25); setSize(800,800); setVisible(true); Color clr =new Color(247,223,213); getContentPane().setBackground(clr); setResizable(false); connect(); } public void connect() { try { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); connection=DriverManager.getConnection("jdbc:odbc:mydn1","system","orac le"); statement=connection.createStatement(); } catch(SQLException e) { JOptionPane.showMessageDialog(null,"Exception"+e); } } catch(Exception ex) { JOptionPane.showMessageDialog(null,"Not Connected"+ex); } } private class adlistener implements ActionListener { public void actionPerformed(ActionEvent e) Page 117
En.Roll-063514872 Appin Technology Lab { dt.setText(" "); sdt.setText(" "); swt.setText(" "); sbt.setText(" "); cdt.setText(" "); cwt.setText(" "); cbt.setText(" "); rdt.setText(" "); rwt.setText(" "); rbt.setText(" "); fdt.setText(" "); fwt.setText(" "); fbt.setText(" "); } } private class svlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { str1 =dt.getText(); str2 =sdt.getText(); str3 =swt.getText(); str4 =sbt.getText(); str5 =cdt.getText(); str6 =cwt.getText(); str7 =cbt.getText(); str8 =rdt.getText(); str9 =rwt.getText(); str10 =rbt.getText(); str11 =fdt.getText(); str12 =fwt.getText(); str13 =fbt.getText(); statement.executeUpdate("insert into general_Ledger values(to_date('"+str1+"'),'"+str2+"','"+str3+"','"+str5+"','"+str6+"','"+str7+"','" +str8+"','"+str9+"','"+str10+"','"+str11+"','"+str12+"','"+str13+"')"); statement.executeUpdate("commit"); JOptionPane.showMessageDialog(null,"Inserted"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,ex); }
} Page 118
} private class uplistener implements ActionListener { public void actionPerformed(ActionEvent e) { str1 =dt.getText(); str2 =sdt.getText(); str3 =swt.getText(); str4 =sbt.getText(); str5 =cdt.getText(); str6 =cwt.getText(); str7 =cbt.getText(); str8 =rdt.getText(); str9 =rwt.getText(); str10 =rbt.getText(); str11 =fdt.getText(); str12 =fwt.getText(); str13 =fbt.getText(); try { statement.executeUpdate("update General_ledger set gdate =to_date( '"+str1+"'), svdp ='"+str2+"',svwt = '"+str3+"',svbl= '"+str4+"',crdp='"+str5+"',crwt='"+str6+"',crbl='"+str7+"',rcdp='"+str8+"',rcwt ='"+str9+"',rcbl='"+str10+"',fxdp='"+str11+"',fxwt='"+str12+"',fxbl='"+str13+" ' where account_id='"+str1+"' "); statement.executeUpdate("commit"); JOptionPane.showMessageDialog(null,"Updated"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,ex); } } } private class dllistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { str1 =JOptionPane.showInputDialog(null,"Enter for deleting"); statement.executeUpdate("delete from General_ledger where gdate='"+str1+"' "); statement.executeUpdate("Commit"); JOptionPane.showMessageDialog(null,"deleted"); } Page 119
En.Roll-063514872 Appin Technology Lab catch(SQLException ex) { JOptionPane.showMessageDialog(null,ex); } } } private class srlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { t=JOptionPane.showInputDialog("Enter account_id for searching"); ResultSet rs; rs=statement.executeQuery("select *from general_ledger where account_id='"+t+"' "); rs.next(); dt.setText(rs.getString(1)); sdt.setText(rs.getString(2)); swt.setText(rs.getString(3)); sbt.setText(rs.getString(4)); cdt.setText(rs.getString(5)); cwt.setText(rs.getString(6)); cbt.setText(rs.getString(7)); rdt.setText(rs.getString(8)); rwt.setText(rs.getString(9)); rbt.setText(rs.getString(10)); fdt.setText(rs.getString(11)); fwt.setText(rs.getString(12)); fbt.setText(rs.getString(13)); JOptionPane.showMessageDialog(null,"Found"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,"Not found"); } } } private class exlistener implements ActionListener { public void actionPerformed(ActionEvent e) { dispose(); } } /* Page 120
En.Roll-063514872 Appin Technology Lab private class sbtlistener implements FocusListener { public void focusLost(FocusEvent e) { n1 =Integer.parseInt(sdt.getText()); n2 =Integer.parseInt(swt.getText()); tl=n1+n2; sbt.setText(String.valueOf(tl)); } } private class swlistener implements FocusListener { public void focusLost(FocusEvent e) { n1 =Integer.parseInt(sdt.getText()); n2 =Integer.parseInt(swt.getText()); tl=n1+n2; sbt.setText(String.valueOf(tl)); } } */} Loan Details package pg; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.sql.*; public class LoanDetail extends JFrame { private JLabel dtl,dpl,wtl,bl,lb,lg;private JTextField dtx,dpx,wtx,blx,txt; private JButton adb,svb,upb,exb,dlb,fs,pr,nx,ls; Statement statement;Connection connection;private String str1,str2,str3,str4,t; ResultSet rs;Icon log,flg,plg,nlg,llg; public LoanDetail() { super("Loan Detail");setLayout(null); Color cl2 =new Color(0,0,153); Font ft =new Font("Bookman Old Style",Font.BOLD,30);lb =new JLabel("Loans Detail");lb.setFont(ft);lb.setForeground(cl2);Icon log =new ImageIcon(getClass().getResource("sbi_logo.gif"));lg =new JLabel(log);flg =new ImageIcon(getClass().getResource("prev.gif"));plg =new ImageIcon(getClass().getResource("prev1.gif"));nlg =new ImageIcon(getClass().getResource("Next.gif"));llg =new ImageIcon(getClass().getResource("Next1.gif"));fs =new JButton(flg); pr =new JButton(plg);nx =new JButton(nlg);ls =new JButton(llg); fs.addActionListener(new fslistener());pr.addActionListener(new prlistener()); nx.addActionListener(new nxlistener());ls.addActionListener(new lslistener()); dtl =new JLabel("Date");dpl =new JLabel("Deposit");wtl =new JLabel("Withdrawal");bl =new JLabel("Balance Amount");dtx =new Page 121
En.Roll-063514872 Appin Technology Lab JTextField();dpx =new JTextField();wtx =new JTextField();blx =new JTextField();txt =new JTextField();adb =new JButton("Clear"); svb =new JButton("Save/Insert");upb =new JButton("Update");exb =new JButton("Exit");dlb =new JButton("Delete");adb.addActionListener( new adlistener());svb.addActionListener( new svlistener());upb.addActionListener( new uplistener());exb.addActionListener( new exlistener());dlb.addActionListener( new dllistener()); add(lb);add(fs);add(pr);add(nx);add(ls);add(lg);add(dtl);add(dpl);add(wtl); add(bl);add(dtx);add(dpx);add(wtx);add(blx);add(adb);add(svb);add(upb); add(exb);add(dlb);add(txt);lb.setBounds(30,40,300,30); lg.setBounds(350,40,350,60);fs.setBounds(290,350,22,25); pr.setBounds(322,350,22,25);txt.setBounds(354,350,40,25); nx.setBounds(404,350,22,25);ls.setBounds(436,350,22,25); dtl.setBounds(200,100,100,25);dtx.setBounds(320,100,150,27); dpl.setBounds(200,150,100,25);dpx.setBounds(320,150,150,27);wtl.setBound s(200,200,100,25);wtx.setBounds(320,200,150,27);bl.setBounds(200,250,100, 25);blx.setBounds(320,250,150,27); adb.setBounds(50,300,100,30);svb.setBounds(170,300,100,30);upb.setBounds (290,300,100,30);dlb.setBounds(410,300,100,30);exb.setBounds(530,300,100, 30);Color clr =new Color(247,223,213);getContentPane().setBackground(clr); setSize(800,600);setVisible(true); connect();} public void connect() { try {try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");connection =DriverManager.getConnection("jdbc:odbc:mydn1","system","oracle"); statement=connection.createStatement(); } catch(SQLException e) { JOptionPane.showMessageDialog(null,"Error"+e); }
} catch(Exception ex ) { JOptionPane.showMessageDialog(null,"Exception"+ex); }} private class adlistener implements ActionListener { public void actionPerformed(ActionEvent e) { dtx.setText(" ");wtx.setText(" ");dpx.setText(" ");blx.setText(" "); }} private class svlistener implements ActionListener { Page 122
En.Roll-063514872 Appin Technology Lab public void actionPerformed(ActionEvent e) { Try { str1=dtx.getText(); str2=wtx.getText();str3=dpx.getText();str4=blx.getText(); statement.executeUpdate("insert into Loan_detail values('"+str1+"','"+str2+"','"+str3+"','"+str4+"') "); statement.executeUpdate("commit");JOptionPane.showMessageDialog(null,"I nserted"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,"error"+ex); }}} private class uplistener implements ActionListener { public void actionPerformed(ActionEvent e) { Try { str1=dtx.getText(); str2=wtx.getText(); str3=dpx.getText();str4=blx.getText();; tatement.executeUpdate("update from loan_detail set tdate='"+str1+"',deposit='"+str2+"',withdrawal='"+str3+"',blamount='"+str4+"' where tdate='"+str1+"' ");statement.executeUpdate("commit"); JOptionPane.showMessageDialog(null,"Updated"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,""+ex); }}} public class srlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { t=JOptionPane.showInputDialog("Enter date for searching"); statement.executeQuery("select * from loan_detail where tdate='"+t+"' "); rs.next();dtx.setText(rs.getString(1));wtx.setText(rs.getString(2)); dpx.setText(rs.getString(3));blx.setText(rs.getString(4)); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,"Error"+ex); }} } private class dllistener implements ActionListener { public void actionPerformed(ActionEvent e) { Page 123
En.Roll-063514872 Appin Technology Lab Try { t=JOptionPane.showInputDialog(null,"Enter date for searching"); statement.executeUpdate("delete from Loan_detail where tdate='"+t+"' "); JOptionPane.showMessageDialog(null,"Deleted");} catch(SQLException ex) { JOptionPane.showMessageDialog(null,"Not Deleted"+ex)}}} private class exlistener implements ActionListener { public void actionPerformed(ActionEvent e) { dispose(); }} private class fslistener implements ActionListener { public void actionPerformed(ActionEvent e) { Try {rs = statement.executeQuery("Select *from loan_detail"); rs.next();dtx.setText(rs.getString(1));wtx.setText(rs.getString(2)); dpx.setText(rs.getString(3));blx.setText(rs.getString(4)); } catch(SQLException sqle) { JOptionPane.showMessageDialog(null,sqle); } }} private class prlistener implements ActionListener { public void actionPerformed(ActionEvent e) { int k=0,t; try { rs= statement.executeQuery("select count(*) from Loan_detail"); rs.next();t=rs.getInt(1);rs = statement.executeQuery("select * from loan_detail"); while(rs.next()) { k++; if(k==t) break;} dtx.setText(rs.getString(1));wtx.setText(rs.getString(2)); dpx.setText(rs.getString(3));blx.setText(rs.getString(4)); } catch(SQLException sqle) { JOptionPane.showMessageDialog(null,sqle); }}} private class nxlistener implements ActionListener Page 124
En.Roll-063514872 Appin Technology Lab { public void actionPerformed(ActionEvent e) { try { str1=dtx.getText(); rs = statement.executeQuery("select * from loan_detail"); while(rs.next()) { str2= rs.getString(1);if(str1.compareTo(str2)==0) break; } dtx.setText(rs.getString(1));wtx.setText(rs.getString(2)); dpx.setText(rs.getString(3));blx.setText(rs.getString(4)); } catch(SQLException sqle) { JOptionPane.showMessageDialog(null,sqle); }}} private class lslistener implements ActionListener { public void actionPerformed(ActionEvent e) { int c=0,k=0; try { rs = statement.executeQuery("select * from Loan_detail"); while(rs.next()) { c++; } rs = statement.executeQuery("select * from Loan_detail"); while(rs.next()) { if(k==c-1) break; k++; } dtx.setText(rs.getString(1)); wtx.setText(rs.getString(2)); dpx.setText(rs.getString(3)); blx.setText(rs.getString(4)); } catch(SQLException sqle) { JOptionPane.showMessageDialog(null,sqle); }}} } Account Transfer package pg; import javax.swing.*; import java.awt.*; import java.awt.event.*; Page 125
En.Roll-063514872 Appin Technology Lab import java.sql.*; public class AccountTransfer extends JFrame { private JLabel adl,trl,atl,tdl,aml,lb,lg;private JTextField adt,trt,att,tdt,amt; private JButton sv,cl,dl,up,ex,sr; Connection connection; Statement statement; ResultSet rs;private String str1,str2,str3,str4,str5,t;public AccountTransfer() { super("Daily Banking System");setLayout(null); Color cl2 =new Color(0,0,153); Font ft =new Font("Bookman Old Style",Font.BOLD,30); lb =new JLabel("Fixed Account Detail");lb.setFont(ft);lb.setForeground(cl2); Icon log =new ImageIcon(getClass().getResource("sbi_logo.gif")); lg =new JLabel(log);adl =new JLabel("Account id");trl =new JLabel("Transfer to");atl =new JLabel("Account type");tdl =new JLabel("Tranfered Date"); aml =new JLabel("Amount");adt =new JTextField();trt =new JTextField(); att =new JTextField();dt =new JTextField();amt =new JTextField();sv =new JButton("Save/Insert");cl =new JButton("Clear");dl =new JButton("Delete"); up =new JButton("Update"); sr =new JButton("Search"); ex =new JButton("Exit");sv.addActionListener(new svlistener()); cl.addActionListener(new adlistener()); up.addActionListener(new uplistener()); ex.addActionListener(new exlistener()); sr.addActionListener(new srlistener()); lb.setBounds(20,50,360,35);lg.setBounds(400,50,350,50);adl.setBounds(75,20 0,75,25);adt.setBounds(175,200,100,25);trl.setBounds(75,235,75,25);trt.setBo unds(175,235,100,25);atl.setBounds(75,270,75,25);att.setBounds(175,270,100 ,25);tdl.setBounds(75,305,75,25);tdt.setBounds(175,305,100,25);aml.setBoun ds(75,340,75,25);amt.setBounds(175,340,100,25); cl.setBounds(75,390,100,25);sv.setBounds(200,390,100,25);up.setBounds(325 ,390,100,25);sr.setBounds(450,390,100,25);dl.setBounds(575,390,100,25); ex.setBounds(700,390,100,25);add(sr);add(adl);add(trl);add(atl);add(tdl);add(a ml);add(lb);add(adt);add(trt);add(att);add(tdt);add(amt);add(sv);add(cl);add(dl );add(up);add(ex);setSize(800,600);Color clr =new Color(247,223,213); getContentPane().setBackground(clr);setVisible(true); connect(); } public void connect() { try { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); connection=DriverManager.getConnection("jdbc:odbc:mydn1","system","orac le"); statement=connection.createStatement(); Page 126
En.Roll-063514872 Appin Technology Lab } catch(SQLException e) { JOptionPane.showMessageDialog(null,"Exception"+e); }} catch(Exception ex) { JOptionPane.showMessageDialog(null,"Not Connected"+ex); }} private class adlistener implements ActionListener { public void actionPerformed(ActionEvent e) { adt.setText(" ");att.setText(" ");trt.setText(" ");tdt.setText(" ");amt.setText(" ");}} private class svlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { str1 =adt.getText();str2 =trt.getText();str3 =att.getText();str4 =tdt.getText(); str5 =amt.getText();statement.executeUpdate("insert into Account_transfer values('"+str1+"','"+str2+"','"+str3+"',to_date('"+str4+"'),'"+str5+"')");statemen t.executeUpdate("commit");JOptionPane.showMessageDialog(null,"Inserted") ; } catch(SQLException ex) { JOptionPane.showMessageDialog(null,ex); } }} private class uplistener implements ActionListener { public void actionPerformed(ActionEvent e) { str1 =adt.getText();str2 =trt.getText();str3 =att.getText();str4 =tdt.getText(); str5 =amt.getText(); try { statement.executeUpdate("update Account_transfer set account_id = '"+str1+"',transfered_to='"+str2+"',account_type=('"+str3+"'),Transfered_date =to_date('"+str4+"'),amount=('"+str5+"')whereaccount_id='"+str1+"' ");statement.executeUpdate("commit"); JOptionPane.showMessageDialog(null,"Updated"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,ex); }}} Page 127
En.Roll-063514872 Appin Technology Lab private class dllistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { str1 =JOptionPane.showInputDialog(null,"Enter Account id for deleting"); statement.executeUpdate("delete from account_transfer where account_id='"+str1+"' ");statement.executeUpdate("Commit"); JOptionPane.showMessageDialog(null,"deleted"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,ex); }}} private class srlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { t=JOptionPane.showInputDialog("Enter account_id for searching"); ResultSet rs;rs=statement.executeQuery("select *from Account_transfer where account_id='"+t+"' ");rs.next(); adt.setText(rs.getString(1));trt.setText(rs.getString(2)) att.setText(rs.getString(3));tdt.setText(rs.getString(4));amt.setText(rs.getString (5));JOptionPane.showMessageDialog(null,"Found"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,"Not found"); }}} private class exlistener implements ActionListener { public void actionPerformed(ActionEvent e) { dispose(); } }} Head Office Account package pg; import javax.swing.*; import java.awt.*; import java.awt.event.*; public class HeadOfficeAccount extends JFrame { private JLabel dl,dpl,wtl,bll,lg;private JTextField dlt,dplt,wtlt,bllt; private JButton sv,cl,up,dl1,ex; public HeadOfficeAccount() { Page 128
En.Roll-063514872 Appin Technology Lab super("Head Office Account"); setLayout(null); lg =new JLabel("Head Office Account");dl =new JLabel("Date");dpl=new JLabel("Deposit"); wtl=new JLabel("Withdrawal"); bll=new JLabel("Balance");dlt =new JTextField();dplt =new JTextField(); wtlt =new JTextField();bllt =new JTextField();sv =new JButton("Save");cl =new JButton("Clear");up =new JButton("Update"); dl1=new JButton("Delete");ex =new JButton("Exit"); lg.setBounds(100,50,150,25);dl.setBounds(50,150,75,25); dlt.setBounds(150,150,100,25);dpl.setBounds(50,185,75,25);dplt.setBounds(1 50,185,100,25);wtl.setBounds(50,220,75,25);wtlt.setBounds(150,220,100,25); bll.setBounds(50,255,75,25);bllt.setBounds(150,255,100,25);sv.setBounds(50, 300,100,25);up.setBounds(175,300,100,25);cl.setBounds(300,300,100,25); dl1.setBounds(425,300,100,25); ex.setBounds(550,300,100,25); add(dl);add(dpl);add(wtl);add(bll);add(lg);add(dlt);add(dplt);add(wtlt);add(bllt );add(sv);add(cl);add(up);add(dl1);add(ex); setSize(600,500); setVisible(true); }} Recurring Account code package pg; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.sql.*; public class RecurringAccount extends JFrame { private JLabel adl,prl,trml,dtl,bml,lb,lg; private JComboBox jbx; private JTextField prt,trt,dt,blt; private JButton svb,srb,dlb,exb,upb,adb; private Container ct; private JPanel pl1,pl2,pl3,pl4,pl5,pl6,pl7; private String str[]=new String[50]; private String str1,str2,str3,str4,str5; private int i; Connection connection; Statement statement; ResultSet rs; String t; public RecurringAccount() { super("Recurring Account");ct =getContentPane(); ct.setLayout(new GridLayout(8,1)); adl =new JLabel("Account id"); prl =new JLabel("Period "); trml=new JLabel("Term Amount "); dtl =new JLabel("Date "); bml =new JLabel("Balance Amount"); prt =new JTextField(15); trt =new JTextField(15); Page 129
En.Roll-063514872 Appin Technology Lab dt =new JTextField(15); blt= new JTextField(15); Color cl2 =new Color(0,0,153); Font ft =new Font("Bookman Old Style",Font.BOLD,30); lb =new JLabel("Recurring Account Detail"); lb.setFont(ft); lb.setForeground(cl2); Icon log =new ImageIcon(getClass().getResource("sbi_logo.gif")); lg =new JLabel(log); svb =new JButton("Save/Insert");srb =new JButton("Search"); dlb =new JButton("Delete");exb =new JButton("Exit"); upb =new JButton("Update");adb =new JButton("Clear"); svb.addActionListener(new svlistener()); srb.addActionListener(new srlistener()); dlb.addActionListener(new dllistener()); exb.addActionListener(new exlistener()); upb.addActionListener(new uplistener()); adb.addActionListener(new adlistener()); pl1 =new JPanel();pl2 =new JPanel();pl3 =new JPanel(); pl4 =new JPanel();pl5=new JPanel();pl6 =new JPanel(); pl7 =new JPanel(); try { i=1; str[0]=" "; connect(); rs=statement.executeQuery("select * from account_detail"); while(rs.next()) { str[i]=rs.getString(1); i++; } jbx= new JComboBox(str); } catch(SQLException e) { JOptionPane.showMessageDialog(null,e); } Color cl =new Color(247,223,213); pl1.setBackground(cl);pl2.setBackground(cl); pl3.setBackground(cl);pl4.setBackground(cl); pl5.setBackground(cl);pl6.setBackground(cl); pl7.setBackground(cl); pl1.add(lb);pl1.add(lg);pl2.add(adl);pl2.add(jbx); pl3.add(prl);pl3.add(prt);pl4.add(trml);pl4.add(trt); pl5.add(dtl);pl5.add(dt);pl6.add(bml);pl6.add(blt); pl7.add(adb);pl7.add(svb);pl7.add(srb);pl7.add(upb); pl7.add(dlb);pl7.add(exb); Page 130
En.Roll-063514872 Appin Technology Lab ct.add(pl1);ct.add(pl2);ct.add(pl3);ct.add(pl4); ct.add(pl5);ct.add(pl6);ct.add(pl7); setVisible(true); setSize(700,500); } public void connect() { try { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); connection=DriverManager.getConnection("jdbc:odbc:mydn1","system","orac le"); statement=connection.createStatement(); } catch(SQLException e) { JOptionPane.showMessageDialog(null,"Exception"+e); } } catch(Exception ex) { JOptionPane.showMessageDialog(null,"Not Connected"+ex); } } private class adlistener implements ActionListener { public void actionPerformed(ActionEvent e) { trt.setText(" "); prt.setText(" "); dt.setText(" ");blt.setText(" "); } } private class svlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { i=jbx.getSelectedIndex(); str1 =str[i];str2 =prt.getText();str3 =trt.getText(); str4 =dt.getText();str5 =blt.getText(); statement.executeUpdate("insert into reccuring_account values('"+str1+"','"+str2+"','"+str3+"','"+str4+"','"+str5+"')"); statement.executeUpdate("commit"); JOptionPane.showMessageDialog(null,"Inserted"); Page 131
En.Roll-063514872 Appin Technology Lab } catch(SQLException ex) { JOptionPane.showMessageDialog(null,ex); }}} private class uplistener implements ActionListener { public void actionPerformed(ActionEvent e) { i=jbx.getSelectedIndex(); str1 =str[i];str2 =prt.getText(); str3 =trt.getText();str4 =dt.getText(); str5 =blt.getText(); try { statement.executeUpdate("update reccuring_account set ='"+str1+"',period='"+str2+"',term_amount= ('"+str3+"'),tdate=to_date('"+str4+"'),balance_amount='"+str5+"' account_id='"+str1+"' "); statement.executeUpdate("commit"); JOptionPane.showMessageDialog(null,"Updated"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,ex); }}} private class dllistener implements ActionListener { public void actionPerformed(ActionEvent e) { try { i=jbx.getSelectedIndex();
account_id where
str1 =str[i]; statement.executeUpdate("delete from reccuring_account account_id='"+str1+"' "); statement.executeUpdate("Commit"); JOptionPane.showMessageDialog(null,"deleted"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,ex); }}} private class srlistener implements ActionListener { public void actionPerformed(ActionEvent e) { try {
where
Page 132
En.Roll-063514872 Appin Technology Lab t=JOptionPane.showInputDialog("Enter account_id for searching"); ResultSet rs; rs=statement.executeQuery("select *from account_detail where account_id='"+t+"' "); rs.next(); // .setText(rs.getString(1)); prt.setText(rs.getString(2)); System.out.println(rs.getString(2)); trt.setText(rs.getString(3)); dt.setText(rs.getString(4)); blt.setText(rs.getString(5)); JOptionPane.showMessageDialog(null,"Found"); } catch(SQLException ex) { JOptionPane.showMessageDialog(null,"Not found"); } } } private class exlistener implements ActionListener { public void actionPerformed(ActionEvent e) { dispose(); }} } Here Report Generated code package pg; import java.sql.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; import javax.swing.JTable; import java.lang.String; import java.io.*; import java.lang.*; import java.util.Vector; import javax.swing.table.AbstractTableModel; public class RP1 extends JFrame implements ActionListener { String url="jdbc:odbc:mydn1"; //JTextField command =new JTextField(); JLabel lb ;Font ft ;JButton ex =new JButton("Exit");JButton ds=new JButton("Load Report")JLabel bl1=new JLabel(" ") JLabel bl2=new JLabel(" "); JLabel bl3=new JLabel(" ");ResultsModel model =new ResultsModel(); JTextArea status=new JTextArea(5,1); JScrollPane resultspane;Connection connection; Page 133
En.Roll-063514872 Appin Technology Lab Statement statement; public RP1() {super("Report 1 of "); lb =new JLabel("Day wise deposit to all head separately "); setDefaultCloseOperation(DISPOSE_ON_CLOSE); ft =new Font("Courier New",Font.BOLD,20); lb.setFont(ft);Box box =Box.createHorizontalBox(); box.add(bl1); box.add(lb); box.add(bl2); box.add(ds); box.add(bl3); box.add(ex);add(box,BorderLayout.NORTH);status.setLineWrap(true); status.setWrapStyleWord(true); getContentPane().add(status,BorderLayout.SOUTH);ds.addActionListener(thi s);// clquery.addActionListener(this);ex.addActionListener(this); try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); connection =DriverManager.getConnection(url,"system","oracle"); statement =connection.createStatement();JTable table = new JTable(model); table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);resultspane = new JScrollPane(table);getContentPane().add(resultspane,BorderLayout.CENTER) ;}catch(ClassNotFoundException en) { System.err.println(en); } catch(SQLException sqle) { System.err.println(sqle); } getContentPane().setBackground(Color.cyan); setBounds(0,0,400,300); pack(); setVisible(true); } // construcor closed public void executesql() { String query="select *from general_ledger"; if(query==null || query.length()==0) { return; } try { model.setResultSet(statement.executeQuery(query)); status.setText("Resultset has " + model.getRowCount() + "rows."); } catch(SQLException sqle) { status.setText(sqle.getMessage()); }} public void actionPerformed(ActionEvent e) Page 134
En.Roll-063514872 Appin Technology Lab { Object source=e.getSource(); if(source==ds) { executesql(); } else if(source==ex) { dispose(); }} class ResultsModel extends AbstractTableModel { private Vector<String[]> dataRows=new Vector<String[]>(); private String[] columnNames =new String[0]; public void setResultSet(ResultSet results) { try { ResultSetMetaData metadata=results.getMetaData(); int columns=metadata.getColumnCount(); columnNames=new String[columns];for(int i=0;i<columns;i++) { columnNames[i]=metadata.getColumnLabel(i+1); } dataRows.clear();String[] rowData; while(results.next()) { rowData =new String[columns]; for(int i=0;i<columns;i++) { rowData[i]=results.getString(i+1); } dataRows.addElement(rowData); } fireTableChanged(null); } catch(SQLException sqle) { System.err.println(sqle); }} public int getColumnCount() { return columnNames.length; } public int getRowCount() { return dataRows ==null ? 0 : dataRows.size(); } public String getValueAt(int row,int column) { Page 135
En.Roll-063514872 Appin Technology Lab return dataRows.elementAt(row)[column]; } public String getColumnName(int column) { return columnNames[column] == null ? "No Name" : columnNames[column]; }}} Report 2 package pg; import java.sql.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; import javax.swing.JTable; import java.lang.String; import java.io.*; import java.lang.*; import java.util.Vector; import javax.swing.table.AbstractTableModel; public class RP2 extends JFrame implements ActionListener { String url="jdbc:odbc:mydn1"; JLabel lb =new JLabel("Total deposit per day "); JButton ex =new JButton("Exit");JButton ds=new JButton("Load Report"); JLabel bl1=new JLabel(" ");JLabel bl2=new JLabel(" "); JLabel bl3=new JLabel(" ");ResultsModel model =new ResultsModel(); JTextArea status=new JTextArea(5,1);JScrollPane resultspane; Connection connection;Statement statement; public RP2() { super("Report 2 of ");setDefaultCloseOperation(DISPOSE_ON_CLOSE); Box box =Box.createHorizontalBox();box.add(bl1);box.add(lb); box.add(bl2); box.add(ds);box.add(bl3); box.add(ex);add(box,BorderLayout.NORTH); status.setLineWrap(true);status.setWrapStyleWord(true); getContentPane().add(status,BorderLayout.SOUTH);ds.addActionListener(thi s); // clquery.addActionListener(this); ex.addActionListener(this); try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); connection =DriverManager.getConnection(url,"system","oracle"); statement =connection.createStatement(); // ResultsModel model=new ResultsModel(); JTable table = new JTable(model); able.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); resultspane = new JScrollPane(table); getContentPane().add(resultspane,BorderLayout.CENTER); } catch(ClassNotFoundException en) { Page 136
En.Roll-063514872 Appin Technology Lab System.err.println(en); } catch(SQLException sqle) { System.err.println(sqle); } getContentPane().setBackground(Color.cyan); setBounds(0,0,400,300);pack();setVisible(true);} // construcor closed public void executesql() { String query="select *from Gurrantor_detail"; if(query==null || query.length()==0) {return; } try { model.setResultSet(statement.executeQuery(query)); status.setText("Resultset has " + model.getRowCount() + "rows."); } catch(SQLException sqle) { status.setText(sqle.getMessage()); }} public void actionPerformed(ActionEvent e) { Object source=e.getSource(); if(source==ds) { executesql(); } else if(source==ex) { dispose(); }} class ResultsModel extends AbstractTableModel { private Vector<String[]> dataRows=new Vector<String[]>(); private String[] columnNames =new String[0]; public void setResultSet(ResultSet results) { try { ResultSetMetaData metadata=results.getMetaData(); int columns=metadata.getColumnCount(); columnNames=new String[columns]; for(int i=0;i<columns;i++) { columnNames[i]=metadata.getColumnLabel(i+1); } dataRows.clear(); Page 137
En.Roll-063514872 Appin Technology Lab String[] rowData;while(results.next()) { rowData =new String[columns]; for(int i=0;i<columns;i++) { rowData[i]=results.getString(i+1); } dataRows.addElement(rowData); } fireTableChanged(null); } catch(SQLException sqle) { System.err.println(sqle); }} public int getColumnCount() { return columnNames.length; } public int getRowCount() { return dataRows ==null ? 0 : dataRows.size(); } public String getValueAt(int row,int column) { return dataRows.elementAt(row)[column]; } public String getColumnName(int column) { return columnNames[column] == null ? "No Name" : columnNames[column]; }}} Report 3 { String url="jdbc:odbc:mydn1"; JLabel lb =new JLabel("Monthly total deposit ");JButton ex =new JButton("Exit");JButton ds=new JButton("Load Report"); JLabel bl1=new JLabel(" ");JLabel bl2=new JLabel(" "); JLabel bl3=new JLabel(" ");ResultsModel model =new ResultsModel(); JTextArea status=new JTextArea(5,1);JScrollPane resultspane; Connection connection; Statement statement; public RP3() { super("Report 3 of "); setDefaultCloseOperation(DISPOSE_ON_CLOSE); Box box =Box.createHorizontalBox(); box.add(bl1);box.add(lb);box.add(bl2);box.add(ds);box.add(bl3);box.add(ex) add(box,BorderLayout.NORTH);status.setLineWrap(true);status.setWrapStyle Word(true);getContentPane().add(status,BorderLayout.SOUTH); ds.addActionListener(this);// clquery.addActionListener(this); Page 138
En.Roll-063514872 Appin Technology Lab ex.addActionListener(this); try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");connection =DriverManager.getConnection(url,"system","oracle");statement =connection.createStatement();// ResultsModel model=new ResultsModel(); JTable table = new JTable(model); table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);resultspane = new JScrollPane(table);getContentPane().add(resultspane,BorderLayout.CENTER) ;} catch(ClassNotFoundException en) { System.err.println(en); } catch(SQLException sqle) { System.err.println(sqle); } getContentPane().setBackground(Color.cyan); setBounds(0,0,400,300); pack(); setVisible(true); } // construcor closed public void executesql() { String query="select *from customer_detail"; if(query==null || query.length()==0) { return; }try { model.setResultSet(statement.executeQuery(query)); status.setText("Resultset has " + model.getRowCount() + "rows."); } catch(SQLException sqle) { status.setText(sqle.getMessage()); }} public void actionPerformed(ActionEvent e) { Object source=e.getSource(); if(source==ds) { executesql(); } else if(source==ex) { dispose(); }} class ResultsModel extends AbstractTableModel Page 139
En.Roll-063514872 Appin Technology Lab { private Vector<String[]> dataRows=new Vector<String[]>(); private String[] columnNames =new String[0]; public void setResultSet(ResultSet results) { try { ResultSetMetaData metadata=results.getMetaData(); int columns=metadata.getColumnCount(); columnNames=new String[columns]; for(int i=0;i<columns;i++) { columnNames[i]=metadata.getColumnLabel(i+1); } dataRows.clear(); String[] rowData; while(results.next()) { rowData =new String[columns]; for(int i=0;i<columns;i++) { rowData[i]=results.getString(i+1); } dataRows.addElement(rowData); } fireTableChanged(null); } catch(SQLException sqle) { System.err.println(sqle); } } public int getColumnCount() { return columnNames.length; } public int getRowCount() { return dataRows ==null ? 0 : dataRows.size(); } public String getValueAt(int row,int column) { return dataRows.elementAt(row)[column]; } public String getColumnName(int column) { return columnNames[column] == null ? "No columnNames[column]; }}}
Name"
Page 140
En.Roll-063514872 Appin Technology Lab Report 4 { String url="jdbc:odbc:mydn1"; JLabel lb =new JLabel("Account wise total deposit "); JButton ex =new JButton("Exit");JButton ds=new JButton("Load Report") JLabel bl1=new JLabel(" ");JLabel bl2=new JLabel(" ") JLabel bl3=new JLabel(" "); ResultsModel model =new ResultsModel() JTextArea status=new JTextArea(5,1) JScrollPane resultspane; Connection connection; Statement statement; public RP4() { super("Report 4 of "); setDefaultCloseOperation(DISPOSE_ON_CLOSE); Box box =Box.createHorizontalBox(); box.add(bl1); box.add(lb); box.add(bl2); box.add(ds); box.add(bl3); box.add(ex);add(box,BorderLayout.NORTH);status.setLineWrap(true);status. setWrapStyleWord(true);getContentPane().add(status,BorderLayout.SOUTH); ds.addActionListener(this); // clquery.addActionListener(this); ex.addActionListener(this); try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); connection =DriverManager.getConnection(url,"system","oracle"); statement =connection.createStatement(); // ResultsModel model=new ResultsModel();JTable table = new JTable(model);table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); resultspane = new JScrollPane(table); getContentPane().add(resultspane,BorderLayout.CENTER); } catch(ClassNotFoundException en) { System.err.println(en); } catch(SQLException sqle) { System.err.println(sqle);} getContentPane().setBackground(Color.cyan); setBounds(0,0,400,300); pack(); setVisible(true);} // construcor closed public void executesql() { String query="select svdp,crdp,rcdp,fxdp from general_ledger"; if(query==null || query.length()==0) { return; } try { Page 141
En.Roll-063514872 Appin Technology Lab model.setResultSet(statement.executeQuery(query)); status.setText("Resultset has " + model.getRowCount() + "rows."); } catch(SQLException sqle) { status.setText(sqle.getMessage()); }} public void actionPerformed(ActionEvent e) {Object source=e.getSource(); if(source==ds) { executesql(); } else if(source==ex) { dispose(); }} class ResultsModel extends AbstractTableModel { private Vector<String[]> dataRows=new Vector<String[]>(); private String[] columnNames =new String[0]; public void setResultSet(ResultSet results) { try { ResultSetMetaData metadata=results.getMetaData(); int columns=metadata.getColumnCount(); columnNames=new String[columns]; for(int i=0;i<columns;i++) { columnNames[i]=metadata.getColumnLabel(i+1); } dataRows.clear(); String[] rowData; while(results.next()) { rowData =new String[columns]; for(int i=0;i<columns;i++) { rowData[i]=results.getString(i+1); } dataRows.addElement(rowData); } fireTableChanged(null); } catch(SQLException sqle) { System.err.println(sqle); }} public int getColumnCount() Page 142
En.Roll-063514872 Appin Technology Lab { return columnNames.length; } public int getRowCount() { return dataRows ==null ? 0 : dataRows.size(); } public String getValueAt(int row,int column) { return dataRows.elementAt(row)[column]; } public String getColumnName(int column) { return columnNames[column] == null columnNames[column]; }}} Report 5
"No
Name"
public class RP5 extends JFrame implements ActionListener { String url="jdbc:odbc:mydn1"; //JTextField command =new JTextField(); JLabel lb =new JLabel("Total account opening in a session"); JButton ex =new JButton("Exit"); JButton ds=new JButton("Load Report"); JLabel bl1=new JLabel(" "); JLabel bl2=new JLabel(" "); JLabel bl3=new JLabel(" "); ResultsModel model =new ResultsModel(); JTextArea status=new JTextArea(5,1); JScrollPane resultspane; Connection connection; Statement statement; public RP5() { super("Report 5 of "); setDefaultCloseOperation(DISPOSE_ON_CLOSE); Box box =Box.createHorizontalBox(); //getContentPane().add(lb,BorderLayout.NORTH); //getContentPane().add(ds,BorderLayout.NORTH); //getContentPane().add(ex,BorderLayout.NORTH); box.add(bl1); box.add(lb); box.add(bl2); box.add(ds); box.add(bl3); box.add(ex); add(box,BorderLayout.NORTH); status.setLineWrap(true); status.setWrapStyleWord(true); Page 143
En.Roll-063514872 Appin Technology Lab getContentPane().add(status,BorderLayout.SOUTH); ds.addActionListener(this); // clquery.addActionListener(this); ex.addActionListener(this); try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); connection =DriverManager.getConnection(url,"system","oracle"); statement =connection.createStatement(); // ResultsModel model=new ResultsModel(); JTable table = new JTable(model); table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); resultspane = new JScrollPane(table); getContentPane().add(resultspane,BorderLayout.CENTER); } catch(ClassNotFoundException en) { System.err.println(en); } catch(SQLException sqle) { System.err.println(sqle); } getContentPane().setBackground(Color.cyan); setBounds(0,0,400,300); pack(); setVisible(true); } // construcor closed public void executesql() { String query="select *from customer_detail"; if(query==null || query.length()==0) { return; } try { model.setResultSet(statement.executeQuery(query)); status.setText("Resultset has " + model.getRowCount() + "rows."); } catch(SQLException sqle) { status.setText(sqle.getMessage()); } }
Page 144
En.Roll-063514872 Appin Technology Lab public void actionPerformed(ActionEvent e) { Object source=e.getSource(); if(source==ds) { executesql(); } else if(source==ex) { dispose(); } } class ResultsModel extends AbstractTableModel { private Vector<String[]> dataRows=new Vector<String[]>(); private String[] columnNames =new String[0]; public void setResultSet(ResultSet results) { try { ResultSetMetaData metadata=results.getMetaData(); int columns=metadata.getColumnCount(); columnNames=new String[columns]; for(int i=0;i<columns;i++) { columnNames[i]=metadata.getColumnLabel(i+1); } dataRows.clear(); String[] rowData; while(results.next()) { rowData =new String[columns]; for(int i=0;i<columns;i++) { rowData[i]=results.getString(i+1); } dataRows.addElement(rowData); } fireTableChanged(null); } catch(SQLException sqle) { System.err.println(sqle); } } public int getColumnCount() { return columnNames.length; } Page 145
En.Roll-063514872 Appin Technology Lab public int getRowCount() { return dataRows ==null ? 0 : dataRows.size(); } public String getValueAt(int row,int column) { return dataRows.elementAt(row)[column]; } public String getColumnName(int column) { return columnNames[column] == null ? "No columnNames[column]; }}} Report 6 public class RP6 extends JFrame implements ActionListener { String url="jdbc:odbc:mydn1"; //JTextField command =new JTextField(); JLabel lb =new JLabel("Total closed account "); JButton ex =new JButton("Exit"); JButton ds=new JButton("Load Report"); JLabel bl1=new JLabel(" "); JLabel bl2=new JLabel(" "); JLabel bl3=new JLabel(" "); ResultsModel model =new ResultsModel(); JTextArea status=new JTextArea(5,1); JScrollPane resultspane; Connection connection; Statement statement; public RP6() { super("Report 6 of "); setDefaultCloseOperation(DISPOSE_ON_CLOSE); Box box =Box.createHorizontalBox(); //getContentPane().add(lb,BorderLayout.NORTH); //getContentPane().add(ds,BorderLayout.NORTH); //getContentPane().add(ex,BorderLayout.NORTH); box.add(bl1); box.add(lb); box.add(bl2); box.add(ds); box.add(bl3); box.add(ex); add(box,BorderLayout.NORTH); status.setLineWrap(true); status.setWrapStyleWord(true); getContentPane().add(status,BorderLayout.SOUTH); Page 146
Name"
ds.addActionListener(this); // clquery.addActionListener(this); ex.addActionListener(this); try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); connection =DriverManager.getConnection(url,"system","oracle"); statement =connection.createStatement(); // ResultsModel model=new ResultsModel(); JTable table = new JTable(model); table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); resultspane = new JScrollPane(table); getContentPane().add(resultspane,BorderLayout.CENTER); } catch(ClassNotFoundException en) { System.err.println(en); } catch(SQLException sqle) { System.err.println(sqle); } getContentPane().setBackground(Color.cyan); setBounds(0,0,400,300); pack(); setVisible(true); } // construcor closed public void executesql() { String query="select *from Account_close"; if(query==null || query.length()==0) { return; } try { model.setResultSet(statement.executeQuery(query)); status.setText("Resultset has " + model.getRowCount() + "rows."); } catch(SQLException sqle) { status.setText(sqle.getMessage()); } }
En.Roll-063514872 Appin Technology Lab { Object source=e.getSource(); if(source==ds) { executesql(); } else if(source==ex) { dispose(); } } class ResultsModel extends AbstractTableModel { private Vector<String[]> dataRows=new Vector<String[]>(); private String[] columnNames =new String[0]; public void setResultSet(ResultSet results) { try { ResultSetMetaData metadata=results.getMetaData(); int columns=metadata.getColumnCount(); columnNames=new String[columns]; for(int i=0;i<columns;i++) { columnNames[i]=metadata.getColumnLabel(i+1); } dataRows.clear(); String[] rowData; while(results.next()) { rowData =new String[columns]; for(int i=0;i<columns;i++) { rowData[i]=results.getString(i+1); } dataRows.addElement(rowData); } fireTableChanged(null); } catch(SQLException sqle) { System.err.println(sqle); } } public int getColumnCount() { return columnNames.length; Page 148
En.Roll-063514872 Appin Technology Lab } public int getRowCount() { return dataRows ==null ? 0 : dataRows.size(); } public String getValueAt(int row,int column) { return dataRows.elementAt(row)[column]; } public String getColumnName(int column) { return columnNames[column] == null ? "No columnNames[column]; }}} Report 7 public class RP7 extends JFrame implements ActionListener { String url="jdbc:odbc:mydn1"; //JTextField command =new JTextField(); JLabel lb =new JLabel("Total Transfered account "); JButton ex =new JButton("Exit"); JButton ds=new JButton("Load Report"); JLabel bl1=new JLabel(" "); JLabel bl2=new JLabel(" "); JLabel bl3=new JLabel(" "); ResultsModel model =new ResultsModel(); JTextArea status=new JTextArea(5,1); JScrollPane resultspane; Connection connection; Statement statement; public RP7() { super("Report 7 of "); setDefaultCloseOperation(DISPOSE_ON_CLOSE); Box box =Box.createHorizontalBox(); //getContentPane().add(lb,BorderLayout.NORTH); //getContentPane().add(ds,BorderLayout.NORTH); //getContentPane().add(ex,BorderLayout.NORTH); box.add(bl1); box.add(lb); box.add(bl2); box.add(ds); box.add(bl3); box.add(ex); add(box,BorderLayout.NORTH); status.setLineWrap(true); status.setWrapStyleWord(true); getContentPane().add(status,BorderLayout.SOUTH); ds.addActionListener(this); Page 149
Name"
En.Roll-063514872 Appin Technology Lab // clquery.addActionListener(this); ex.addActionListener(this); try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); connection =DriverManager.getConnection(url,"system","oracle"); statement =connection.createStatement(); // ResultsModel model=new ResultsModel(); JTable table = new JTable(model); table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); resultspane = new JScrollPane(table); getContentPane().add(resultspane,BorderLayout.CENTER); } catch(ClassNotFoundException en) { System.err.println(en); } catch(SQLException sqle) { System.err.println(sqle); } getContentPane().setBackground(Color.cyan); setBounds(0,0,400,300); pack(); setVisible(true); } // construcor closed public void executesql() { String query="select *from account_transfer"; if(query==null || query.length()==0) { return; } try { model.setResultSet(statement.executeQuery(query)); status.setText("Resultset has " + model.getRowCount() + "rows."); } catch(SQLException sqle) { status.setText(sqle.getMessage()); } }
En.Roll-063514872 Appin Technology Lab if(source==ds) { executesql(); } else if(source==ex) { dispose(); } } class ResultsModel extends AbstractTableModel { private Vector<String[]> dataRows=new Vector<String[]>(); private String[] columnNames =new String[0]; public void setResultSet(ResultSet results) { try { ResultSetMetaData metadata=results.getMetaData(); int columns=metadata.getColumnCount(); columnNames=new String[columns]; for(int i=0;i<columns;i++) { columnNames[i]=metadata.getColumnLabel(i+1); } dataRows.clear(); String[] rowData; while(results.next()) { rowData =new String[columns]; for(int i=0;i<columns;i++) { rowData[i]=results.getString(i+1); } dataRows.addElement(rowData); } fireTableChanged(null); } catch(SQLException sqle) { System.err.println(sqle); } } public int getColumnCount() { return columnNames.length; } public int getRowCount() Page 151
En.Roll-063514872 Appin Technology Lab { return dataRows ==null ? 0 : dataRows.size(); } public String getValueAt(int row,int column) { return dataRows.elementAt(row)[column]; } public String getColumnName(int column) { return columnNames[column] == null columnNames[column]; }}} Report 8 package pg; import java.sql.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; import javax.swing.JTable; import java.lang.String; import java.io.*; import java.lang.*; import java.util.Vector; import javax.swing.table.AbstractTableModel;
"No
Name"
public class RP8 extends JFrame implements ActionListener { String url="jdbc:odbc:mydn1"; //JTextField command =new JTextField(); JLabel lb =new JLabel("Total matured Fixed account "); JButton ex =new JButton("Exit"); JButton ds=new JButton("Load Report"); JLabel bl1=new JLabel(" "); JLabel bl2=new JLabel(" "); JLabel bl3=new JLabel(" "); ResultsModel model =new ResultsModel(); JTextArea status=new JTextArea(5,1); JScrollPane resultspane; Connection connection; Statement statement; public RP8() { super("Report 8 of "); setDefaultCloseOperation(DISPOSE_ON_CLOSE); Box box =Box.createHorizontalBox(); //getContentPane().add(lb,BorderLayout.NORTH); //getContentPane().add(ds,BorderLayout.NORTH); //getContentPane().add(ex,BorderLayout.NORTH); box.add(bl1); Page 152
En.Roll-063514872 Appin Technology Lab box.add(lb); box.add(bl2); box.add(ds); box.add(bl3); box.add(ex); add(box,BorderLayout.NORTH); status.setLineWrap(true); status.setWrapStyleWord(true); getContentPane().add(status,BorderLayout.SOUTH); ds.addActionListener(this); // clquery.addActionListener(this); ex.addActionListener(this); try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); connection =DriverManager.getConnection(url,"system","oracle"); statement =connection.createStatement(); // ResultsModel model=new ResultsModel(); JTable table = new JTable(model); table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); resultspane = new JScrollPane(table); getContentPane().add(resultspane,BorderLayout.CENTER); } catch(ClassNotFoundException en) { System.err.println(en); } catch(SQLException sqle) { System.err.println(sqle); } getContentPane().setBackground(Color.cyan); setBounds(0,0,400,300); pack(); setVisible(true); } // construcor closed public void executesql() { String query="select *from customer_detail"; if(query==null || query.length()==0) { return; } try { model.setResultSet(statement.executeQuery(query)); Page 153
En.Roll-063514872 Appin Technology Lab status.setText("Resultset has " + model.getRowCount() + "rows."); } catch(SQLException sqle) { status.setText(sqle.getMessage()); } } public void actionPerformed(ActionEvent e) { Object source=e.getSource(); if(source==ds) { executesql(); } else if(source==ex) { dispose(); } } class ResultsModel extends AbstractTableModel { private Vector<String[]> dataRows=new Vector<String[]>(); private String[] columnNames =new String[0]; public void setResultSet(ResultSet results) { try { ResultSetMetaData metadata=results.getMetaData(); int columns=metadata.getColumnCount(); columnNames=new String[columns]; for(int i=0;i<columns;i++) { columnNames[i]=metadata.getColumnLabel(i+1); } dataRows.clear(); String[] rowData; while(results.next()) { rowData =new String[columns]; for(int i=0;i<columns;i++) { rowData[i]=results.getString(i+1); } dataRows.addElement(rowData); } fireTableChanged(null); } catch(SQLException sqle) { Page 154
En.Roll-063514872 Appin Technology Lab System.err.println(sqle); } } public int getColumnCount() { return columnNames.length; } public int getRowCount() { return dataRows ==null ? 0 : dataRows.size(); } public String getValueAt(int row,int column) { return dataRows.elementAt(row)[column]; } public String getColumnName(int column) { return columnNames[column] == null columnNames[column]; }}} Report 9 package pg; import java.sql.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; import javax.swing.JTable; import java.lang.String; import java.io.*; import java.lang.*; import java.util.Vector; import javax.swing.table.AbstractTableModel;
"No
Name"
public class RP9 extends JFrame implements ActionListener { String url="jdbc:odbc:mydn1"; //JTextField command =new JTextField(); JLabel lb =new JLabel("Total fixed account above 50 thousands "); JButton ex =new JButton("Exit"); JButton ds=new JButton("Load Report"); JLabel bl1=new JLabel(" "); JLabel bl2=new JLabel(" "); JLabel bl3=new JLabel(" "); ResultsModel model =new ResultsModel(); JTextArea status=new JTextArea(5,1); JScrollPane resultspane; Connection connection; Statement statement; public RP9() Page 155
En.Roll-063514872 Appin Technology Lab { super("Report 9 of "); setDefaultCloseOperation(DISPOSE_ON_CLOSE); Box box =Box.createHorizontalBox(); //getContentPane().add(lb,BorderLayout.NORTH); //getContentPane().add(ds,BorderLayout.NORTH); //getContentPane().add(ex,BorderLayout.NORTH); box.add(bl1); box.add(lb); box.add(bl2); box.add(ds); box.add(bl3); box.add(ex); add(box,BorderLayout.NORTH); status.setLineWrap(true); status.setWrapStyleWord(true); getContentPane().add(status,BorderLayout.SOUTH); ds.addActionListener(this); // clquery.addActionListener(this); ex.addActionListener(this); try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); connection =DriverManager.getConnection(url,"system","oracle"); statement =connection.createStatement(); // ResultsModel model=new ResultsModel(); JTable table = new JTable(model); table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); resultspane = new JScrollPane(table); getContentPane().add(resultspane,BorderLayout.CENTER); } catch(ClassNotFoundException en) { System.err.println(en); } catch(SQLException sqle) { System.err.println(sqle); } getContentPane().setBackground(Color.cyan); setBounds(0,0,400,300); pack(); setVisible(true); } // construcor closed public void executesql() { Page 156
En.Roll-063514872 Appin Technology Lab String query="select *from fixed_account where fixedamount > 50000 "; if(query==null || query.length()==0) { return; } try { model.setResultSet(statement.executeQuery(query)); status.setText("Resultset has " + model.getRowCount() + "rows."); } catch(SQLException sqle) { status.setText(sqle.getMessage()); } } public void actionPerformed(ActionEvent e) { Object source=e.getSource(); if(source==ds) { executesql(); } else if(source==ex) { dispose(); } } class ResultsModel extends AbstractTableModel { private Vector<String[]> dataRows=new Vector<String[]>(); private String[] columnNames =new String[0]; public void setResultSet(ResultSet results) { try { ResultSetMetaData metadata=results.getMetaData(); int columns=metadata.getColumnCount(); columnNames=new String[columns]; for(int i=0;i<columns;i++) { columnNames[i]=metadata.getColumnLabel(i+1); } dataRows.clear(); String[] rowData; while(results.next()) { rowData =new String[columns]; for(int i=0;i<columns;i++) { Page 157
En.Roll-063514872 Appin Technology Lab rowData[i]=results.getString(i+1); } dataRows.addElement(rowData); } fireTableChanged(null); } catch(SQLException sqle) { System.err.println(sqle); } } public int getColumnCount() { return columnNames.length; } public int getRowCount() { return dataRows ==null ? 0 : dataRows.size(); } public String getValueAt(int row,int column) { return dataRows.elementAt(row)[column]; } public String getColumnName(int column) { return columnNames[column] == null columnNames[column]; }}} DataBase Code Trigger For Transaction
"No
Name"
create or replace trigger acn_up after insert or update on transaction for each row declare acd varchar2(10); tamt number(10); tp varchar2(10); amt number(10); acamt number(10); acnm transaction.account_name%type; begin acd := :new.account_id; amt := :new.amount; tp := :new.transaction_tp; acnm := :new.account_name; if tp ='deposit' then if acnm ='recurring a/c' then update recurring_account set balance_amount=balance_amount+ amt where account_id =acd; else if acnm ='fixed a/c' then Page 158
En.Roll-063514872 Appin Technology Lab update fixed_account set fixedamount = fixedamount + amt where account_id =acd; else if acnm ='current a/c' then update current_account set balance_amount=balance_amount+ amt where account_id =acd; else if acnm ='saving a/c' then update saving_account set balance_amount=balance_amount+ amt where account_id = acd; end if; end if; end if; end if; else if acnm='recurring a/c' then select balance_amount into acamt from recurring_account; if amt<= acamt then update recurring_account set balance_amount = balance_amountacamt where account_id =acd; end if; else if acnm='fixed a/c' then select fixedamount into acamt from fixed_account; if amt<= acamt then update fixed_account set fixedamount =fixedamount-amt where account_id =acd; end if; else if acnm='saving a/c' then select balance_amount into acamt from saving_account; if amt<=acamt then update saving_account set balance_amount=balance_amount-amt where account_id =acd; end if; else if acnm='current a/c' then select balance_amount into acamt from current_account; if amt<=acamt then update saving_account set balance_amount=balance_amount-amt where account_id =acd; end if; end if; end if; end if; end if; end if; end; / Page 159
En.Roll-063514872 Appin Technology Lab Trigger for Customer_detail create or replace trigger cdgen before insert on customer_detail for each row declare pk varchar2(8); begin select lpad(to_char(cdseq.nextval),3,'0') into pk from dual; :new.ln_code:='C'||pk; end; / / Trigger for Transation Insert create or replace trigger ledg_upd before insert on Transaction for each row declare ac varchar2(8); ln varchar2(8); m_ln_amt number(12,2); desp_amt number(12,2); temp number(12,2); begin ac:=:new.acc_code; ln:=:new.ln_code; m_ln_amt:=:new.ln_amt; desp_amt:=:new.pay_amt; select recover_amt into temp from Ledger where acc_code = ac; temp:= temp+desp_amt; insert into Ledger values('ac','ln',m_ln_amt,temp); end; / Trigger for generate sequence create Sequence ln_seq increment by 1 start with 1 / Trigger for lookup Table create or replace trigger gd_lookup before insert on gurrantor_detail for each row declare pk1 varchar2(8); npk varchar2(8); begin begin select pk into pk1 from glookup; Page 160
En.Roll-063514872 Appin Technology Lab Exception when no_data_found then pk1:='Gd0001'; End; :new.gurrantor_id:=pk1; npk:= to_number(substr(pk1,3,5))+1; pk1:='Gd'||lpad(npk,4,'0'); If pk1='Gd0002' then insert into glookup values(pk1); Else Update glookup set pk = pk1; End If; End; / Trigger for Primary key generate create or replace trigger pk_gen_lookup before insert on account_detail for each row declare pk1 varchar2(8); npk varchar2(8); begin begin select pk into pk1 from lookup; Exception when no_data_found then pk1:='Ac0001'; End; :new.account_id:=pk1; npk:= to_number(substr(pk1,3,5))+1; pk1:='Ac'||lpad(npk,4,'0'); If pk1='Ac0002' then insert into lookup values(pk1); Else Update lookup set pk = pk1; End If; End; / Oracle Coding
CREATE TABLE ACCOUNT_CLOSE ( "ACCOUNT_ID" VARCHAR2(20) NOT NULL ENABLE, "ACCOUNT_TYPE" VARCHAR2(50) NOT NULL ENABLE, "CLOSED_DATE" DATE NOT NULL ENABLE, "AMOUNT" NUMBER NOT NULL ENABLE, "TDATE" DATE NOT NULL ENABLE ); CREATE TABLE ACCOUNT_DETAIL ( "ACCOUNT_ID" VARCHAR2(20) NOT NULL ENABLE, "CUSTOMER_ID" VARCHAR2(20) NOT NULL ENABLE, "OPEN_DATE" DATE NOT NULL ENABLE, "ACCOUNT_NAME" VARCHAR2(20) NOT NULL ENABLE
Page 161
Page 162
) CREATE TABLE BALANCE_SHEET ( "BDATE" DATE NOT NULL ENABLE, "SAVING" NUMBER NOT NULL ENABLE, "RECURRING" NUMBER NOT NULL ENABLE, "CURRENT1" NUMBER NOT NULL ENABLE, "FIXED" NUMBER NOT NULL ENABLE, "TOTAL" NUMBER NOT NULL ENABLE, "CASH_IN_HAND" NUMBER NOT NULL ENABLE, "AS_LOANS" NUMBER NOT NULL ENABLE, "HOFFICE" NUMBER NOT NULL ENABLE, "GRAND_TOTAL" NUMBER NOT NULL ENABLE, "REMARKS" VARCHAR2(20) NOT NULL ENABLE ); CREATE TABLE RECCURING_ACCOUNT ( "ACCOUNT_ID" VARCHAR2(20) NOT NULL ENABLE, "PERIOD" VARCHAR2(50) NOT NULL ENABLE, "TERM_AMOUNT" NUMBER NOT NULL ENABLE, "TDATE" DATE NOT NULL ENABLE, "BALANCE_AMOUNT" NUMBER NOT NULL ENABLE ); CREATE TABLE FIXED_ACCOUNT ( "ACCOUNT_ID" VARCHAR2(20) NOT NULL ENABLE, "FIXEDTERM" VARCHAR2(50) NOT NULL ENABLE, "FIXEDAMOUNT" NUMBER NOT NULL ENABLE, "FIXEDDATE" DATE NOT NULL ENABLE, "INTEREST" NUMBER NOT NULL ENABLE, "MATURITYDATE" DATE NOT NULL ENABLE, "MATURITYAMOUNT" NUMBER NOT NULL ENABLE ); CREATE TABLE SAVING_ACCOUNT ( "ACCOUNT_ID" VARCHAR2(20) NOT NULL ENABLE, "TDATE" DATE NOT NULL ENABLE, "BALANCE_AMOUNT" NUMBER NOT NULL ENABLE );
4.2.1 CODE EFFICIENCY Every step has been considered in order to achieve the code efficiency.Java has been used in order to achieve the high degree of optimality of code. It is an object oriented GUI tool that provides the facility of the procedural programming in PL/SQL as well as supports non-procedural like SQL. SQL drastically reduces the procedural steps to perform a task. SQL meets only the target (what has to be done) to be specified and it does not need the steps (how) to be followed to achieve the target. The data retrieved is done by SQL engine of the RDBMS, which is very efficient, and it increases the efficiency of the application as well. As far as user interface design of the application is concerned, object oriented paradigm has been applied which reduces the lengthy codification and achieve the inheritance, which further enhance the code efficiency.
Page 163
Page 164
En.Roll-063514872 Appin Technology Lab (a).Guarantee that all independent paths within a module have been exercised at least once. (b).Exercise all logical decisions on their true and false sides. (c)Exercise internal data structures to ensure their validity. A reasonable question might be posed at this juncture. Why spend time and energy worrying about (and testing) logical minutiae when we might better expend effort ensuring that program requirements have been met? State another way, why dont we spend all of our energy on black box tests? Logic errors and incorrect assumptions are inversely proportional to the probability that a program path will be executed. Errors tend to creep into our work when we design and implement function, conditions, or control that is out of the mainstream. We often believe that a logical path is not likely to be executed when, in fact, may be executed on a regular basis. Typographical errors are random. When a program is translated into programming language source code, it is likely that some typing errors will occur. Many will be uncovered by syntax and type checking mechanisms, but others may go undetected until testing begins. White-Box Testing is far more likely to uncover them. 4.3.2 Black- Box Testing:-Black Box testing, also called Behavioral Testing, focuses on the functional requirements of the software. That is, black box testing enables the software engineer to derive sets of input conditions that will fully exercise all functional requirements for a program. Black Box testing is not an alternative to white-box techniques. Rather, it is a complementary approach that is likely to uncover a different class of errors than white-box methods. Black Box testing attempts to find errors in the following categories:(a)Incorrect or Missing function. (b)Interface errors. (c)Errors in data structures or external data base access. (d)Behavior or performance errors, and (e)Initialization and termination errors. Unlike White-Box testing, which is performed early in the testing process, black box testing tends to be applied during later stages of testing. Because black box testing purposely disregards control structure, attention is focused on the information domain. Tests are designed to answer the following questions:(a)How is functional validity tested? (b)How is system behavior and performance tested? (c)What classes of input will make good test cases? (d)Is the system particularly sensitive to certain input values? (e)How are the boundaries of a data class isolated? (f)What data rates and data volume can the system tolerate? (e)What effect will specific combinations of data have on system operation? 4.3.3 Testing Strategies Page 165
En.Roll-063514872 Appin Technology Lab System engineering defines the role of software and leads to software requirements analysis where the information domain, function, behavior, performance, constraints, and validation criteria for software are established. Moving inward along the spiral, we come to design and finally to coding. To develop computer software, we spiral inward along streamlines that decrease the level of abstraction on each turn. A strategy for software testing may also be viewed in the context of the spiral (shown in figure):Unit testing: - Unit testing begins at the vertex of the spiral and concentrates on each unit (i.e. component) of the software as implemented in source code. It focuses verification effort on the smallest unit of software design the software component or module. The unit test is white-box oriented, and the step can be conducted in parallel for multiple components. Unit Test Considerations: y Interface y Local data structures y Boundary conditions y Independent paths y Error handling paths Integration Testing: - In these testing strategies it focuses is on design and construction of the software architecture. Integration testing is a systematic technique for construction the program structure while at the same time conducting tests to uncover errors associated with interfacing. The objective is to take unit tested components and build a program structure that has been dictated by design. Components of Integration Testing: (a)Top-down Integration: - Top-down integration testing is an incremental approach to construction of program structure. Modules are integrated by moving downward through the control hierarchy, beginning with the main control (main program). Modules subordinate (and ultimately subordinate) to the main control module are incorporated into the structure in either a depthfirst or breadth-first manner. (b) Bottom-up Integration: Bottom-up integration testing, as its name implies, begins construction and testing with atomic modules (i.e. components at the lowest levels in the program structure). Because components are integrated from the bottom up, processing required for components subordinate to a given level is always available and the need for stubs is eliminated. (c) Regression Testing: It is the re-execution of some subset of tests that have already been conducted to ensure that changes have not propagated unintended side effects. Smoke Testing: Smoke testing is an integration testing approach that is commonly used when shrink-wrapped software products are being developed. It is designed as pacing mechanism for time-critical projects, allowing the software team to assess its project on a frequent basis. Validation Testing: Validation can be defined in many ways but a simple definition is that validation succeeds when software functions in a manner that can be reasonably expected by the customer. Page 166
En.Roll-063514872 Appin Technology Lab (A) Validation Test Criteria: Two possible Conditions exists:(a)The function or performance characteristics conform to specification and are accepted (b)A deviation from specification is uncovered and a deficiency list is created. It is often necessary to negotiate with the customer to establish a method for resolving deficiencies. (B) Configuration Review: An important element of the validation process is a configuration review. The configuration review, sometimes called an audit. (C) Alpha Testing: The alpha test is conducted at the developers site by a customer. Alpha tests are conducted in controlled environments. (D) Beta Testing: The beta test is conducted at one or more customer sites by the end-user of the Software. The beta test is a live application of the software in an environment that cannot be controlled by the developer. System Testing: In System Testing the software and other elements are tested as a whole. System testing is actually a series of different tests whose primary purpose is to fully exercise the computer-based system. Although each test has a different purpose, all work to verify the system elements have been properly integrated and perform allocated functions. To test computer software, we spiral out along streamlines that broaden the scope of testing with each turn.
Page 167
Through study has been done to know the working of DAILY BANKING SYSTEM and the sample data collected. The executive bodies as well as general body members have been consulted to get the sample test data. Apart from this some of beneficiary and donators have been interviewed to get the required information. I have visited some of the project sites where this organization is working to collect the sample data. The data, thus, collected is entered into the system and processed. The processed information in the form of MIS Report is provided to the members of executive body. Proper modification has been done in the application as per the modification in the report processed and the suggestion of members. The process has been repeated several times till the members of executive body are fully satisfied. The test case or test data has been shown in the forms of MIS Report. It can be seen in the annexure enclosed.First of all the application has been thoroughly tested by applying the test data. After that it got approved from the executive body to be implemented. Users operational manual has been prepared and proper training to the users has been provided. Once the users well acquainted with the new computerized system it was installed and operationalised along with the existing manual system. Both the computerized system and the manual system will run side by side for at least six months. During this period if any nonconformity will be found out, that will be fully solved and incorporated. If the new system does not contradict the existing system can be fully adopted. After system task will not over a close eye site will be kept on the functioning of the new system. If any type of problem will find out that will be properly eradicated. This type of software maintenance will be done or not less than one hour after complete operationalization of the system. During this period any type of maintenance needed or required by the management will be done. The organization will depute a technical person to manage the new system and to operate smoothly.
Page 168
Page 169
Password Screen
Page 170
Page 171
Page 172
Page 173
Page 174
Page 175
Page 176
Page 177
Page 178
Page 179
Page 180
Page 181
Page 182
Page 183
Page 184
Page 185
Page 186
Page 187
Page 188
Page 189
Page 190
Page 191
Page 192
Page 193
There are several aspects of the system security: 11.1Hardware Security:- Only limited and authenticated person will be allowed to access the system. The system administrator will take care of all these things. 11.2Software Security: -Two level of software security can be provided, which is the operating system level and the database level. Every user will be provided unique user id and confidential password in order to log into the system. Windows xp server operating system has been adopted in the proposed system, which is highly secured and does not allow unauthorized users. Again it restricts the function of users. By granting them proper access control mechanism. Similarly the Oracle database server can provide an additional level of software or user security also so that unauthorized user cant access the database. The authorized user can access only that part of the database for which they are granted access privileges Application Level Security: -User authentication and validation have also been defined additionally in the application level. The users have been provided user name and password facility. The users have been categorized into administrator officer assistant and operator. The role of each type of user has been defined and fixed and user cant violate these security rules. Data Level Security:-Data validation rules and constraints have been properly defined both at the database level and the application level. Due to this only valid data can be entered. Apart from this, background audit mechanisms have been properly defined so as to track all the activities related to data management. For example, data insertion is recorded along with the user name and date & time of insert. Similarly data updating and deletion are also recorded with the user name and date & time in effect. A separate copy of the original data will be stored in a separate audit table during its updating & deletion. This is done along with the recording of user performing the pupation & deletion and date & time. From this audit table the original data can be recorded as and when required and user can be made responsible. The application also keeps tracks of all the users activities. Hence the data itself is completelysecured.
Page 194
Software cost and effort estimation will never been exact science. Too many variables-Human, Technical, Environmental, and Political can affect the ultimate cost of software and effort applied to develop it. However, software project estimation can be transformed from a black art to a series of systematic steps that provide estimates with acceptable risk. To achieve reliable cost and effort estimates, a number of options arise: (a)Delay estimation until late in the project (obviously, we can achieve 100% accurate estimates after the project is complete!). (b)Base estimates on similar projects that have already been completed. (c)Use relatively simple decomposition techniques to generate project cost and effort estimates. (d)Use one or more empirical models for software cost and effort estimation. Unfortunately, the first option, however attractive, not practical. Cost estimates must be provided Up front. The second option can work reasonable well, if the current project is quite similar to past efforts and other influences (e.g. the customer, business conditions, the SEE, deadlines) are equivalent. Unfortunately, past experience has not always been a good indicator of future results. The remaining options are viable approaches to software project estimation. Ideally, the techniques noted for each option should be applied in tandem; each used as a cross-check for the other. Though we can estimate a project on the following basis: (a)Problem Based Estimation. (b)Line of Code (LOC)-Based Estimation. (c)Function Point Based Estimation. (d)Process-Based Estimation. Estimation Table For The LOC Method: FUNCTION User Interface and Control Facility (UICF) Two-Dimensional Geometric Analysis (2DGA) Three-Dimensional Geometric Analysis (3DGA) Database Management (DBM) Computer Graphics Display Facilities (CGDF) Peripheral Control Function (PCF) Design Analysis Modules (DAM) Estimated Line of Codes ESTIMATED LOC 2300 5300 6800 3350 4950 2100 8400 33200
Page 195
En.Roll-063514872 Appin Technology Lab Estimation Table for The FP-Based Method Measurement Parameter Number of User Inputs Number of User Outputs Number of User enquiries Number of Files Number of External Interfaces Count Count Simple Average Complex 24 16 22 4 2 20 12 16 4 2 24 15 22 4 2 30 22 28 5 3 Weight FP Count 4 97 5 78 5 88 10 7 42 15 320
Processed-Based Estimation Table. Activity Task Function UICF 2DGA 3DGA CGDF DBM PCF DAM 0.50 0.75 0.50 0.50 0.50 0.25 0.50 2.50 4.00 4.00 3.00 3.00 2.00 2.00 0.40 0.60 1.00 1.00 0.75 0.50 0.50 5.00 2.00 3.00 1.50 1.50 1.50 2.00 N/A N/A N/A N/A N/A N/A N/A 8.40 7.35 8.50 6.00 5.75 4.25 5.00 CC Planning Risk Engineering Construction CE Analysis Release Analysis Design Code Test Totals
CC = Customer Communication. CE = Customer Evaluation. The COCOMO Model (Constructive Cost model) is one of the most widely used and discussed software cost estimation model in the software industry. It has evolved into a more comprehensive estimation model, COCOMO II. Like its predecessor, COCOMO II is actually a hierarchy of estimation models that address the following areas. y y y Application composition model. Early design stage model. Post architecture stage model.
Page 196
En.Roll-063514872 Appin Technology Lab Like all estimation models for software, the COCOMO II models require sizing information. Three different sizing options are available as part of the model hierarchy: Object Points. Function Points Lines of Source Codes. Though, simply we can calculate the cost of this project as: Development Cost = Project Duration * Hourly Development Rate = 200 Hrs. * 200 =40,000 A. B. C.
En.Roll-063514872 Appin Technology Lab between tasks and projects with respect to personal scheduling and time constraints of critical . Methology Of Peart/cpm Network The methodology involved in applying PERT for any project may be split into the following stages: Project Planning (Drawing the network): The purpose of this is to identify all the important events which is essential for completion as well as making up of project and their dependence upon one another is shown explicitly in the form of a network. Time Estimation (Network Analysis): Estimates of the time required to perform each of the network activity are made, the estimates are based upon manpower and equipment availability and certain assumptions that may have been made in planning the project. By incorporating the time required for completing each of the activity of the network, the project duration as well as the critically of the activities are found. At this stage it is also possible to compute the probability of completing the project or a part of the project by a specified time.
Page 198
2 4
E D
I
2
C
2
J
2
K
2
L
2
2+
A
Work Begins
Page 199
Some of the five tasks overlapped each other or parallel to some task to reduce time.
Page 200
Work Task
Week 1
Week 2
Week 3
Week 4
Week 5
1.System Analysis Overview Existing System Preliminary Investigation Identification of Need Proposed Computer Based System 2.Feasibility study Technical Feasibility Economical Feasibility Operation Feasibility 3.System Design User Interface Design Data Base Design Coding the Application 4.Testing Unit Testing Acceptance Testing 5.Implementation Training personal Conversion Procedure Post Implementation Review
Page 201
1. Press Oracle: Oracle Complete Reference Book. 2. Bayross, Ivan: Introduction to Oracle-8.0, BPB Publication, New Delhi 3. Bayross, Ivan: Sql/Pl-Sql. 4. Pandey Desh: Oracle system. 5. Wrox Java Books 6. Raja Raman: System Analysis and Design. 7. Canter: System Analysis and Design. 8. Award: System Analysis and Design.
Web-sites: 1. www.oracle.com
Page 202
7. GLOSSORY
y y y y y y y y y y y y y y y y y y y y y y IT Information Technology PERT- Program Evaluation & Review Technique GANTTAC- Air-condition WORM- Write Once Read Many SVGA- Super Video-Graphic Adapter GB- Giga Byte MB- Mega Byte RAM- Random Access Memory NT- New Technology SQL- Structured Query Language PL-Programming Language CPM-Critical Path Method GUI-Graphical User Interface LOC-Line of Code COCOMO-Constructive Cost Model MBPS-Mega Byte Per Second UTP-Unshielded Twisted Pair LAN-Local Area Network TCP-Transmission Control Protocol IP-Internet Protocol NIC-Network Interface Card
Page 203