Вы находитесь на странице: 1из 73

A

PROJECT REPORT
CHATTING SYSTEM

AK S UNIVERSITY SATNA

SUBMITTED BY
VIPIN NAMDEV
BSC (IT)

Under the Guidance of Approved By

Mr. Shankar Bera Prof. Akhilesh A. Waoo


(Asst. Prof. CS Department) (Head of Department)

Department of Computer Science (CS)

AKS University, Satna (M.P.)

1
DECLARATION

The project titled Chatting system developed by me in the partial fulfillment of


AKS University.

It is a systematic work carried by us under the guidance of Computer Science


Department.

I, declare that this same project has not been submitted to any degree or diploma to
the AKS University or any other universities.

Name of the student:

Vipin Namdev

1
CERTIFICATE

This is to certify that the project titled “Chatting system” is a bonafied work
carried out by VIPIN NAMDEV

Under our guidance towards the partial fulfillment of the Requirements for the
degree of the Bachelor of Science with Information Technology, AKS University,
Satna , during the academic year 2016-2017.

Internal Signature External Signature

1
ABSTRACT
Teleconferencing or Chatting is a method of using technology to bring people and
ideas together despite of the geographical barri- ers. The technology has been
available for years but the acceptance it was quit recent. Our project is an
example of a chat server. It is made up of 2 applications the client application,
which runs on the users Android Device and server application, which runs on any
Android Device on the network. To start chatting client should get connected to
server where they can do private and group chat security measures were taken
during the last one.

1
Contents

1 Introduction

 Problem Statement
 Project Scheduling
 Business Requirement Documentation

AMENDMENT HISTORY

 Overview
 Stakeholders
 Business Process Affected
 Appplications .
 Assumptions
 Risks
 Related Documents
 Functional Requirements
 Non-Functional Requirements
 1.4 Organization Of Document

SYSTEM REQUIRMENTS:-
 SYSTEM REQUIREMENT-

2.1.1 HARDWARE SPECIFICATION.


1
2.1.2 SOFTWARE SPECIFICATION.

2.1.2.1 FRONT-END TOOL.

 SYSTEM DESIGN:-
 DESIGN OVERVIEW.
 DESIGN APPROACH.
 WATERFALL MODEL.

 SOFTWARE DEVELOPMENT LIFE CYCLE (SDLC).


 DATA FLOW DIAGRAM
 UML Approach.

 . SYSTEM IMPLEMENTATION
 Introduction
 Sample code

1
 SYSTEM TESTING:-
 BLACK BOX TESTING.
 WHITE BOX TESTING.

 ACCEPTANCE TESTING.
 .INPUT AND OUTPUT SCREEN DESIGN.
 .CONCLUSION.
 BIBLOGRAPHY.

1
Introduction

Communication is a mean for people to exchange messages. It has started since


the beginning of human creation. Distant communication began as early as 1800
century with the introduction of television, telegraph and then telephony.
Interestingly enough, telephone communication stands out as the fastest growing
technology, from fixed line to mobile wireless, from voice call to data transfer.
The emergence of computer network and telecommunication technologies bears
the same objective that is to allow people to communicate. All this while, much
efforts has been drawn towards consolidating the device into one and therefore
indiscriminate the services. Chatting is a method of using technology to bring
people and ideas together despite of the geograph- ical barriers. The technology
has been available for years but the acceptance it was quit recent. Our project is
an example of a chat server. It is made up of applications the client application
which runs on the users mobile and server application which runs on any pc on
the network. To start chatting our client should get connected to server where
they can do Group and private chatting.

1
1.1 Problem Statement This project is to create a chat application with a
server and users to enable the users to chat with each others. To develop
an instant messaging solution to enable users to seamlessly com- municate
with each other. The project should be very easy to use enabling even a
novice person to use it.

1.2 Project Scheduling This document provides a scalable scheduling tool


and associated schedule development, analysis, and monitoring methods
that can be used by Imple- menting Agencies (IA) to prepare, monitor, and
report project schedules. Our Project is not that complex so we will not use
very complex scheduling method.

1
REQUIREMENT ANALYSIS

In the requirement analysis, we analysis, project related requirement. In this


analysis related to documentation such as chapters, coding, testing, and
implementation. So now we consider their two phase’s one is system
requirement and software requirement.

Requirement Analysis:-

Requirements analysis in systems engineering and software engineering,


encompasses those tasks that go into determining the needs or conditions to
meet for a new or altered product, taking account of the possibly conflicting
requirements of the various stakeholders, such as beneficiaries or users. It is an
early stage in the more general activity of requirements engineering which
encompasses all activities concerned with eliciting, analyzing, documenting,
validating and managing software or system requirements. Requirements
analysis is critical to the success of a systems or software project. The
Requirements should be documented, actionable, measurable, testable,

1
traceable, related to identified business needs or opportunities, and defined to a
level of detail sufficient for system design.

SYSTEM REQUIREMENT: - System requirement containing hardware and


software requirements for our project. Let us see the some related aspects of
system requirements.

Business Requirement

Documentation

AMENDMENT HISTORY

 Version Prepared By Date Description 1.0 Mourin Mondol 11.04.2017 First


Version
 Overview This Requirements Document will provide the requirements for a
Chat Appli- cation. Both functional and non requirements will be
documented. functional requirements will be documented.

1
 Stakeholders Stakeholder name Organization Role Mourin Mondol Team
Shadow President Rajon Team Shadow Treasurer Rajon Team Shadow
Secretary
 Business Process Affected The following business process are in scope: New
Members Review Contacts 1.3.5 Appplications Chat Applications are in
scope. 1.3.6 Assumptions n/a 1.3.7 Risks n/a 5

 Functional Requirements Requirement ID Statement Must/Want FR001


This app must have Privacy for user Must FR002 This App Should have
Friend List Must FR003 Users shall be able to clear chat history Must FR004
User shall be able to add friend Must FR005 User shall be able to block or
remove friend Must FR006 User shall be able to Contacts with Maintenance
team Want

 Non-Functional Requirements ID Statement Must/Want NFR001 Chat App


should be secure from hackers Must NF002 All data must be backed up
Must NF003 Chat Application will be ready to launch within 60 days Want 6

1
Business Requirement Documentation

Chapter 2: This Chapter is all about SRS where we Design our Project.
Which include Use Case, Activity , ERD and DFD.

Chapter 3: Here, we analyze Possible Risk during the development phase of


our project.

Chapter 4: In this Chapter we discuss about Tools & Techniques we will


follow through development phase. And Our Test Plan. Here we gonna dp
Master test plan.

Chapter 5: This Chapter is a Manual or step by step guide for user about all
the features and installation of our project.

1Hardware Specification:

 PROCESSOR: Intel Pentium 4s or morea processor, or


"microprocessor," is a small chip that resides in computers and
other electronic devices. Its basic job is to receive input and provide
the appropriate output.

 RAM:512 MB Ram

 HARD DISK: 10GB

1
A hard disk is part of a unit, often called a "disk drive," "hard drive," or
"hard disk drive," that store and provides relatively quick access to large
amounts of data on an electromagnetically charged surface or set of
surfaces.

Software Requirement Specification

 Purpose However , the purpose of this project is to develop a java


chat application. The objective of this process is as follows;

1. To develop an instant messaging solution to enable users to seamlessly


communicate with each other.

2. The project should be very easy to use enabling even a novice person to
use it.

1
Software Specification:

Front-end Tool: -CORE JAVA (JFRAM, JSWING).

 OPERATING SYSTEM: Widows 7/8/10.

An Operating System is a computer program that manages the resources of


a computer. It accepts keyboard or mouse inputs from users and displays
the results of the actions and allows the user to run applications, or
communicate with other computers via networked connections.

 Project Scope & Features

1. Broadcasting Chat Server Application is going to be a text communi-


cation software, it will be able to communicate between two computers
using point to point communication.

2. The limitation of Live Chat is it does not support audio conversations. To


overcome this limitation we are concurrently working on developing better
technologies.

1
3. Companies would like to have a communication software wherein they
can communicate instantly within their organization.

4. The fact that the software uses an internal network setup within the
organization makes it very secure from outside attacks.

1
 PROJECT SUMMARY

 Project Background The previous work of this already exists. The


similar application can be found on the project either Android
market. This project will focus on pro- viding high quality usability
experiences to users mainly following Googles user interface
guideline. Experiments The application will be tested on a test group
to improve the usability quality based on the user’s feedback.
 Functional and Non Functional Requirements
 Functional Requirements

1. User Registration User must be able to register for the application through a
valid phone number. On installing the application, user must be prompted to
reg- ister their phone number. If user skips this step, application should close.
The users phone number will be the unique identifier of his/her account on
Chat Application.

2. Adding New Contacts The application should detect all contacts from the
users phone book. If any of the contacts have user accounts with Chat
Application, those contacts must automatically be added to the users contact
list on Chat 8

1. yet registered on Chat Application, user should be provided with an invite


option that sends those contacts a regular text message asking them to join
Chat Appli- cation along with a link to the Chat Application on Google
Playstore.

1
2. 3. Send Message User should be able to send instant message to any
contact on his/her Chat Application contact list. User should be notified
when message is successfully delivered to the recipient by displaying a tick
sign next to the message sent.

3. 4. Broadcast Message User should be able to create groups of contacts.


User should be able to broadcast messages to these groups. 5. Message
Status User must be able to get information on whether the message sent
has been read by the intended recipient. If recipient reads the message, 2
ticks must appear next to the message read.

1
 Non Functional Requirements

1. Privacy Messages shared between users should be encrypted to maintain


pri- vacy.

2. Robustness In case users device crashes, a backup of their chat history must
be stored on remote database servers to enable recoverability.

3. Performance Application must be lightweight and must send messages


instantly

1
SYSTEM DESIGN

Systems design is the process of defining the architecture, components,


modules, interfaces, and data for a system to satisfy specified
requirements. One could see it as the application of systems theory to
product development. There is some overlap with the disciplines of systems
analysis, systems architecture and systems engineering. If the broader topic
of product development "blends the perspective of marketing, design, and
manufacturing into a single approach to product development," then
design is the act of taking the marketing information and creating the
design of the product to be manufactured. Systems design is therefore the
process of defining and developing systems to satisfy specified
requirements of the user.

Until the 1990s systems design had a crucial and respected role in the data
processing industry. In the 1990s standardization of hardware and software
resulted in the ability to build modular systems. The increasing importance
of software running on generic platforms has enhanced the discipline of
software engineering.

1
 DESIGN OVERVIEW It goes through logical and physical with emphasis
on preparing input / output specifications, specification of implementation
program;

The following points were kept in mind while designing the new system.
1) Data entry and data editing through well laid screen format
2) Data validation, whenever necessary to ensure correctness of input data
3) Reduce the redundancy
4) Should be menu driven
5) Data security
6) The system should be user friendly
Logical design
It covers following aspects:
1) Review of the current system.
2) Preparation of input specification.
3) Preparation of output specification.
4) Preparation of logical design.

Physical design

It covers following aspects:

1) Design database.
2) Specify input/output screen.
3) Specify the report.

1
DESIGNAPPROACH

Design is a meaningful engineering representation of something that is to


be built. It can be traced to a customer’s requirement and at the same time
assessed for quality against a set of predefined criteria for ‘good’ design. In
the software engineering context, the design focuses on four major areas of
concern, data, architecture, interfaces and components.

1) User requirements specifications, documentation in the form of SRS.

2) High Level Systems Documentations in the form of HLD manual.

3) Level System Documentation in the form of LLD manual.

4) User requirements Manual/Guide. Operations manual to aid the users in

running the designated system.

1
WATERFALL MODEL

The waterfall model is a sequential design process, often used in software


development process in which progress is seen as flowing steadily
downwards (like a waterfall) through the phases of Conception, initiation
analysis design, Construction, Testing, Production/Implementation and
Maintenance. The waterfall model is a popular version of the systems
development life cycle model for software engineering. Often considered
the classic approach to the systems development life cycle, the waterfall
model describes a development method that is linear and sequential.
Waterfall development has distinct goals for each phase of development.

1
1
REQUIREMENTS

A software requirements specification (SRS) – a requirements specification


for a software system – is a complete description of the behavior of a
system to be developed. It includes a set of use cases that describe all the
interactions the users will have with the software.

DESIGN
Software design is a process of problem solving and planning for a
software solution. After the purpose and specifications of software are
determined, software developers will design or employ designers to
develop a plan for a solution. It includes low-level component and
algorithm implementation issues as well as the architectural view.

IMPLEMENTATION
An implementation is a realization of a technical specification or algorithm
as a program, software component or other computer system through
programming and deployment. For example, web browsers contain
implementations of World Wide Web Consortium-recommended
specifications, and software development tools contain implementations of
programming languages.

1
VERIFICATION Comparison of two or more items, or the use of
supplementary test, to ensure the accuracy, correctness or truth of the
information.

MAINTENANCE The waterfall model maintains that one should move


into a phase only when it’s preceding phase is completed and perfected.
Phases of development in the waterfall model are thus discrete, and there
is no jumping back and forth or overlap between them. As many find this
approach, particularly rigid, modifications have been made over the years
and new variants of the model have emerged.

1
SOFTWARE DEVELOPMENT LIFE CYCLE (SDLC).Software life

cycle models describe phases of the software cycle and the order in which
those phases are executed. There are tons of models, and many companies
adopt their own, but all have very similar patterns. The general, basic
model is shown below: Each phase produces deliverables required by the
next phase in the life cycle. Requirements are translated into design. Code
is produced during implementation that is driven by the design. Testing
verifies the deliverable of the implementation phase against requirements.

REQUIREMENTS Business requirements are gathered in this phase. This


phase is the main focus of the project managers and stakeholders.
Meetings with managers, stakeholders and others are held in order to
determine the requirements. Who is going to use the system? How will
they use the system? What data should be input into the system? What
data should be output by the system? These are general questions that get
answered during a requirements gathering phase. This produces a nice big
list of functionality that the system should provide, which describes
functions the system should perform, business logic that processes data,
what data is stored and used by the system, and how the user interface

1
should work. The overall result is the system as a whole and how it
performs, not how it is actually going to do it.

DESIGN The software system design is produced from the results of the
requirements phase. Architects have the ball in their court during this
phase and this is the phase in which their focus lies. This is where the
details on how the system will work are produced. Architecture, including
hardware andsoftware, communication, software design (UML is produced
here) are all part of the deliverables of a design phase.

IMPLEMENTATION Code is produced from the deliverables of the


design phase during implementation and this is the longest phase of the
software development life cycle. For a developer, this is the main focus of
the life cycle because this is where the code is produced. Implementation
my overlaps with both the design and testing phases. Many tools exist
(CASE tools) to actually automate the production of code using information
gathered and produced during the design phase.

1
TESTING During testing, the implementation is tested against the
requirements to make sure that the product is actually solving the needs
addressed and gathered during the requirements phase. Unit tests and
system/acceptance tests are done during this phase. Unit tests act on a
specific component of the system, while system tests act on the system as a
whole. So in a nutshell, that is a very basic overview of the general software
development life cycle model. Now let’s delve into some of the traditional
and widely used variations.

1
 DATA FLOW DIAGRAM: -Window for input fee details of students
Window for search and print and delete student Window for print of full
database of student fee detail.

1. Window for input fee details of students: -throughthis input the detail
of Student ID, Name, Email, course, fees,paid, Address, city, state, contact.

1
2. DATABASE: - Here all the data are saved which is input from the
Window for input fee details of students.

3. Window for search and print and delete student detail: - From this
window the individually perform the action on the Printing and Deleting of
any students fee detail by searching their roll no.

4. Window for print of full database of student fee detail: - Through this
window we can print the whole Students fee detail by one click.

1
UML Approach

UML Diagram

A diagram is the graphical presentation of a set of elements, most often


rendered as a connected graph of vertices and arcs. You draw diagram to
visualize a system from different perspective, so a diagram is a
projection into a system. For all but most trivial systems, a diagram
represents an elided view of the elements that make up a system. The
same element may appear in all diagrams, only a few diagrams, or in no
diagrams at all. In theory, a diagram may contain any combination of
things and relationships. In practice, however, a small number of
common combinations arise, which are consistent with the five most
useful views that comprise the architecture of a software-intensive
system. For this reason, the UML includes nine such diagrams:

1. Class diagram

2. Object diagram

3. Use case diagram

4. Sequence diagram

5. Collaboration diagram

6. State chart diagram

7. Activity diagram

8. Component diagram

1
Use Case Table Figure

A use case diagram in the Unified Modeling Language (UML) is a type of


behavioral diagram defined by and created from a use-case analysis. Its purpose is
to present a graphical overview of the functionality provided by a system in terms
of actors, their goals (represented as use cases), and any dependencies between
those use cases.

1
SYSTEM IMPLEMENTATION

 Introduction:
Implementation is the stage of the project when the theoretical design is turned out
into a working system. Thus it can be considered to be the most critical stage in
achieving a successful new system and in giving the user, confidence that the new
system will work and be effective.

The implementation stage involves careful planning, investigation of the existing


system and it’s constraints on implementation, designing of methods to achieve
changeover and evaluation of changeover methods.

1
 SIMPLE CODE:-All Simple code is a front end is core java
and

1)Chat .java

/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

package chats;

/**

* @author india hp

*/

public class Chats {

/**

1
* @param args the command line arguments

*/

public static void main(String[] args) {

// TODO code application logic here

1
(2)server.java

/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

package chats;

import static chats.chat_client.dout;

import java.io.DataInputStream;

import java.io.DataOutputStream;

import java.net.ServerSocket;

import java.net.Socket;

/**

* @author india hp

1
*/

public class chat_server extends javax.swing.JFrame {

/**

* Creates new form chat_server

*/

static ServerSocket ss;

static Socket s;

static DataInputStream din;

static DataOutputStream dout;

public chat_server() {

initComponents();

setSize(565,485);

/**

* This method is called from within the constructor to initialize the form.

* WARNING: Do NOT modify this code. The content of this method is always

1
* regenerated by the Form Editor.

*/

@SuppressWarnings("unchecked")

// <editor-fold defaultstate="collapsed" desc="Generated Code">

private void initComponents() {

jScrollPane1 = new javax.swing.JScrollPane();

msg_area = new javax.swing.JTextArea();

msg_text = new javax.swing.JTextField();

msg_send = new javax.swing.JButton();

jPanel1 = new javax.swing.JPanel();

jLabel1 = new javax.swing.JLabel();

jLabel2 = new javax.swing.JLabel();

jPanel2 = new javax.swing.JPanel();

jLabel3 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

1
getContentPane().setLayout(new
org.netbeans.lib.awtextra.AbsoluteLayout());

msg_area.setColumns(20);

msg_area.setRows(5);

jScrollPane1.setViewportView(msg_area);

getContentPane().add(jScrollPane1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(10, 80, 534, 291));

getContentPane().add(msg_text, new
org.netbeans.lib.awtextra.AbsoluteConstraints(10, 390, 426, 46));

msg_send.setBackground(new java.awt.Color(255, 102, 102));

msg_send.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N

msg_send.setText("Send");

msg_send.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

msg_sendActionPerformed(evt);

1
});

getContentPane().add(msg_send, new
org.netbeans.lib.awtextra.AbsoluteConstraints(470, 390, -1, 46));

jPanel1.setLayout(null);

jLabel1.setText("jLabel1");

jPanel1.add(jLabel1);

jLabel1.setBounds(10, 10, 220, 50);

getContentPane().add(jPanel1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 745, 0));

jLabel2.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/chats/68424763-isometric-
wallpapers.png"))); // NOI18N

getContentPane().add(jLabel2, new
org.netbeans.lib.awtextra.AbsoluteConstraints(0, 64, 550, 380));

jPanel2.setBackground(new java.awt.Color(51, 255, 51));


1
jPanel2.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

jLabel3.setFont(new java.awt.Font("Tempus Sans ITC", 0, 36)); // NOI18N

jLabel3.setForeground(new java.awt.Color(51, 51, 255));

jLabel3.setText("Server Side");

jPanel2.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(20,


10, 260, 40));

getContentPane().add(jPanel2, new
org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 550, 70));

pack();

}// </editor-fold>

private void msg_textActionPerformed(java.awt.event.ActionEvent evt)

private void msg_sendActionPerformed(java.awt.event.ActionEvent evt) {

1
try{

String msgout="";

msgout =msg_text.getText().trim();

dout.writeUTF(msgout);

catch(Exception e){

} // TODO add your handling code here:

/**

* @param args the command line arguments

*/

public static void main(String args[]) {

/* Set the Nimbus look and feel */

//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code


(optional) ">

/* If Nimbus (introduced in Java SE 6) is not available, stay with the default


look and feel.

1
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html

*/

try {

for (javax.swing.UIManager.LookAndFeelInfo info :


javax.swing.UIManager.getInstalledLookAndFeels()) {

if ("Nimbus".equals(info.getName())) {

javax.swing.UIManager.setLookAndFeel(info.getClassName());

break;

} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(chat_server.class.getName()).log(java.util.loggi
ng.Level.SEVERE, null, ex);

} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(chat_server.class.getName()).log(java.util.loggi
ng.Level.SEVERE, null, ex);

} catch (IllegalAccessException ex) {

1
java.util.logging.Logger.getLogger(chat_server.class.getName()).log(java.util.loggi
ng.Level.SEVERE, null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(chat_server.class.getName()).log(java.util.loggi
ng.Level.SEVERE, null, ex);

//</editor-fold>

/* Create and display the form */

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new chat_server().setVisible(true);

});

String msgin= "";

try

1
{

ss=new ServerSocket(1201);

s=ss.accept();

din=new DataInputStream(s.getInputStream());

dout=new DataOutputStream(s.getOutputStream());

while(!msgin.equals("exit")){

msgin=din.readUTF();

msg_area.setText(msg_area.getText().trim()+"\nClient:"+msgin);

catch(Exception e)

1
}

// Variables declaration - do not modify

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

private javax.swing.JPanel jPanel1;

private javax.swing.JPanel jPanel2;

private javax.swing.JScrollPane jScrollPane1;

private static javax.swing.JTextArea msg_area;

private javax.swing.JButton msg_send;

private javax.swing.JTextField msg_text;

// End of variables declaration

1
(3)client.java

/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

package chats;

import java.io.DataInputStream;

import java.io.DataOutputStream;

import java.net.Socket;

/**

* @author india hp

*/

public class chat_client extends javax.swing.JFrame {

1
static Socket s;

static DataInputStream din;

static DataOutputStream dout;

/**

* Creates new form chat_client

*/

public chat_client() {

initComponents();

setSize(575,460);

/**

* This method is called from within the constructor to initialize the form.

* WARNING: Do NOT modify this code. The content of this method is always

* regenerated by the Form Editor.

*/

@SuppressWarnings("unchecked")

1
// <editor-fold defaultstate="collapsed" desc="Generated Code">

private void initComponents() {

jScrollPane1 = new javax.swing.JScrollPane();

msg_area = new javax.swing.JTextArea();

msg_text = new javax.swing.JTextField();

msg_send = new javax.swing.JButton();

jPanel1 = new javax.swing.JPanel();

jPanel2 = new javax.swing.JPanel();

jPanel3 = new javax.swing.JPanel();

jLabel1 = new javax.swing.JLabel();

jLabel2 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

getContentPane().setLayout(new
org.netbeans.lib.awtextra.AbsoluteLayout());

msg_area.setColumns(20);

1
msg_area.setRows(5);

jScrollPane1.setViewportView(msg_area);

getContentPane().add(jScrollPane1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(10, 80, 540, 270));

getContentPane().add(msg_text, new
org.netbeans.lib.awtextra.AbsoluteConstraints(10, 370, 440, 45));

msg_send.setBackground(new java.awt.Color(255, 102, 102));

msg_send.setFont(new java.awt.Font("Tw Cen MT", 1, 18)); // NOI18N

msg_send.setText("Send");

msg_send.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

msg_sendActionPerformed(evt);

});

getContentPane().add(msg_send, new
org.netbeans.lib.awtextra.AbsoluteConstraints(460, 370, 86, 45));

1
jPanel1.setLayout(null);

getContentPane().add(jPanel1, new
org.netbeans.lib.awtextra.AbsoluteConstraints(0, -10, 0, 0));

javax.swing.GroupLayout jPanel2Layout = new


javax.swing.GroupLayout(jPanel2);

jPanel2.setLayout(jPanel2Layout);

jPanel2Layout.setHorizontalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGap(0, 0, Short.MAX_VALUE)

);

jPanel2Layout.setVerticalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGap(0, 70, Short.MAX_VALUE)

);

getContentPane().add(jPanel2, new
org.netbeans.lib.awtextra.AbsoluteConstraints(10, 0, -1, -1));
1
jPanel3.setBackground(new java.awt.Color(0, 255, 255));

jPanel3.setBorder(javax.swing.BorderFactory.createCompoundBorder());

jPanel3.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

jLabel1.setBackground(new java.awt.Color(51, 255, 255));

jLabel1.setFont(new java.awt.Font("Tempus Sans ITC", 1, 36)); // NOI18N

jLabel1.setForeground(new java.awt.Color(0, 51, 204));

jLabel1.setText("Client Side");

jPanel3.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10,


10, 290, 50));

getContentPane().add(jPanel3, new
org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 600, 70));

jLabel2.setBackground(new java.awt.Color(51, 51, 255));

jLabel2.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/chats/background1.png"))); //
NOI18N

1
getContentPane().add(jLabel2, new
org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 600, 420));

pack();

}// </editor-fold>

private void msg_textActionPerformed(java.awt.event.ActionEvent evt)

private void msg_sendActionPerformed(java.awt.event.ActionEvent evt) {

try{

String msgout="";

msgout =msg_text.getText().trim();

dout.writeUTF(msgout);

catch(Exception e){

1
}

// TODO add your handling code here:

/**

* @param args the command line arguments

*/

public static void main(String args[]) {

/* Set the Nimbus look and feel */

//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code


(optional) ">

/* If Nimbus (introduced in Java SE 6) is not available, stay with the default


look and feel.

* For details see


http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html

*/

try {

for (javax.swing.UIManager.LookAndFeelInfo info :


javax.swing.UIManager.getInstalledLookAndFeels()) {

1
if ("Nimbus".equals(info.getName())) {

javax.swing.UIManager.setLookAndFeel(info.getClassName());

break;

} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(chat_client.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);

} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(chat_client.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);

} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(chat_client.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {

1
java.util.logging.Logger.getLogger(chat_client.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);

//</editor-fold>

/* Create and display the form */

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new chat_client().setVisible(true);

});

// this.setState(Jframe.Iconfield);

try{

s=new Socket("127.0.0.1",1201);

din=new DataInputStream(s.getInputStream());

dout=new DataOutputStream(s.getOutputStream());

1
String msgin="";

while(!msgin.equals("exit")){

msgin=din.readUTF();

msg_area.setText(msg_area.getText()+"\nServer:"+msgin);

}catch(Exception e){

// Variables declaration - do not modify

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel2;

private javax.swing.JPanel jPanel1;

1
private javax.swing.JPanel jPanel2;

private javax.swing.JPanel jPanel3;

private javax.swing.JScrollPane jScrollPane1;

private static javax.swing.JTextArea msg_area;

private javax.swing.JButton msg_send;

private javax.swing.JTextField msg_text;

// End of variables declaration

1
SYSTEM TESTING:-

Software testing is an investigation conducted to provide stakeholders with


information about the quality of the product or service under test.
Software testing can also provide an objective, independent view of the
software to allow the business to appreciate and understand the risks of
software implementation. Test techniques include, but are not limited to,
the process of executing a program or application with the intent of finding
software bugs (errors or other defects Testing is the process of reviewing
and executing a program with an intention to identify the errors. After
completing and integrating the software module, software must be tested
to uncover as many errors as possible before delivering to our customers.
Testing is a process of executing with the intent of finding an error.

Software testing is a crucial element of software quality assurance and


represents the ultimate review of specification, design and code
generation. Basically, once the code (source) has been generated s/w must
be tested to uncover and correct as many errors as possible before delivery
to your customer. The objective of s/w testing is to uncover errors [23]. To
uncover all possible errors of our project we are going to perform following
four tastings:

1
 BLACK BOX TESTING:-Black Box Testing is also known as ‘BEHAVIORAL
TESTING’ which focuses on the functional requirements of the s/w. Black
box testing enables the s/w engineer to derive sets of input condition that
will fully exercise all functional requirements for a program. Black-box
testing treats the software as a "black box"—without any knowledge of
internal implementation. Black-box testing methods include: equivalence
partitioning, boundary value analysis, all-pairs testing, fuzz testing, model-
based testing, exploratory testing and specification- based testing.

 ISSUE WITH BLACK BOX TESTINGIt is possible to test all inputs? Without
complete knowledge of internal workings it is difficult to design test cases.
Black box testing is also called Behavioral testing, focuses on the functional
requirements of the software. That is black box testing enables us to derive
sets of input conditions that will fully exercise all functional requirements of
the program. Black box testing is not an alternative to White box testing.
Rather, it is complimentary approach that is likely to uncover a different
class of errors than white box methods.

1) Black box testing attempts to find errors.

2) Incorrect or missing functions.

3) Interface errors.

4) Errors in data structure or external database access.

1
5) Behavior or performance errors.

6) Initialization and termination errors.

Black box tests are used to demonstrate that the software is functioning
properly, that is, input is properly accepted and output is correctly
produced and that the integrity of external information is maintained. A
black box test examines fundamental aspects of a system with little regard
for the internal logical structure of the s/w.

1
WHITE BOX TESTINGAlthough Visual Basic 6 it is capable to judge the
control structure errors quite accurately, but still to ensure that the correct
logical flow of coding, white box testing is required. White box testing of
software is predicted on close examination procedural detail. Logical paths
through the software are tested by providing test cases that exercise
specific sets of condition and/or loops. The status of the program may be
examined at various points to determine if the expected or asserted status
corresponds to the actual status. But in practice it is revealed that taking
logical paths is almost impossible even for small program and hence several
white box testing is done on a small number of paths where the flow of
data is important from result point of view. White box testing is also called,
as glass box testing is a case design method that used the control structures
of the procedural design test case. Using white box some tests were
derived that:

1) Guarantee that all independent paths within a module have been


exercised at least once.

2) Exercise all logical decisions on their true and false sides.

3) Execute all selected loops at their boundaries and within their


operational bounds.

4) Exercise internal data structures to ensure their validity. White-box


testing is when the tester has access to the internal data structures and
algorithms including the code that implement these. We are using an
acceptance testing in our project

1
ACCEPTANCE TESTINGAcceptance 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.

ALPHA TESTINGAlpha 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 off-the-shelf software as a form of
internal acceptance testing, before the software goes to beta testing.

BETA TESTINGBeta testing comes after alpha testing and can be


considered a form of external user acceptance 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.

1
ADVANTAGES OF ACCEPTANCE TESTING

ESTABLISH BASELINES READINGS


Many electrical test results are objective or must be trended with previous
test results. For example, a transformer insulation resistance test could
appear acceptable until it is compared with the transformers acceptance
values.

VERIFY INTEGRITY OF COMPONENTS. Manufacturers of electrical


equipment strive to provide the best products. Major Insurance Carriers
recommend that Infrared Testing (CNA Letter).

VERIFY PROPER INTERFACE B/WCOMPONENTS


/COMMISSIONINGhow many people are involved in your latest project?
One or more equipment manufacturers, multiple engineers a construction
company and an electrical contractor? Finding a problem on the first day of
energization is too late! One minor equipment or wiring problem can delay
project completion by hours or even days. Building Assessment Group, Inc.
Can provide you "Third Party Litigation" to assist you with peace of mind
regarding the proper interface of components is in place.

1
INPUT AND OUTPUT SCREEN DESIGN

1
Server page

1
Client Side

1
1
1
1
CONCLUSION

Now days computerizations of the existing manual system are going on a


large scale because of the versatility, speed, accuracy and diligence it offers
to its users. Computers provide practical means to organize things
systematically and economically in the organization the use of computers for
managing transactions; information processing and preparation of reports
can prove to be a blessing. The project in discussion is an attempt to attain
all the above said objectives. Its development was mean to replace the
manual system and to achieve the goal to maximum accuracy and most
efficiently. But like every other system might process faults to its credits and
has its own limitation. Neglecting these few negations, the project can be
called a stepping stone to automate processes in organizations. This project
have faster than human, but have some limitation like need to run this
electricity, computer of required configuration.

1
BIBLOGRAPHY

1)javatpoint
www.javatpoint.com
2.reference book
3.www.youtube.com

Вам также может понравиться