Fixed Assets Management System Abstract The present project report paper introduces java Desktop Application called “Fi
Views 127 Downloads 2 File size 1015KB
Fixed Assets Management System
Abstract The present project report paper introduces java Desktop Application called “Fixed Assets Manager” that I have developed for Accounting Department of an organization. This work represents a design and development process of the system using Java Programming Language with NetBeans Platform. The main objective is to design a computerized system for the Accounting Department with the purpose of speeding up the process which might be very slow in paper based system. The system provides general functions that are performed during Accounting activities, such as storing and retrieving information about fixed assets along with updating editing and other activities related to managing assets in an organization.
TABLE OF CONTENTS
1.0 Statement of work……………………………………………………… …………..…5 1.1 Proposed System………………… ………………………………………………… 5 1.2 Scope of the System……………… ……………………………………………... 5 2.0 Components Table……………………………………………………………………….6 3.0 System Analysis……...…………………..……………………………………………….7 3.1 Task Analysis……...…………………………………………………………………7 3.2 System Description ….…………………………………………………...………….8 4.0 Design Rationale………………………………………………………………………….8 5.0 Usability Evaluation ……………………………………...……………………………10
6.0 Appendix……………………………….…………………………………………..……11 6.1 Screenshots….……………………………..………………………………….……11 6.2 Setup Guide………….………………………………..……………….……….…..14 6.3 Annotated Source…………………………………………………………………..15
7.0 References……………………………………………………………………………….28
\
Page 2
1.0 Statement of Work 1.1 Proposed System In today`s business world, almost all kinds of business organizations rely on computerized systems to perform their operational, decision-making, and other management related activities. This paper introduces Java Desktop Application called “Fixed Assets Manager”(FAM) that can be one possible solution to business organization`s accounting department, in terms of making fixed assets management process quick, easy and reliable. This paper consists of demonstration of all the phases of the development lifecycle of my project, in particular, System investigation section focuses on discussion on possible problems of the paper-based system along with opportunities of the organization with consideration of business objectives and I will talk about the benefits that can be achieved by computerizing accounting process. The next section which comes with name System Analysis includes studies of paperbased system and its work process as well as strengths and opportunities for the intended system. In System Design section I will be discussing how I designed the application including design specifications and procedures that are performed while using the program. Next sections point up operational instructions and assistance for users, and boundaries along with foremost code listing. My report will end with the final phase where I will sum up and give some recommendations for further development of the system. 1.2 Scope of the System The scope of the proposed application is stated below: Supporting fixed assets management process Maintenance of fixed assets information Adding, editing, removing assets categories Creating, removing and updating fixed assets Storing, processing and retrieving information about fixed assets of an organization
Page 3
Displaying assets by different methods, such as by category, condition, useful lifetime and its current usage.
The application software will work for the organization`s accounting department and all the activities such as editing, updating, storing, deleting data will be done by users, who are mostly accountants and managers and other users can use the system to obtain information, which means the program can generate reports for managers about fixed assets of their organization.
2.0 Components Table Data Item
Category Id
Data
Entry
Format/L
Type
Method
ength
character
textfield
15
Default
Tool Tip
Short cut
Generated
-
-
id Category
character
textfield
25
-
Enter category Name
-
character
textfield
200
-
Give Description
-
Character
textfield
100
-
Enter category name
-
Name Category description Category Name Search
to search
Asset Name
character
textfield
25
-
Enter asset Name
-
Date acquired
character
date
-
-
Choose date from
-
calendar Category
character
textarea
300
-
Give asset description
-
integer
spinner
*
5
Enter Useful lifetime
-
description Useful Lifetime
of asset
Cost
character
textfield
25
-
Cost of asset
-
Category
character
Combo box
-
Select
-
-
Employee records it
-
Category Employee
character
textfield
25
-
Page 4
Condition
character
Combo box
-
Select
-
-
Location of asset
-
-
-
Condition
Location
character
textfield
25
Currently used
character
Radio button
-
-
3.0 System Analysis System analysis problem analyzing process which also requirements capturing for substituting system. In this section I introduced overall system description and following that, I analyzed user and task analysis which play very important role in software development. 3.1 Task Analysis Task Analysis demonstrates tasks that are performed by the users. The following diagram illustrates tasks that are performed while using FAM in Hierarchical Task Analysis approach which is one of the most important methods of task analysis: Run application
Open Category Management
Add new category
Search a category
Enter category name
Enter category name
Enter category descript.
Display all categories
Search category
Save category
Open Assets Managemen t Clear Form
Edit categories
Enter new information
Delete fixed assets
Delete category
Apply sorting
Edit fixed assets
Save category
Add new asset
Fill Form
Select approach to display
Save Asset
Page 5
3.2 System Description The main goal of FAM is to speed up fixed assets management process and help accounting managers to do their daily activities efficiently and easily and benefit the organization by reducing costs. These objectives are achieved by developing a desktop application with Graphical User Interface which visualizes objects in graphically meaningful representation which makes it easy to remember and learn. More essentially, it provides functions that are required by the accounting department. Particularly using FAM users can easily record fixed asset information and display assets and categories with different conditions and edit information or delete.
4.0 Design Rationale The diagram above which shows Task Analysis can be used as paper prototype to show users at the initial stage of the system design with the purpose of making it clear for them how it works and what can be done with it. This process is quite essential, because user participation in software development life cycle is one of the most important aspects of user centered design. It enables early usability analysis and user feedback might lead to some changes from beginning phases of the development process. Overall, the initial blueprint is designed and given to the user for evaluation and this is mainly for user to know what the system will do. When we run the application, the home page will appear containing three buttons at the bottom of the window:
Page 6
Every button directs to the related page when clicked, except Exit button. When user clicks Exit button program stops and window closes. I used standard buttons with standard colors and text. Because it is intended to be used by accounting managers, it is not needed to make it colorful with pictures and so on.
Assets category management page contains components as can be seen from snapshot below: Here I used picture which represents folder or specifically category as is related to content of the page and title of the page is blue which suits to the picture. Other components have standard colors and sizes, namely white background for fields where users enter records and gray for overall background which is generally used for different forms. As for layout, I split it into two, one is for searching and another is for displaying assets and updating its information. This layout is clear for users to see what part is used for specific purpose.
Page 7
In addition, I used message windows in case user makes some mistake while entering data, or performing all other components. For example, the picture below shows one of such message window which will appear when user attempts to delete record from database:
5.0 Usability Evaluation Evaluation is one of the most important stages of software development life cycle, because it allows designer to find out weaknesses and errors of the system before actually releasing it. I chose observation method for evaluation, because it shows actual activities of user while
Page 8
performing program tasks. This means I can observe user and get note of how he\she using application efficiently and how easy the application to learn for him\her. While evaluating the program I gave my project to a accounting department manager of one business company called Akfa Lighting, and observed how the user is performing tasks, what parts may be difficult to learn, and so on. After this evaluation I got initial feedback and applied it to my project. In testing I mainly focused on efficiency, effectiveness, learnability of the system as well as user satisfaction. These aspects are evaluated in terms of speed, errors made, user performance and satisfaction as illustrated in table below:
1st time
2nd time
3rd time
Expected
Given
Expected
Given
Expected
Given
Speed
Slow
Fast
Faster
Fast
Very fast
Errors
Many
Quick enough Less
Very few
Almost no
None
None
Performance
Good
Good
Very good
Very good
Very good
Excellent
User satisfaction
70%
85%
80%
90%
90%
95%
As is clear from the evaluation statistics, user performance and usability of the system are improved each time after modifications are implemented. And the user performed tasks better than expected which means the application does not require much training and can be easily learned and used.
6.0 Appendix 6.1 Screenshots
Page 9
Page 10
Page 11
Page 12
6.2 Setup Guide The application is located in folder called MyProject. As mentioned above it requires java runtime environment to be executed and Netbeans Platform to start database server. The user must follow these guidelines to execute application: 1. Open netbeans.exe program from Program files 2. Go to Services section at top-left corner 3. Select Java DB properties by right-click 4. Show path to database location. It is JavaDB folder from main folder of the project 5. Right-click Java DB and start server 6. Right click assets_db and connect 7. Run MyProject.jar by going to dist folder of the project.
Page 13
6.3 Annotated source code private void exitMenuItemActionPerformed(java.awt.event.ActionEvent evt) { System.exit(0); } private void btn_catActionPerformed(java.awt.event.ActionEvent evt) { internalFrame.setVisible(true); txtf_search_cat.setText(""); } private void clear_category(){ txtf_catID.setText(""); txtf_catName.setText(""); txtf_catDesc.setText(""); txtf_catID.setEnabled(false); txtf_catName.setEnabled(false); txtf_catDesc.setEnabled(false); catTable.clearSelection(); } private void btn_clearActionPerformed(java.awt.event.ActionEvent evt) { clear_category(); } private int getLargestId(String query) throws SQLException { int result=0;
Page 14
Connection con = DriverManager.getConnection("jdbc:derby://localhost:1527/assets_db", "jamol", "jamol"); Statement st = null; try { st = con.createStatement(); ResultSet rsmax = st.executeQuery(query); while (rsmax.next()){ if(rsmax.getInt(1)==0){ result = 100; } else{ result = rsmax.getInt(1); } }
} catch (SQLException e ) { JOptionPane.showMessageDialog(null, "SQL Syntax Error"); } finally { if (st != null) { st.close(); } } return result; } private void btn_newActionPerformed(java.awt.event.ActionEvent evt) { int newId;
Page 15
txtf_catID.setEnabled(true); txtf_catName.setEnabled(true); txtf_catDesc.setEnabled(true); txtf_catName.requestFocusInWindow(); try{ newId = getLargestId("SELECT MAX(CATID) FROM APP.ASSETCATEGORY")+1; txtf_catID.setText(""+newId);
} catch (SQLException e ) { JOptionPane.showMessageDialog(null, "SQL Syntax Error"); } } private void getCatToCbox() throws SQLException { cbox_cat.removeAllItems(); Connection con = DriverManager.getConnection("jdbc:derby://localhost:1527/assets_db", "jamol", "jamol"); Statement st = null; st = con.createStatement(); String query = "select * from APP.ASSETCATEGORY"; ResultSet rs = st.executeQuery(query); cbox_cat.addItem("Select Category"); while (rs.next()){
Page 16
String catName = rs.getString("CATNAME"); cbox_cat.addItem(catName); } cbox_cat.addItem("New Category"); if (st != null) { st.close(); } } private void getCatsToCbox() throws SQLException { cbox_cats.removeAllItems(); Connection con = DriverManager.getConnection("jdbc:derby://localhost:1527/assets_db", "jamol", "jamol"); Statement st = null; st = con.createStatement(); String query = "select * from APP.ASSETCATEGORY"; ResultSet rs = st.executeQuery(query); cbox_cats.addItem("All Categories"); while (rs.next()){ String catName = rs.getString("CATNAME"); cbox_cats.addItem(catName); } if (st != null) { st.close(); } } private void getLifetimesToCbox() throws SQLException { cbox_lifetimes.removeAllItems();
Page 17
Connection con = DriverManager.getConnection("jdbc:derby://localhost:1527/assets_db", "jamol", "jamol"); Statement st = null; st = con.createStatement(); String query = "select * from APP.FIXEDASSETS"; ResultSet rs = st.executeQuery(query); String lifecheck = "All"; cbox_lifetimes.addItem(lifecheck); while (rs.next()){ String lifetime = rs.getString("LIFETIME"); if(lifetime.equals(lifecheck)){ }else { cbox_lifetimes.addItem(lifetime); lifecheck=lifetime; }
} if (st != null) { st.close(); }
} private void ViewTable(String catname) throws SQLException { String query, querycount; if(catname.isEmpty()) { query = "select * from APP.ASSETCATEGORY"; querycount = "select count(*) FROM APP.ASSETCATEGORY";
Page 18
} else { query = "select * from APP.ASSETCATEGORY where CATNAME='"+catname+"'"; querycount
=
"select
count(*)
FROM
APP.ASSETCATEGORY
where
CATNAME='"+catname+"'"; }
Connection
con
=
DriverManager.getConnection("jdbc:derby://localhost:1527/assets_db", "jamol", "jamol"); Statement st = null; try { st = con.createStatement(); int count=0; ResultSet rscount = st.executeQuery(querycount); while (rscount.next()){ count = rscount.getInt(1); } DefaultTableModel tableModel = (DefaultTableModel) catTable.getModel(); tableModel.setRowCount(count); catTable.setModel(tableModel); ResultSet rs = st.executeQuery(query); int i = 0; while (rs.next()){ String catID = rs.getString("CATID"); String catName = rs.getString("CATNAME"); String catDesc = rs.getString("CATDESCRIPTION");
Page 19
//calling data into jtable for display catTable.setValueAt(i+1, i, 0); catTable.setValueAt(catID, i, 1); catTable.setValueAt(catName, i, 2); catTable.setValueAt(catDesc, i, 3); i++; } } catch (SQLException e ) { JOptionPane.showMessageDialog(null, "SQL Syntax Error"); } finally { if (st != null) { st.close(); } } } private void btn_saveActionPerformed(java.awt.event.ActionEvent evt) { if ((txtf_catID.getText().equals("")) || (txtf_catName.getText().equals("")) || (txtf_catDesc.getText().equals(""))) { JOptionPane.showMessageDialog(this, "Please Fill in All Fields", "Information Message", WIDTH); } else{ try { Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); } catch (ClassNotFoundException e){
Page 20
JOptionPane.showMessageDialog(this, "There is a problem in JavaDB embedded driver", "Warning", WIDTH); } try{ Connection con = DriverManager.getConnection("jdbc:derby://localhost:1527/assets_db", "jamol", "jamol"); Statement stmt = con.createStatement(); String
sqlquery
=
"select
*
from
APP.ASSETCATEGORY
where
from
APP.ASSETCATEGORY
where
CATNAME='"+txtf_catName.getText()+"'"; String
sqlcheckid
=
"select
*
CATID="+txtf_catID.getText(); ResultSet rsid = stmt.executeQuery(sqlcheckid); int intid=0; while (rsid.next()){ intid = rsid.getInt("CATID"); } ResultSet rs = stmt.executeQuery(sqlquery); String cName=""; int cId=0; while (rs.next()){ cName = rs.getString("CATNAME"); cId = rs.getInt("CATID"); } if(cName.isEmpty()&& intid==0){ Page 21
stmt.executeUpdate("INSERT CATDESCRIPTION)
INTO
VALUES
("
APP.ASSETCATEGORY +
(CATID,
txtf_catID.getText().toString()
CATNAME,
+
",
'"
+
txtf_catName.getText() + "', " + "'" + txtf_catDesc.getText() + "')"); getCatToCbox(); getCatsToCbox(); clear_category(); ViewTable(""); JOptionPane.showMessageDialog(this,
"New
Category
is
Saved
Successfully",
"Information Message", WIDTH); if (stmt != null) { stmt.close(); } }else { int
opt = JOptionPane.showConfirmDialog(null, "Category Already Exists. Do You Want to
Overwrite?"); if(opt==JOptionPane.YES_OPTION) { if(cId!=0){ txtf_catID.setText(""+cId);} stmt.executeUpdate("UPDATE CATNAME='"+txtf_catName.getText()+"',
APP.ASSETCATEGORY
SET
CATDESCRIPTION='"+txtf_catDesc.getText()+"'
WHERE CATID="+txtf_catID.getText()); } clear_category(); ViewTable(""); if (stmt != null) { stmt.close(); } } } catch(SQLException e){
Page 22
JOptionPane.showMessageDialog(this, "There is a problem in JavaDB statement:" + e, "Warning", WIDTH); }
}
} private void deleteById(String id) { Connection con = null; try{ Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); con
=
DriverManager.getConnection("jdbc:derby://localhost:1527/assets_db",
"jamol",
"jamol"); try{ Statement st = con.createStatement(); String sql = "DELETE FROM APP.ASSETCATEGORY WHERE CATID="+id; int delete = st.executeUpdate(sql); } catch (SQLException s){ System.out.println("SQL statement is not executed!"); } } catch (Exception e){ } } private void deleteAssetById(String assetId){ Connection con = null;
Page 23
try{ Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); con
=
DriverManager.getConnection("jdbc:derby://localhost:1527/assets_db",
"jamol",
"jamol"); try{ Statement st = con.createStatement(); String sql = "DELETE FROM APP.FIXEDASSETS WHERE ID="+assetId; int delete = st.executeUpdate(sql); } catch (SQLException s){ JOptionPane.showMessageDialog(this, "There is a problem in JavaDB statement:" + s, "Warning", WIDTH); } } catch (Exception e){ } } private void btn_deleteActionPerformed(java.awt.event.ActionEvent evt) { int[] col, row; catTable.setColumnSelectionInterval(1, 2); col = catTable.getSelectedColumns(); row = catTable.getSelectedRows(); if(row.length < 1){ JOptionPane.showMessageDialog(this,
"No
Row
Selected",
"Information
Message",
WIDTH);
Page 24
} else { int option = JOptionPane.showConfirmDialog(null, "Do You Really Want to Delete?"); if(option==JOptionPane.YES_OPTION) {
for(int i=0; i 1){ JOptionPane.showMessageDialog(this, "Selected Rows are Deleted", "Information Message", WIDTH);
Page 25
} else{ JOptionPane.showMessageDialog(this, "No Rows Selected", "Information Message", WIDTH); } } catch (SQLException s){ System.out.println("Statement is not executed!"); } } } } private void btn_assetsActionPerformed(java.awt.event.ActionEvent evt) { try{ getCatToCbox(); getCatsToCbox(); getLifetimesToCbox(); refreshListContent(); } catch (SQLException e ) { JOptionPane.showMessageDialog(null, "SQL Syntax Error"); } internalFrameAssets.setVisible(true); newAssetPanel.setVisible(false); //System.out.println(cbox_cats.getSelectedIndex());}
Page 26
7.0 References
Au, E. &Makower, D. (1996) Java Programming Basics. MIS:Press Ben Shneiderman (1998) Designing the User Interface, Addison-Wesley, 3rd Ed, Bentley, L & Whitten, J (2007).System Analysis & Design for the Global Enterprise. 7th ed Bloch, J. (2008) Addison-Wesley Java seriesThe Java series.2nd ed. Addison-Wesley Campione, M., Walrath, K. &Huml, A. (2001) The JavaTM Tutorial, Third Edition. Pearson Education Inc. Addison Wesley Eckel, B. (2009) Thinking in Java. 3rd ed. Prentice Hall PTR Jenny Preece (1994), Human-Computer Interaction, Addison-Wesley, 1st Edition Lewis, J. & Loftus, W. (2009) Java Software Solutions. 6thed. Pearson Education Inc. Addison Wesley O'Neil, J.(1998) Teach yourself Java. McGraw-Hill Professional
Page 27