Professional Documents
Culture Documents
Chirag
Chirag
BACHELOR OF TECHNOLOGY
(Computer Science of Engineering) Submitted by
CHIRAG (1035)
CERTIFICATE OF ACHIEVEMENT
This is to certify that Mr. CHIRAG, MatuRam Institute of Engineering, Rohtak has
successfully completed his internship in java programming (core)under my guidance. During the training period I found him to be very enthusiastic, practical, realistic and eager to learn. Wishing him all the success in future.
ACKNOWLEDGEMENT
First and foremost, I would like to thank to my teacher, Mr. Rajkumar sharma for the valuable guidance and advice on java programming. He inspired me greatly to work in the field of java programming. Their willingness to motivate me contributed tremendously. I also would like to thank them for showing different types of ideas, datas and codes of that related to the topic of my project. Beside this a very warm thanks to my friend Tarun Yadav (CSE) who greeted me all the time in this project Finally, an honorable mention goes to my family for their understandings and supports me in completing this project. Without helps of the particular that mentioned above, I would face many difficulties while doing this project.
TABLE OF CONTENTS
INDEX
CONTENTS Abstract . List of figures. List of abbreviation. Architecture. Introduction.. related theory output.. Conclusion References & Bibliography
ABSTRACT
File compression is developed in java. It is a software which is used to compress the size of any text file. This software will provide the ease of reducing size of any text file. The Domain Sun Zip lets you reduce the overall number of bits and bytes in a file so it can be transmitted faster over slower Internet connections, or take up less space on a disk. Domain Sun Zip is a System Based Software. The user need not depend on third party softwares like winzip, winrar, Stuff etc.
The main algorithms are:
GZIP algorithm
GZip is a software application used for file compression. gzip is short for GNU zip; the program is a
free software
compress
Unix
systems,
intended for use by the GNU Project.gzip was created by Version 0.1 was first publicly released on 1993. gzip is based on the
coding. DEFLATE October 31, 1992.
and
Mark Adler.
and
Huffman
gzip is often also used to refer to the gzip file format, which is: a 10-byte header, containing a magic number, a version number and a timestamp optional extra headers, such as the original file name, a body, containing a DEFLATE-compressed payload an 8-byte footer, containing a uncompressed data
CRC-32
The environment used for this project is JAVA. This project is based on core JAVA. The software used for this java JDK1.6, Window XP operating system.
LIST OF FIGURES
SERIAL FIGURE NAME NUMBER 1. Flow chart PAGE NUMBER
2.
ER diagram
3.
LIST OF ABBREVIATION
Jdk Er Gb Mb Xp GUI Mhz OS API JVM AWT Java development kit Entity relationship Giga byte Mega byte Experience Graphical user interface mega hertz operating system application programming interface java virtual interface abstract windows toolkit
LIST OF SYMBOLS
{ , ; <= . () != // [] = Braces Double quotes Comma Colon Less than or equal to Dot Brackets Not equal to Comments Array Index Bound Assigning a value 7
ARCHITECTURE:
SOFTWARE REQUIREMENT SPECIFICATION
1.2 SCOPE:
This product is use by the system user where this project is running.
2.OVERALL DESCRIPTION:
2.1.PRODUCT PERSPECTIVE:
It enables you to login as a admin or as a user.
2.1.1. USER INTERFACE: Keyboard and Mouse. 2.1.2. HARDWARE INTERFACE: * Printer * Normal PC 2.1.3. OPERATING ENVIRONMENT:
The OS types are * WindowsXP * * Windows98 Windows 7
2.1.4.HARDWARE REQUIREMENTS: software should work on any standard PC capable of running Windows 95 or Windows NT. software should not require more than 2 MB of hard disk space. 2.1.5.SOFTWARE INTERFACES : software should be able to interact with the jdk 1.6 and jre.
3. SPECIFIC REQUIREMENT:
3.1. USER CHARACTERISTICS:
Knowledgeable 9
3.2. CONSTRAINTS :
By clicking on close tab, you will exit from the database.
Hardware Requirements
Machine Speed Hard Disk RAM : Pentium 4 : 233 MHz and above : 10GB : 256MB
10
11
Context Diagram
Administrator
SunZip
Login
SunZip
12
Administrator
Logi n
Manage ment
13
FLOW CHART
14
INTRODUCTION:
Gym management is developed in java. It is a software which records the entry of new & existing users, staff. This software will provide the ease of searching any information about the user or staff.it is created with the help of database and keep the information stored in the form of tables.there are many fitness program for every kind of person such as aerobics,womanfitness, groupexercise, heavyexercise etc.there is a seprate table which gives the details of diet should be taken during gym exercise.
RELATED THEORY
15
It is general purpose; object oriented programming language and originally called OAK. It is developed by SUN MICROSYSTEMS of USA in 1991.Basic concepts of OOPS and java program: Java is an object-oriented programming language that was designed to meet the need for a platform independent language. Java is used to create application s that can run on a single computer as well as a distributed network. The java program works on any type of compatible device that support java.
Characteristics of java:
o o o o o o o o
Objects:
An object in JAVA is essentially a block of memory that contains space to store all instance variables. Creating an object is also referred to an instantiating an object. Object in JAVA are 16
created using new operator. The new operator creates an object of the specified class and returns a preference to that object. Here is an e.g. of creating an object of type rectangle. Rectangle Rect1; // declare the object
Both statements can be combined into as shown below Rectangle Rect1 = new Rectangle ();
Classes:
Classes are data types based on which objects are created. Objects with similar properties and methods are grouped together to form a Class. Thus a Class represents a set of individual objects. Characteristics of an object are represented in a class as Properties. The actions that can be performed by objects become functions of the class and are referred to as Methods. Example considers we have a Class of Cars under which Santro Xing, Alto and WaganR represents individual Objects. In this context each Car Object will have its own, Model, Year of Manufacture, Color, Top Speed, Engine Power etc., which form Properties of the Car class and the associated actions i.e., object functions like Start, Move, and Stop form the Methods of Car Class. No memory is allocated when a class is created. Memory is allocated only when an object is created, i.e., when an instance of a class is created.
Inheritance:
Inheritance is the process of forming a new class from an existing class or base class. The base class is also known as parent class or super class, the new class that is formed is called derived class. Derived class is also known as a child class or sub class. Inheritance helps in reducing the overall code size of the program, which is an important concept in objectoriented programming. Java supports three types of inheritance simple, hierarchical and multilevel inheritance, but it not support multiple and hybrid inheritance.
Data Abstraction:
Data Abstraction increases the power of programming language by creating user defined data types. Data Abstraction also represents the needed information in the program without presenting the details.
17
Data Encapsulation:
Data Encapsulation combines data and functions into a single unit called class. When using Data Encapsulation, data is not accessed directly; it is only accessible through the functions present inside the class. Data Encapsulation enables the important concept of data hiding possible.
Polymorphism:
Polymorphism allows routines to use variables of different types at different times. An operator or function can be given different meanings or functions. Polymorphism refers to a single function or multi-functioning operator performing in different ways.
Overloading:
Overloading is one type of Polymorphism. It allows an object to have different meanings, depending on its context. When an existing operator or function begins to operate on new data type, or class, it is understood to be overloaded. Overloading is of two types which are Operator Overloading and Function Overloading.
Reusability:
This term refers to the ability for multiple programmers to use the same written and debugged existing class of data. This is a time saving device and adds code efficiency to the language. Additionally, the programmer can incorporate new features to the existing class, further developing the application and allowing users to achieve increased performance. This time saving feature optimizes code, helps in gaining secured applications and facilitates easier maintenance on the application.
Multithreading:
Java supports Multithreading programming which allow programmer to write programs that do many things simultaneously. The implementation of each of the above object-oriented programming features for Java will be highlighted in later sections.
18
INTRODUCTION TO APPLETS
An Applet is a special kind of Java program that is designed to be transmitted over the internet and automatically executed by a Java compatible web browser. Applets are intended to be a small program. They are typically used to display data provided by the server, handle user input, or provide simple functions, such as long calculator, that execute locally, rather than on the server. In essence, the Applet allows some functionality to be moved from server to the client. After an Applet arise on the client, it has limited access to resources so that it can produce a graphical user interface and run complex computations without introducing the risk of viruses or breaching data integrity. The Applet begins with two import statements: Import java.awt.*; Import java.applet.*; The first imports the abstract window toolkit (awt) classes. Applets interact with the user through the awt, not through the console-based I/O classes. The second import statement imports the Applet package, which contains the class applet. Every applet that programmer create must be a sub class of applet. Points to be remembered: 1. Applet do not need a main() method. 2. Applet must be run under an appletviewer or a java compatible browser. 3. User I/O is not accomplished with Javas stream I/O classes. Instead applet use the interface provided by the awt or swing.
Introduction to Swings
Swings were introduced in 1997, to overcome the drawbacks of AWT. Swings were initially available for use with Java 1.1 as a separate library. However beginning with java 1.2, swing was fully integrated with java. Swing (GUI) contains two key items: COMPONENTS CONTAINERS The difference between the two is found in their intended purpose. A component is an independent visual control such as push buttons or slider. A container holds a group of components. All the swing GUI does will have at least one container because container is components, a container can also hold other containers. All swings components are represented by class defined within the package javax.swing. Some class name for swing components: JAppelet, JLabel, JButton, JCheckBox, JComboBox etc.
o ImageIcon: Easiest way to obtain an icon is to use the ImageIcon class. ImageIcon implements icon and capsulate an image. Thus an object of type ImageIcon can be passed as an argument to the icon parameter of JLabels constructor. From example: ImageIcon(String filename); It obtains the image in the file named filename. o JTextField: JTextField allow you to edit one line of text. It is derived from JTextComponents, which provides the basic functionality common to swing text components. JTextField uses the document interface for its model. Three of JtextFeild constructors are given below: JTextField(int cols); JTextField(string str, int cols); JTextField(string str); 20
o JButton: The JButton class provides the functionality of a push button. JButton allows an icon, a string, or both to be associated with the push button. Three of its constructors are show below: JButton(Icon icon); JButton(String str); JButton(String str, Icon icon); o JTabbedPane: JTabbedPane encapsulates a tabbed pane. It manages the set of components by linking them with tabs. Selecting a tab causes the component associated with that tab to come to the forefront. JTabbedPane are very common in modern GUI, and u has no doubt used them many times. Given the complex nature of Tabbed Pane, they are surprisingly easy to create and use. The general procedure to use the tabbed pane is given below: 1. Create an instance of JTabbedPane. 2. Add each tab by calling addTab(). 3. Add the tabbed pane to the content pane.
1. A software configuration that includes a software requirement specification, a design specification and source code. 2. A software configuration that includes a test plan and procedure, any testing tool and test cases and their expected results. Testing is divided into several distinct operations:
1. Unit Testing
Unit test comprises of a set tests performed by an individual program prior to the integration of the unit into large system. A program unit is usually the smallest free functioning part of the whole system. Module unit testing should be as exhaustive as possible to ensure that each representation handled by each module has been tested. All the units that makeup the system must be tested independently to ensure that they work as required. During unit testing some errors were raised and all of them were rectified and handled well. The result was quiet satisfactory and it worked well.
22
2. Integration Testing
Integration testing is a system technique for constructing the program structure while at the same time conducting tests to uncover errors associated with interfacing. The objective is to take unit tested modules and build a program structure that has been dictated by design. Bottom-up integration is the traditional strategy used to integrate the components of a software system into functioning whole. Bottom-up integration consists of unit test followed by testing of the entire system. A subsystem consists of several modules that communicated with other defined interface.
The system was done the integration testing. All the modules were tested for their compatibility with other modules .They test was almost successful. All the modules coexisted very well, with almost no bugs. All the modules were encapsulated very well so as to not hamper the execution of other modules.
3. Validation Testing
23
After validation testing, software is completely assembled as a package, interfacing errors that have been uncovered and corrected and the final series of software test; the validation test begins. Steps taken during software design and testing can greatly improve the probability of successful integration in the larger system. System testing is actually a series of different tests whose primary purpose is to fully exercise the compute based system.
4. Recovery Testing
It is a system that forces the software to fail in a variety of ways and verifies that the recovery is properly performed.
5. Security Testing
It attempts to verify that protection mechanisms built into a system will in fact protect it from improper penetration. The systems security must of course be tested from in vulnerability form frontal attack. 24
6. Stress Testing
Stress tools are designed to confront programs with abnormal situations. Stress testing executes a system in a manner that demands resources in abnormal quantity and volume.
Black box testing is done to find out the following information as shown in below: 1. Incorrect or missing functions. 2. Interface errors. 3. Errors or database access. 4. Performance error. 5. Termination error.
The mentioned testing is carried out successfully for this application according to the users requirement specification.
25
After preparing test data, the system under study is tested using the test data. While testing the system using test data, errors are again uncovered and corrected by using above testing and corrections are also noted for future use.
26
APPENDIX
27
28
29
30
31
6. CONCLUSION
The project SunZip is completed, satisfying the required design specifications. The system provides a user-friendly interface. The software is developed with modular approach. All modules in the system have been tested with valid data and invalid data and everything work successfully. Thus the system has fulfilled all the objectives identified and is able to replace the existing system. The constraints are met and overcome successfully. The system is designed as like it was decided in the design phase. The system is very user friendly and will reduce time consumption. This software has a user-friendly screen that enables the user to use without any inconvenience. The user need not depend on third party softwares like winzip, winrar, Stuff etc. The software can be used to compress files and they can be decompressed when the need arises. The application has been tested with live data and has provided a successful result. Hence the software has proved to work
32
efficiently.
REFERENCE
BOOKS: Charles Hampfed --(2000) Basic JAVA University of Toronto Herhert Schildt --The Complete Reference Java2 (Fifth Edition) E. BalaguruswamyCore Java Jim Farely $ William CrawfordJava Enterprise (Third edition)
BIBLIOGRAPHY
Books Referred
The Complete Reference Java 2 by Herbert Schildt Programming With java (E. Balaguruswamy)
Websites Referred
1) www.google.com 2) http://java.sun.com/docs/books/tutorial/uiswing/ 3) www.stardeveloper.com 33
4) www.roseindia.net/jdbc/jdbc-mysql/
34