Index: Back End Tool: Oracle 10g Express Edition
Index: Back End Tool: Oracle 10g Express Edition
Index: Back End Tool: Oracle 10g Express Edition
INDEX
S.NO.
2. 3.
PAGE NO.
2 3-8
9-10
10
6.
11
7.
12
8.
13-24
9.
25
E-R DIAGRAM
11.
Testing
RESULTS
25-30
12.
30
13.
CONCLUSION
31
14.
32
REFERENCES
33
MAT SOFTWARE
OBJECTIVE:
The MAT was developed as an attempt to take a record of good manufactured, sold or present in showroom and goudown. The System provides the facility of viewing the raw present in goudown or the price of raw etc. The GUI used for the project provide instruction and the various actions performed on button clicks or on selection of items, guide the user through a series of pages as in the Project.
TOOLS USED:
The tools used for the development purpose are: 1. Java Development Kit1.6.0- Several distinct features of Java are used which enhance usability of the project. 2. Oracle 10g Express Edition as the Database 3. Net Beans 7.0 as a GUI for java language.
MAT SOFTWARE
Java Features: 1. Platform Independent: The Write-Once-Run-Anywhere ideal has not been achieved
(tuning for different platforms usually required), but closer than with other languages.
2. Object Oriented: Java is pure object oriented throughout i.e. there is no coding
outside of class definitions, including main(). There is an extensive class library available in the core language packages.
4. Robust: Exception handling built-in, strong type checking (that is, all data must be
declared an explicit type), local variables must be initialized.
6. Security:
No memory pointers. Programs run inside the virtual machine sandbox. Array index limit checking
MAT SOFTWARE
7. Dynamic Binding: The linking of data and methods to where they are located is done
at run-time. New classes can be loaded while a program is running. Linking is done on the fly. Even if libraries are recompiled, there is no need to recompile code that uses classes in those libraries. This differs from C++, which uses static binding. This can result in fragile classes for cases where linked code is changed and memory pointers then point to the wrong addresses.
9. Threading: Lightweight processes, called threads, can easily be spun off to perform
multiprocessing. We can take advantage of multiprocessors where available. Great for multimedia displays.
10. Built-in Networking: Java was designed with networking in mind and comes with
many classes to develop sophisticated Internet communications. Features such as eliminating memory pointers and by checking array limits greatly help to remove program bugs. These and the other features can lead to a big speedup in program development compared to C/C++ programming.
Java Platform:
A platform is the hardware or software environment in which a program runs. Most platforms can be described as a combination of the operating system and hardware. The Java platform differs from most other platforms in that it's a software-only platform that runs on top of other hardware-based platforms. The Java platform has two components: The Java Virtual Machine (Java VM) The Java Application Programming Interface (Java API) Java Virtual Machine is standardized hypothetical computer, which is emulated inside our computer by a program. It is base of Java platform and is ported onto various hardware-based platforms. The Java API is a large collection of ready-made software components that provide many useful capabilities, such as graphical user interface (GUI) widgets. The Java API is grouped into libraries of related classes and interfaces; these libraries are known as packages.
Java Environment:
Java environment includes large number of development tools and hundreds of classes and methods. The development tools are part of the system known as Java Development Kit (JDK) and the classes and methods are part of the Java Standard Library (JSL), also known as the Application Programming Interface (API). Some of the basic concepts of Core Java are:
main() method
* in Java, the main() method and the class in which it is defined should be declared public because the Java runtime environment has to access the main() method to execute a program. * The main () method should be declared static because it has to exist before any object of the class is created.
MAT SOFTWARE
* The command line parameter is a String type variable main (String args[]). The number of arguments is determined by the String class object. Access specifiers used by java are public, private and protected. Variables, methods and blocks can be declared as static. The concept behind static is that only one copy of it exists. There is no concept of static classes.
Execution of program
* Save the file with file_name.java * Go on command prompt. * javac file_name.java. <Enter> * java filename <Enter>
Interfaces
* Are set of abstract methods. * They are used to provide the concept of multiple inheritance. * They are used for implementing inheritance relationship between non related classes. * Keyword used for inheriting interfaces is implements. * Hybrid inheritance is possible through interfaces. * A class can extend only single class but can implement many interfaces. Syntax: class class_name implements interface_name
Packages
* Java uses packages to organize related classes. * Different packages can have classes with same name. * They have hierarchical structure. * Java uses import statement to use packages in a program. Syntax: import<package_name>.*; import<package_name>.<class_name>;
Inbuilt packages
* java.awt Abstract Window Toolkit. Contain all graphics related classes. * javax.swing - Extension of awt. (javax is java extended). Provides component classes like JLabel, JTextField, JButton and JComboBox. * java.awt.event Sub-package of awt. Used for event handling(like action on buttonclicking). * java.sql Contains database handling related classes. * java.util Contains all the collection related classes. * java.lang It is by default imported in each and every class.
MAT SOFTWARE
Exception handling
An exception is an abnormal condition that arises in a code sequence at run time. In other words, an exception is a run-time error. In computer languages that do not support exception handling, errors must be checked and handled manuallytypically through the use of error codes, and so on. This approach is as cumbersome as it is troublesome. Javas exception handling avoids these problems and, in the process, brings run-time error management into the object-oriented world. Java has Exception class which is root class to all the exception classes. Some of the exceptions are: * ArithmeticException * ArrayIndexOutOfBoundException * NullPointerException When the object contains null reference and even then we are calling some member using it.
Multi-threading
* The java.lang.Thread class is used to construct and access the individual threads in a multithreaded application. * A process having more than one thread is said to be multithreaded. The multiple threads in the process run at the same time, perform different tasks, and interact with each other. * 2 ways to create threads: # by extending the Thread class:-Syntax: public class <class_name> extends Thread # by Runnable Interface:- The Runnable interface consists of a single method run(), which is executed when the thread is activated.
MAT SOFTWARE
MAT SOFTWARE
JComboBox is like a drop down box. You can click a drop-down arrow and select an option from a list. For example, when the component has focus, pressing a key that corresponds to the first character in some entry's name selects that entry. A vertical scrollbar is used for longer lists. JList provides a scrollable set of items from which one or more may be selected. FlowLayout when used arranges swing components from left to right until there's no more space available. Then it begins a new row below it and moves from left to right again. Each component in a FlowLayout gets as much space as it needs and no more. BorderLayout places swing components in the North, South, East, West and center of a container. You can add horizontal and vertical gaps between the areas. GridLayout is a layout manager that lays out a container's components in a rectangular grid. The container is divided into equal-sized rectangles, and one component is placed in each rectangle.
MAT SOFTWARE
Developers working on PHP, Java, .NET, XML, and Open Source applications DBAs who need a free, starter database for training and deployment Independent Software Vendors (ISVs) and hardware vendors who want a starter database to distribute free of charge Educational institutions and students who need a free database for their curriculum
With Oracle Database XE, you can now develop and deploy applications with a powerful, proven, industry-leading infrastructure, and then upgrade when necessary without costly and complex migrations.
MAT SOFTWARE
Oracle Database XE can be installed on any size host machine with any number of CPUs (one database per machine), but XE will store up to 11GB of user data, use up to 1GB of memory, and use one CPU on the host machine. Oracle Database XE provides an organized mechanism for storing, managing, and retrieving information. Tables are the basic storage structure for holding business data. In this module, you learn how to create tables and work with them. You may want to modify data entered in tables. You may also want to maintain integrity with the data. Sometimes, you may want to remove tables that are no longer useful.
10
MAT SOFTWARE
Java Database Connectivity (JDBC) Java Database Connectivity, commonly referred to as JDBC, is an API for
the Java programming language that defines how a client may access a database. It provides methods for querying and updating data in a database. JDBC is oriented towards relational databases. A JDBC-to-ODBC bridge enables connections to any ODBC-accessible data source in the JVM host environment. JDBC allows multiple implementations to exist and be used by the same application. The API provides a mechanism for dynamically loading the correct Java packages and registering them with the JDBC Driver Manager. The Driver Manager is used as a connection factory for creating JDBC connections. JDBC connections support creating and executing statements. These may be update statements such as SQL's CREATE, INSERT, UPDATE and DELETE, or they may be query statements such as SELECT. Additionally, stored procedures may be invoked through a JDBC connection. JDBC represents statements using one of the following classes:
StatementThe statement is sent to the database server each and every time. Prepared StatementThe statement is cached and then the execution path is predetermined on the database server allowing it to be executed multiple times in an efficient manner.
11
MAT SOFTWARE
12
MAT SOFTWARE
DESCRIPTION OF PROJECT
This section consists of the snapshots of the project GUIs along with their description.
1. This is the loading window of this project. It takes several seconds to load the project properly. There is a progress bar in it which describes the percentage of the loaded project.
13
MAT SOFTWARE
2. After loading this window will be opened when we run this project very first time. It is to create new users who will be able to login and use this project.
14
MAT SOFTWARE
3. After creating user this login window will be opened. From here a user will login into its account.
15
MAT SOFTWARE
4. After logging in this main window will be opened. There is a menu bar in this window. In this menu bar three menus are available for user- Master, Transactions and reports. In Master menu four menu items are there-unit, car group, add user and item. In Transactions menu three menu items are there- purchase, sale, production/stock Transfer. In reports menu three menu items are there-purchase register, sale register and stock register.
16
MAT SOFTWARE
5. On clicking unit menu item of master menu this window will be opened. User can add new unit like Kilogram in our database.
17
MAT SOFTWARE
6. On clicking car group menu item of master menu this window will be opened. User can add new group of items in our database.
18
MAT SOFTWARE
7.After clicking on item menu item of master menu this window will be opened. Here user can save re-order level, price and opening stock of any item. For example if user want to save all these three parameters for tata nano car, he can do this easily by just clicking on save button.
19
MAT SOFTWARE
8. After clicking on purchase menu item of transactions menu, this window will be opened. Here user fill all entries about the purchasing raw materials from a party for car inventory.
20
MAT SOFTWARE
9.After clicking on production/stock register menu item of transactions menu this window will be opened. Here user can enter data about total item which has been produced in the factory.
21
MAT SOFTWARE
10. After clicking on stock register menu item of reports menu this window will be opened. Here user can see the stock of all items. He can see purchase quantity, sale quantity and closing stock any time from here.
22
MAT SOFTWARE
11. This is purchase register. From here user can see the item which has been purchased and also from which party and total amount of purchased item.
23
MAT SOFTWARE
12. This is sale register. Here user can see which item is sold to which party and how many amount of it has been sold.
24
MAT SOFTWARE
E-R DIAGRAM:
25
MAT SOFTWARE
Software testing, depending on the testing method employed, can be implemented at any time in the development process. However, most of the test effort occurs after the requirements have been defined and the coding process has been completed. As such, the methodology of the test is governed by the software development methodology adopted. Different software development models will focus the test effort at different points in the development process. Newer development models, such as Agile, often employ test driven development and place an increased portion of the testing in the hands of the developer, before it reaches a formal team of testers. In a more traditional model, most of the test execution occurs after the requirements have been defined and the coding process has been completed. 15.2 Types of Testing: a) White box testing White box testing is when the tester has access to the internal data structures and algorithms including the code that implement these.
Test coverage
White box testing methods can also be used to evaluate the completeness of a test suite that was created with black box testing methods. This allows the software team to examine parts of a system that are rarely tested and ensures that the most important function points have been tested. Two common forms of code coverage are: Function coverage, which reports on functions executed Statement coverage, which reports on the number of lines executed to complete the test They both return a code coverage metric, measured as a percentage.
26
MAT SOFTWARE
boundary value analysis, all-pairs testing, fuzz testing, model-based testing, traceability matrix, exploratory testing and specification-based testing. Specification-based testing: Specification-based testing aims to test the functionality of software according to the applicable requirements. Thus, the tester inputs data into, and only sees the output from, the test object. This level of testing usually requires thorough test cases to be provided to the tester, who then can simply verify that for a given input, the output value (or behavior), either "is" or "is not" the same as the expected value specified in the test case. Specification-based testing is necessary, but it is insufficient to guard against certain risks. Advantages and disadvantages: The black box tester has no "bonds" with the code, and a tester's perception is very simple: a code must have bugs. Using the principle, "Ask and you shall receive," black box testers find bugs where programmers do not. But, on the other hand, black box testing has been said to be "like a walk in a dark labyrinth without a flashlight," because the tester doesn't know how the software being tested was actually constructed. As a result, there are situations when (1) a tester writes many test cases to check something that could have been tested by only one test case, and/or (2) some parts of the back-end are not tested at all. Therefore, black box testing has the advantage of "an unaffiliated opinion," on the one hand, and the disadvantage of "blind exploring," on the other.
d)Unit testing
Unit testing refers to tests that verify the functionality of a specific section of code, usually at the function level. In an object-oriented environment, this is usually at the class level, and the minimal unit tests include the constructors and destructors. These type of tests are usually written by developers as they work on code (white-box style), to ensure that the specific function is working as expected. One function might have multiple tests, to catch corner cases or other branches in the code. Unit testing alone cannot verify the functionality of a piece of software, but rather is used to assure that the building blocks the software uses work independently of each other. Unit testing is also called component testing.
e) Integration testing
Integration testing is any type of software testing that seeks to verify the interfaces between components against a software design. Software components may be integrated in an iterative way or all together ("big bang"). Normally the former is
27
MAT SOFTWARE
considered a better practice since it allows interface issues to be localised more quickly and fixed. Integration testing works to expose defects in the interfaces and interaction between integrated components (modules). Progressively larger groups of tested software components corresponding to elements of the architectural design are integrated and tested until the software works as a system.
f) System testing
System testing tests a completely integrated system to verify that it meets its requirements.
h) Regression testing
Regression testing focuses on finding defects after a major code change has occurred. Specifically, it seeks to uncover software regressions, or old bugs that have come back. Such regressions occur whenever software functionality that was previously working correctly stops working as intended. Typically, regressions occur as an unintended consequence of program changes, when the newly developed part of the software collides with the previously existing code. Common methods of regression testing include re-running previously run tests and checking whether previously fixed faults have re-emerged. The depth of testing depends on the phase in the release process and the risk of the added features. They can either be complete, for changes added late in the release or deemed to be risky, to very shallow, consisting of positive tests on each feature, if the changes are early in the release or deemed to be of low risk.
i) Acceptance testing
Acceptance testing can mean one of two things: A smoke test is used as an acceptance test prior to introducing a new build to the main testing process, i.e. before integration or regression. Acceptance testing performed by the customer, often in their lab environment on their own hardware, is known as user acceptance testing (UAT). Acceptance testing may be performed as part of the hand-off process between any two phases of development.
j) Alpha testing
Alpha testing is simulated or actual operational testing by potential users/customers or an independent test team at the developers' site. Alpha testing is often employed for offthe-shelf software as a form of internal acceptance testing, before the software goes to beta testing. van Veenendaal, Erik. "Standard glossary of terms used in Software Testing". Retrieved 17 June 2010.
28
MAT SOFTWARE
k) Beta testing
Beta testing comes after alpha testing. Versions of the software, known as beta versions, are released to a limited audience outside of the programming team. The software is released to groups of people so that further testing can ensure the product has few faults or bugs. Sometimes, beta versions are made available to the open public to increase the feedback field to a maximal number of future users.
l) Non-functional testing
Special methods exist to test non-functional aspects of software. In contrast to functional testing, which establishes the correct operation of the software (correct in that it matches the expected behavior defined in the design requirements), nonfunctional testing verifies that the software functions properly even when it receives invalid or unexpected inputs. Software fault injection, in the form of fussing, is an example of non-functional testing. Non-functional testing, especially for software, is designed to establish whether the device under test can tolerate invalid or unexpected inputs, thereby establishing the robustness of input validation routines as well as errorhandling routines. Various commercial non-functional testing tools are linked from the software fault injection page; there are also numerous open-source and free software tools available that perform non-functional testing.
n) Stability testing
Stability testing checks to see if the software can continuously function well in or above an acceptable period. This activity of non-functional software testing is often referred to as load (or endurance) testing.
o) Usability testing
Usability testing is needed to check if the user interface is easy to use and understand.
29
MAT SOFTWARE
p) Security testing
Security testing is essential for software that processes confidential data to prevent system intrusion by hackers.
r) Destructive testing
Destructive testing attempts to cause the software or a sub-system to fail, in order to test its robustness
RESULTS
The system has been developed for the given condition and is found working effectively. The developed system is flexible and changes could be done whenever required. Using the facilities and functionalities of Java, the software has been developed in a neat and simple manner, thereby reducing the operators work. The speed and accuracy are maintained in proper way. The user friendly nature of this software developed in Java is very easy to work with both for the higher management as well as other employees with little knowledge of computer. The results obtained were fully satisfactory from the user point of view. The system was verified with valid as well as invalid data in each manner.
30
MAT SOFTWARE
CONCLUSION
Car Inventory System has been used in the inventory related to cars. Although the project is just a small part of the whole system, but an effort has been made to improve upon the existing GUI (Graphical User Interface) and to make it more attractive and user friendly and has been appreciated by the users who tested it. The Project is user friendly in the sense that there are buttons for navigation to each page and it has benefitted the developer in the sense that various concepts of Advance Java could be implemented as well as newer concepts of Oracle 10g Database and Netbeans could be learnt while working on the project.
31
MAT SOFTWARE
32
MAT SOFTWARE
REFERENCES:
URL:
www.java .sun.com www.java2s.comSQL introduction- Wikipedia, the free encyclopedia www.stackoverflow.com
PDF:
The Complete Reference Java2 by Herbert Schildt Class Notes RDBMS by Korth.
33