Beruflich Dokumente
Kultur Dokumente
DECLARATION
We hereby declare that this project report entitled ANDROID APP ON STUDENT
FACULTY INTERACTION has been prepared by us during the period January 2015
March 2015, in partial fulfillment of the requirements for the award of degree of
CSE(COMPUTER SCIENCE AND ENGINEERING).
G.K.S.SARMA
K.SSSSDVPRASAD
K.BHARADWAJ
G.SHIVA
B.BHANU CHANDAR
11Q71A0529
11Q71A0554
11Q71A0552
11Q71A0530
11Q71A0506
ACKNOWLEDGEMENT
Isaac Newton says, If I have seen a little further, it is by standing on the shoulders of
giants. I'm not Isaac Newton, but the same is true for me.
We are very much thankful to our principal Prof. P. Krishna Rao garu, for permitting
and encouraging me in doing this project.
At the outset, with great solemnity and sincerity, we would like to thank
Mr.
Y.Ramesh Kumar, Head of the Department, Computer Science and Information Technology,
for his encouragement and valuable guidelines during our study in the department. I am deeply
motivated by his valuable guidance and kind cooperation throughout the making of the project.
We offer our profuse thanks to Mr. Ch. Kodanda Ram, Associate Professor,
Department of computer science, for guiding us all through our project work, giving a right
direction and shape to our learning.
Finally, we would like to thank all staff members and technicians for their continuous
cooperation and encouragement.
CONTENTS
S.No. Topic
Page No
1. INTRODUCTION
1.1. Introduction to Project
1.4.Organization of Documentation
10
2. SYSTEM REQUIREMENTS
2.1. Overview of Application
12
12
12
13
13
13
25
32
32
3. SYSTEM ANALYSIS
3.1. Introduction
34
34
35
35
35
36
4. SYSTEM DESIGN
4.1. Introduction
37
40
42
43
44
45
46
47
48
49
50
5. Implementation
5.1. Introduction
51
52
55
6. OUTPUT SCREENS
66
74
8. CONCLUSION
81
9. BIBLIOGRAPHY
82
83
ABSTRACT
1. Introduction
1.1 Introduction to Project
This android application is mainly developing for online interacion about
student and faculty.In this app every student and faculty has its own username
and password for logon to the application. There are three modules inthis app
Admin
Student
Faculty
1.2 Objective of the Project
The project Student Faculty Interaction is designed and developed on Android platform
using Java Language and SQLite. This project lends a helping hand to students in sending their
doubts in the app itself. This project is developed to provide the student with message system and
to get the solution/answer issued in the app itself. This project accepts any inputs and displays
the required output within no time.
1.3Problem Definition
Post doubts
Sharing ideas
Faculty can view and send their solution to their respective subjects.
In this application we are aiming for the student and faculty interaction ,where in earlier
applications and portals of specific colleges, we dont have idea sharing between the student and
faculty. In previous ideas they provide college portals for the information about the college.
And there give the college details and faculty details and subjects etc, but they dont give
the interaction. They can provide information about the academic year and student details and
further details about
DISADVANTAGES:
. No interaction between faculty and student
Subject wise doubt clarification is not there.
No communication .
1.6.Proposed System:
Proposed system is an automated Student-Faculty Interaction. Firstly he should
register with his id number into the app and then log on to the app. After login he can
send doubts. This paper represents online interaction of student and faculty. In this
app student can post his doubts corresponding to subject and branch. At the same
time faculty can give answers to their doubts corresponding to his assigned
subjects.This app is mainly developing for specifc college.The main advantage of
8
this app is student and faculty can download this app and make interaction and
share the ideas.
2. System Requirements
2.1 Introduction
A Software Requirement specification (SRS) is a complete description of the behavior of
the system to be developed. It includes set of use cases that describe all the interactions the users
will have with the software. Use cases are also known as functional requirements. In addition to
use cases, the SRS also contains non-functional (or supplementary) requirements. Non-functional
requirements are requirements which impose constraints on the design or implementation (such
as performance engineering requirements, quality standards, or design constraints)
requirements describing all the cases where the system uses the functional requirements are
captured in the usecases. Functional requirements are supported by non-functional requirements
(also known as quality requirements), which impose constraints on the design or implementation
(such as performance requirements, security, or reliability). How a system implements functional
requirements is detailed in the system design. In some cases a requirements analyst generates use
cases after gathering and validating a set of functional requirements. Each use case illustrates
behavioral scenarios through one or more functional requirements. Often, through an analyst will
begin by elicting a set of use cases, from which the analyst can derive the functional
requirements that must be implemented to allow a user to perform each use case.
Functional Requirements
2.4.System Requirements
To be used efficiently,all computer software needs certain hardware components or other
software resources to e present on a computer.these pre-requisites are known as system
requirements and are often used as aguideline as opposed to an absolute rule. Most software
defines two sets of system requirements:min imum and recommended. With increasing demand
for higher processing power and resources in newer versions of software,system requirements
tend to increase over time. Industry analysts suggest that this trend plays a bigger part in driving
upgrades to existing computer system than technological advancements.
10
Front end
Back End
Tools used
Operating system
Database
:
:
:
:
:
Java, Android.
java, JSON
Android SDK, Eclipse.
Windows 7
SQL
Simple
Architecture neutral
Object oriented
Portable
Distributed
High performance
Interpreted
Multithreaded
Robust
Dynamic
Secure
With most programming languages, you either compile or interpret a program so that you
can run it on your computer. The Java programming language is unusual in that a program is
11
both compiled and interpreted. With the compiler, first you translate a program into an
intermediate language called Java byte codes the platform-independent codes interpreted by
the interpreter on the Java platform. The interpreter parses and runs each Java byte code
instruction on the computer. Compilation happens just once; interpretation occurs each time the
program is executed. The following figure illustrates how this works.
already mentioned some of the most popular platforms like Windows 2000, Linux, Solaris,
and MacOS. Most platforms can be described as a combination of the operating system and
hardware. The Java platform differs from most other platforms in that its a software-only
platform that runs on top of other hardware-based platforms.
The Java platform has two components:
Youve already been introduced to the Java VM. Its the base for the 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.
The next section, What Can Java Technology Do? Highlights what functionality some of the
packages in the Java API provide.
The following figure depicts a program thats running on the Java platform. As the
figure shows, the Java API and the virtual machine insulate the program from the hardware.
Native code is code that after you compile it, the compiled code runs on a specific
hardware platform. As a platform-independent environment, the Java platform can be a bit
slower than native code. However, smart compilers, well-tuned interpreters, and just-in-time
byte code compilers can bring performance close to that of native code without threatening
portability.
13
The essentials: Objects, strings, threads, numbers, input and output, data
Security: Both low level and high level, including electronic signatures, public
component architectures.
Object serialization: Allows lightweight persistence and communication via
Remote Method Invocation (RMI).
extendible API let you reuse other peoples tested code and introduce fewer bugs.
Develop programs more quickly: Your development time may be as much as
twice as fast versus writing the same program in C++. Why? You write fewer lines
15
Distribute software more easily: You can upgrade applets easily from a central
server. Applets take advantage of the feature of allowing new classes to be loaded
Secure
Architectural neutral
Object oriented
Portable
Distributed
High Performance
Interpreted
Multithreaded
Secure
Java is also unusual in that each Java program is both compiled and interpreted. With a
compile you translate a Java program into an intermediate language called Java byte codes
the platform-independent code instruction is passed and run on the computer.
Compilation happens just once; interpretation occurs each time the program is executed.
The figure illustrates how this works.
You can think of Java byte codes as the machine code instructions for the Java Virtual
Machine (Java VM). Every Java interpreter, whether its a Java development tool or a Web
browser that can run Java applets, is an implementation of the Java VM. The Java VM can
also be implemented in hardware.
Java byte codes help make write once, run anywhere possible. You can compile your
Java program into byte codes on my platform that has a Java compiler. The byte codes can
then be run any implementation of the Java VM. For example, the same Java program can
run Windows NT, Solaris, and Macintosh.
Java provides more packages to develop all kind of applications and applets. Some of
them are listed below.
java.lang - handles all basic operations and contains the data types.
16
Platform Independence
Swing is platform independent both in terms of its expression (Java) and its
Extensibility
Swing is a highly partitioned architecture, which allows for the "plugging" of various
custom implementations of specified framework interfaces: Users can provide their own
custom implementation(s) of these components to override the default implementations. In
general, Swing users can extend the framework by extending existing (framework) classes
and/or providing alternative implementations of core components.
Component-oriented
Swing is a component-based framework. The distinction between objects and
17
Given the programmatic rendering model of the Swing framework, fine control over
the details of rendering of a component is possible in Swing. As a general pattern, the visual
representation of a Swing component is a composition of a standard set of elements, such as
a "border", "inset", decorations, etc. Typically, users will programmatically customize a
standard Swing component (such as a JTable) by assigning specific Borders, Colors,
Backgrounds, opacities, etc., as the properties of that component. The core component will
then use these properties (settings) to determine the appropriate renderers to use in painting
its various aspects. However, it is also completely possible to create unique GUI controls
with highly customized visual representation.
Configurable
Swing's heavy reliance on runtime mechanisms and indirect composition patterns
allows it to respond at runtime to fundamental changes in its settings. For example, a Swingbased application can change its look and feel at runtime. Further, users can provide their
own look and feel implementation, which allows for uniform changes in the look and feel of
existing Swing applications without any programmatic change to the application code.
Lightweight UI
Swing's configurability is a result of a choice not to use the native host OS's GUI
controls for displaying itself. Swing "paints" its controls programmatically through the use of
Java 2D APIs, rather than calling into a native user interface toolkit. Thus, a Swing
component does not have a corresponding native OS GUI component, and is free to render
itself in any way that is possible with the underlying graphics APIs. However, at its core
every Swing component relies on an AWT container, since (Swing's) JComponent extends
(AWT's) Container. This allows Swing to plug into the host OS's GUI management
framework, including the crucial device/screen mappings and user interactions, such as key
presses or mouse movements. Swing simply "transposes" its own (OS agnostic) semantics
over the underlying (OS specific) components. So, for example, every Swing component
paints its rendition on the graphic device in response to a call to component. Paint (), which
18
is defined in (AWT) Container. But unlike AWT components, which delegated the painting to
their OS-native "heavyweight" widget, Swing components are responsible for their own
rendering.
This transposition and decoupling is not merely visual, and extends to Swing's
management and application of its own OS-independent semantics for events fired within its
component containment hierarchies. Generally speaking, the Swing Architecture delegates
the task of mapping the various flavors of OS GUI semantics onto a simple, but generalized,
pattern to the AWT container. Building on that generalized platform, it establishes its own
rich and complex GUI semantics in the form of the JComponent model. A review of the
source of container. Java and JComponent.java classes are recommended for further insights
into the nature of the interface between Swing's lightweight components and AWT's
heavyweight widgets.
Loosely-Coupled/MVC
The Swing library makes heavy use of the Model/View/Controller software design
pattern, which conceptually decouples the data being viewed from the user interface controls
through which it is viewed. Because of this, most Swing components have associated models
(which are specified in terms of Java interfaces), and the programmer can use various default
implementations or provide their own. The framework provides default implementations of
model interfaces for all of its concrete components.
Typically, Swing component model objects are responsible for providing a concise
interface defining events fired, and accessible properties for the (conceptual) data model for
use by the associated JComponent. Given that the overall MVC pattern is a loosely-coupled
collaborative object relationship pattern, the model provides the programmatic means for
attaching event listeners to the data model object. Typically, these events are model centric
(ex: a "row inserted" event in a table model) and are mapped by the JComponent
specialization into a meaningful event for the GUI component.
For example, the JTable has a model called Table Model that describes an interface
for how a table would access tabular data. A default implementation of this operates on a
19
two-dimensional array. The view component of a Swing JComponent is the object used to
graphically "represent" the conceptual GUI control. A distinction of Swing, as a GUI
framework, is in its reliance on programmatically-rendered GUI controls (as opposed to the
use of the native host OS's GUI controls). This distinction is a source of complications when
mixing AWT controls, which use native controls, with Swing controls in a GUI.
Finally, in terms of visual composition and management, Swing favors relative
layouts (which specify the positional relationships between components) as opposed to
absolute layouts (which specify the exact location and size of components). This bias towards
"fluid"' visual ordering is due to its origins in the applet operating environment that framed
the design and development of the original Java GUI toolkit. (Conceptually, this view of the
layout management is quite similar to that which informs the rendering of HTML content in
browsers, and addresses the same set of concerns that motivated the former.)
(via runtime parameters), deriving from an existing one, by creating one from scratch, or,
beginning with J2SE 5.0, by using the skinnable synth Look and Feel (see Synth Look and
Feel), which is configured with an XML property file. The look and feel can be changed at
runtime, and early demonstrations of Swing frequently provided a way to do this.
JFrame: The JFrame class is slightly incompatible with Frame. Like all other JFC/Swing
top-level containers, a JFrame contains a JRootPane as its only child. The content pane
provided by the root pane should, as a rule, contain all the non-menu components
displayed by the JFrame. This is different from the AWT Frame case.
JPanel: JPanel is an extension of Jcomponent used for grouping together other
the user can raise, or activate, only one of its menus at a given time.
JMenuItem: An implementation of an item in a menu. A menu item is essentially a
button sitting in a list. When the user selects the "button", the action associated with the
21
function.
JTree: The JTree class can build up trees out of several different objects, including a Tree
model. JTree extends directly from JComponent and represent the visual side of any valid
tree structure.
DefaultMutableTreeNode: DefaultMutableTreeNode inherits many of its properties
Introduction To Android:
Android is an open source and Linux-based Operating System for mobile devices
such as smart phones and tablet computers. Android was developed by the Open Handset
Alliance, led by Google, and other companies.
Android offers a unified approach to application development for mobile devices
which means developers need only develop for Android, and their applications should be able
to run on different devices powered by Android.
The first beta version of the Android Software Development Kit (SDK) was released
by Google in 2007 where as the first commercial version, Android 1.0, was released in
September 2008.
On June 27, 2012, at the Google I/O conference, Google announced the next Android
version, 4.1 Jelly Bean. Jelly Bean is an incremental update, with the primary aim of
improving the user interface, both in terms of functionality and performance.
22
The source code for Android is available under free and open source software
licenses. Google publishes most of the code under the Apache License version 2.0 and the
rest, Linux kernel changes, under the GNU General Public License version 2.
Features of Android:
Android is a powerful operating system competing with Apple 4GS and supports great
features. Few of them are listed below:
Feature
Beautiful UI
Connectivity
Description
Android OS basic screen provides a beautiful and intuitive user interface.
GSM/EDGE, IDEN, CDMA, EV-DO, UMTS, Bluetooth, Wi-Fi, LTE, NFC
and WiMAX.
Storage
SQLite, a lightweight relational database, is used for data storage purposes.
Media support H.263, H.264, MPEG-4 SP, AMR, AMR-WB, AAC, HE-AAC, AAC 5.1,
Messaging
Web browser
MP3, MIDI, Ogg Vorbis, WAV, JPEG, PNG, GIF, and BMP
SMS and MMS
Based on the open-source WebKit layout engine, coupled with Chrome's V8
Multi-touch
Multi-tasking
Resizable
widgets
Multi-
Language
GCM
Google Cloud Messaging (GCM) is a service that lets developers send short
message data to their users on Android devices, without needing a proprietary
Wi-Fi Direct
sync solution.
A technology that lets apps discover and pair directly, over a high-bandwidth
Android
peer-to-peer connection.
A popular NFC-based technology that lets users instantly share, just by
Beam
Android Applications:
23
Android
applications are
usually
developed in the
Java
language using
the
Android
Software
Development
Kit.
Once
developed,
Android
applications can be packaged easily and sold out either through a store such as Google
Play or the Amazon Appstore.
Android powers hundreds of millions of mobile devices in more than 190 countries
around the world. It's the largest installed base of any mobile platform and growing fast.
Every day more than 1 million new Android devices are activated worldwide.
This tutorial has been written with an aim to teach you how to develop and package
Android application. We will start from environment setup for Android application
programming and then drill down to look into various aspects of Android applications.
Android Architecture:
Android operating system is a stack of software components which is roughly divided
into five sections and four main layers as shown below in the architecture diagram.
24
Linux kernel:
At the bottom of the layers is Linux - Linux 2.6 with approximately 115 patches. This
provides basic system functionality like process management, memory management, device
management like camera, keypad, display etc. Also, the kernel handles all the things that
Linux is really good at such as networking and a vast array of device drivers, which take the
pain out of interfacing to peripheral hardware.
Libraries:
On top of Linux kernel there is a set of libraries including open-source Web browser
engine WebKit, well known library libc, SQLite database which is a useful repository for
storage and sharing of application data, libraries to play and record audio and video, SSL
libraries responsible for Internet security etc.
Android Runtime:
25
This is the third section of the architecture and available on the second layer from the
bottom. This section provides a key component called Dalvik Virtual Machine which is a
kind of Java Virtual Machine specially designed and optimized for Android.
The Dalvik VM makes use of Linux core features like memory management and
multi-threading, which is intrinsic in the Java language. The Dalvik VM enables every
Android application to run in its own process, with its own instance of the Dalvik virtual
machine.
The Android runtime also provides a set of core libraries which enable Android
application developers to write Android applications using standard Java programming
language.
Application Framework:
The Application Framework layer provides many higher-level services to applications
in the form of Java classes. Application developers are allowed to make use of these services
in their applications.
components
are
loosely
coupled
by
the
application
manifest
file AndroidManifest.xml that describes each component of the application and how they
interact.
There are following four main components that can be used within an Android
application:
Components
Activities
Description
They dictate the UI and handle the user interaction to the smart phone
26
screen
They handle background processing associated with an application.
Services
Broadcast
Receivers
Content Providers
Activities:
An activity represents a single screen with a user interface. For example, an email
application might have one activity that shows a list of new emails, another activity to
compose an email, and another activity for reading emails. If an application has more than
one activity, then one of them should be marked as the activity that is presented when the
application is launched.
An activity is implemented as a subclass of Activity class as follows:
public class MainActivity extends Activity { }
Services:
A service is a component that runs in the background to perform long-running
operations. For example, a service might play music in the background while the user is in a
different application, or it might fetch data over the network without blocking user
interaction with an activity.
A service is implemented as a subclass of Service class as follows:
public class MyService extends Service {}
Broadcast Receivers:
Broadcast Receivers simply respond to broadcast messages from other applications or
from the system. For example, applications can also initiate broadcasts to let other
applications know that some data has been downloaded to the device and is available for
them to use, so this is broadcast receiver who will intercept this communication and will
initiate appropriate action.
27
Content Providers:
A content provider component supplies data from one application to others on
request. Such requests are handled by the methods of the ContentResolver class. The data
may be stored in the file system, the database or somewhere else entirely.
A content provider is implemented as a subclass of ContentProvider class and must
implement a standard set of APIs that enable other applications to perform transactions.
public class MyContentProvider extends ContentProvider {}
We will go through these tags in detail while covering application components in
individual chapters.
Additional Components:
There are additional components which will be used in the construction of above
mentioned entities, their logic, and wiring between them. These components are:
Components
Fragments
Views
Layouts
Description
Represents a behavior or a portion of user interface in an Activity.
UI elements that are drawn onscreen including buttons, lists forms etc.
View hierarchies that control screen format and appearance of the
Intents
Resources
Manifest
views.
Messages wiring components together.
External elements, such as strings, constants and drawables pictures.
Configuration files for the application.
2.4.2.Hardware requirements:
The most common set of requirements defined by any operating system or software application
is the physical computter resources,also known as hardware, A hareware requirements list is
28
2.5.Domain Description:
Data mining involves the use of sophisticated data analysis tools to discover previously
unknown, valid patterns and relationships in large data sets. These tools can include statistical
models, mathematical algorithms, and machine learning methods (algorithms that improve their
performance automatically through experience, such as neural networks or decision trees).
Consequently, data mining consists of more than collecting and managing data, it also includes
analysis and prediction.
Data mining can be performed on data represented in quantitative, textual, or multimedia
forms. Data mining applications can use a variety of parameters to examine the data. They
include association (patterns where one event is connected to another event, such as purchasing a
pen and purchasing paper), sequence or path analysis (patterns where one event leads to another
event, such as the birth of a child and purchasing diapers), classification (identification of new
patterns, such as coincidences between duct tape purchases and plastic sheeting purchases),
clustering (finding and visually documenting groups of previously unknown facts, such as
geographic location and brand preferences), and forecasting (discovering patterns from which
one can make reasonable predictions regarding future activities, such as the prediction that
people who join an athletic club may take exercise classes).
Data mining is used for a variety of purposes in both the private and public sectors.
Industries such as banking, insurance, medicine, and retailing commonly use data mining
to reduce costs, enhance research, and increase sales. For example, the insurance and
banking industries use data mining applications to detect fraud and assist in risk
assessment (e.g., credit scoring).
Using customer data collected over several years, companies can develop models that
predict whether a customer is a good credit risk, or whether an accident claim may be
fraudulent and should be investigated more closely.
The medical community sometimes uses data mining to help predict the effectiveness of a
procedure or medicine.
Pharmaceutical firms use data mining of chemical compounds and genetic material to
help guide research on new treatments for diseases.
Retailers can use information collected through affinity programs (e.g., shoppers, club cards,
frequent flyer points, contests) to assess the effectiveness of product selection and placement
decisions, coupon offers, and which products are often purchased together.
30
3.System Analysis
3.1 Introduction
A system analysis is the process of examining a business situation with the intent of
improving it through better procedures and methods. Software design is a process through which
the requirements are translated into a representation of software. Preliminary design is concerned
with the transformation of requirements into data and software architecture. It must act as a basis
for detailed implementation.
A system analysis is a detailed study of the various operations performed by a system and
their relationships within and outside the system. One aspect of analysis is defining the
boundaries of the system and determining whether a new proposed system should consider other
related items or not.
During analysis various data are collected using the toll like data flow diagrams,
interviews, On-line observations, procedural manuals and questionnaires sensitively to the
subjects being interviewed.
Developing the system, which meets the SRS and solving all the requirements of the
system?
31
Demonstrating the system and installing the system at client's location after the
Economical Feasibility
Technical Feasibility
Social Feasibility
resources. This will lead to high demands on the available technical resources. This will lead to
high demands being placed on the client. The developed system must have a modest
requirement, as only minimal or null changes are required for implementing this system.
33
4. System Design
4.1 Introduction
It is a simple graphical formalism that can be used to represent a system in terms of the
input data to the system, various processing carried out on these data, and the output data is
generated by the system.
Modules:
1. Student Module.
2. Administrator Module: Is used to update or modify the database.
3. Faculty Module
Definition:
UML is a general-purpose visual modeling language that is used to specify, visualize,
construct, and document the artifacts of the software system.
UML is a language:
It will provide vocabulary and rules for communications and function on conceptual
and physical representation. So it is modeling language.
UML Specifying:
Specifying means building models that are precise, unambiguous and complete. In
particular, the UML address the specification of all the important analysis, design and
implementation decisions that must be made in developing and displaying a software
intensive system.
UML Visualization:
The UML includes both graphical and textual representation. It makes easy to
visualize the system and for better understanding.
34
UML Constructing:
UML Documenting:
UML provides variety of documents in addition raw executable codes.
Uses of UML:
The UML is intended primarily for software intensive systems. It has been used
effectively for such domain as
Things:
Things are the data abstractions that are first class citizens in a model.
Structural Things
Behavioral Things
Grouping Things
Annotational Things
Relationships:
Relationships tie the things together. Relationships in the UML are
Dependency
36
Association
Generalization
Specialization
It represents a process that transforms incoming data flow(s) into outgoing data flow(s).
Open Rectangle:
37
login
Student
Database
Faculty
Log out
UML Diagrams:
38
Structural Diagrams
Class Diagram
Component Diagram
Deployment Diagram
Object Diagram
Behavioral Diagrams
Usecase Diagram
Sequence Diagram
Collaboration Diagram
State Chart Diagram
A use case is a set of scenarios that describing an interaction between a user and a
system. A use case diagram displays the relationship among actors and use cases. The two main
components of a use case diagram are use cases and actors. An actor is represents a user or
another system that will interact with the system you are modeling. A use case is an external
view of the system that represents some action the user might perform in order to complete a
task.
The primary goals of Use Case diagrams include:
41
42
describe the state of activities by showing the sequence of activities performed. Activity
diagrams can show activities that are conditional or parallel. Activity diagrams should be used in
conjunction with other modeling techniques such as interaction diagrams and state diagrams.
Activity Diagrams are also useful for: analyzing a use case by describing what actions needs to
take place and when they should occur; describing a complicated sequential algorithm;
44
46
47
4.3.8 Collaboration diagram:A communication diagram in the Unified Modeling Language (UML) 2.0 is a simplified
version of the UML 1.x collaboration diagram.
UML has four types of interaction diagrams:
Sequence diagram
Communication diagram
Timing diagram
48
Communication diagrams show a lot of the same information as sequence diagrams, but because
of how the information is presented, some of it is easier to find in one diagram than the other.
Communication diagrams show which elements each one interacts with better, but sequence
diagrams show the order in which the interactions take place more clearly.
49
5. Implementation
5.1 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 its constraints on implementation, designing of methods to achieve changeover and
evaluation of changeover methods.
The implementation part is the most important phase of the project. In this phase, we
code the entire project in the chosen software according to the design laid during the previous
phase. The code has to be in such a way that the user requirements are satisfied and also not
complicated for the user i.e., the user interface or GUI has to be easy to navigate. The code
should be efficient in all terms like space, easy to update, etc. In this manner, we can complete
the coding part of the project and later it can be sent for testing before being delivered to the
customer.
DATABASE SUPPORT:
Database schema browsing to see the tables, views, and stored procedures defined
in a database
SQL and DDL command execution to help you write and execute more
complicated SQL or DDL commands
The Net Beans IDE also provides full-featured refactoring tools, which allow you to
rename and move classes, fields, and methods, as well as change method parameters. In addition,
you get a debugger and an Ant-based project system.
DATABASE DESCRIPTION:
The data pertaining to proposed system is voluminous hence a careful design of the
database must proceed before storing the data in the database.
A database management system provides flexibility in the storage and retrieval of data.
The DBMS is a bridge between the application program, which determines what data are needed
and how they are processed, and the operating system of the computer, which is responsible for
placing data on the magnetic storage devices.
Characteristics:
Database Administrator:
51
A database administrator is a block of code loaded into memory, which organizes all
information (database) between the users.
The DBA takes care of the following things:
Updating database.
Enforces security
Optimizing queries
NORMALIZATION:
First Normal Form:
A relation R is in first normal form if and only if all underlying domains contains atomic
values only.
52
DATA DICTIONARY:
A data dictionary is a file that contains metadata i.e. data about data. This file is
consulates before actual data are read or modified in the database system. It is also known as
system catalogue. Among the types of information that the system must store all the below items.
5.3.Sample Code
HomeActivity.java
package in.ganesh.model;
import in.ganesh.adapters.SubjectAdapter;
import in.ganesh.controllers.FacultyController;
import in.ganesh.controllers.StudentController;
import in.ganesh.entities.SubjectEntity;
import in.ganesh.util.SessionManagement;
import java.util.List;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
53
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
if(sharedPreferences.contains(SessionManagement.ROLE)) {
roleType = sharedPreferences.getInt(SessionManagement.ROLE, -1);
id = sharedPreferences.getInt(SessionManagement.ID, -1);
name = sharedPreferences.getString(SessionManagement.NAME, "no
name");
}
54
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int position,
long arg3) {
Intent
intent
new
Intent(HomeActivity.this,
MessageActivity.class);
intent.putExtra("id", subjectsList.get(position).getId());
55
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()) {
case R.id.exit : exit(); break;
case R.id.logout : logout();break;
}
return false;
}
56
MainActivity.java
package in.ganesh.model;
import in.ganesh.controllers.FacultyController;
import in.ganesh.controllers.StudentController;
import in.ganesh.entities.FacultyEntity;
import in.ganesh.entities.StudentEntity;
57
import in.ganesh.util.SessionManagement;
import in.ganesh.util.ToastMessages;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RadioGroup;
import android.widget.RadioGroup.OnCheckedChangeListener;
58
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
59
initComponents();
roles.setOnCheckedChangeListener(new OnCheckedChangeListener()
{
@Override
public void onCheckedChanged(RadioGroup arg0, int arg1)
{
switch(arg1)
{
60
break;
}
}
);
loginButton.setOnClickListener(new OnClickListener()
{
authenticateUser();
61
});
}
@Override
pro+tected void onResume()
{
sharedPreferences
=
Context.MODE_PRIVATE);
getSharedPreferences(SessionManagement.FILENAME,
if(sharedPreferences.contains(SessionManagement.ID)
sharedPreferences.contains(SessionManagement.NAME))
{
startActivity(intent);
super.onResume();
62
&&
editor.putInt(SessionManagement.ID, id);
editor.putString(SessionManagement.NAME, username);
editor.putInt(SessionManagement.ROLE, roleType);
editor.commit();
startActivity(intent);
if(roleType == 1)
{
StudentEntity
entity
=
StudentController(this).loginSuccessful(username.getText().toString(),
password.getText().toString()) ;
63
new
if(entity != null)
{
successfulLogin(entity.getName(), entity.getId());
}
else
{
}
else
{
FacultyEntity
entity
=
FacultyController(this).loginSuccessful(username.getText().toString(),
password.getText().toString()) ;
if(entity != null)
{
successfulLogin(entity.getName(), entity.getId());
}
else
64
new
}
}
}
}
MessageActivity.java
package in.ganesh.model;
import in.ganesh.adapters.MessageAdapter;
import in.ganesh.controllers.MessageController;
import in.ganesh.entities.MessageEntity;
import in.ganesh.util.ToastMessages;
import in.ganesh.util.WebResource;
import java.util.ArrayList;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
65
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;
import org.json.JSONArray;
import org.json.JSONObject;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
66
import android.widget.ListView;
67
@Override
public void onClick(View arg0) {
sendMessage();
}
});
68
listView.setAdapter(adapter);
new getMessages(this).execute();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.message, menu);
return true;
69
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.refresh : setTimer(); break;
}
return super.onOptionsItemSelected(item);
}
70
} else {
toast.showMessage("Message Sending Failed");
}
} else {
toast.showMessage("Blank Message cannot be sent");
}
}
@Override
protected void onPreExecute() {
super.onPreExecute();
dialog = new ProgressDialog(context);
71
dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
dialog.setMessage("Loading");
dialog.show();
@Override
protected List<MessageEntity> doInBackground(String... params) {
try {
Timer timer = new Timer();
timer.schedule(new TimerTask() {
@Override
public void run() {
newList = getList();
}
}, 1, 1000);
72
return newList;
} catch (Exception ex) {
Log.e("Error", ex.getMessage());
return null;
}
}
get
HttpGet(WebResource.GET_NEWMESSAGE+"/"+subjectId+"/"+getLastId());
HttpResponse response = client.execute(get);
int statusCode = response.getStatusLine().getStatusCode();
Log.i("Status Code", statusCode+"");
if(statusCode == 200) {
HttpEntity entity = response.getEntity();
String data = EntityUtils.toString(entity);
if(data != null) {
JSONArray array = new JSONArray(data);
73
new
List<MessageEntity>
list
new
ArrayList<MessageEntity>();
for(int i = 0; i < array.length(); i++) {
JSONObject
object
array.getJSONObject(i);
MessageEntity ent = new MessageEntity();
ent.setId(object.getInt("id"));
ent.setDate(object.getString("dateFormat"));
ent.setFrom(object.getString("person"));
ent.setMessage(object.getString("message"));
ent.setTime(object.getString("time"));
ent.setSubjectId(object.getInt("subject"));
list.add(ent);
}
return list;
} else {
Log.e("Data is not found", "Not Data");
return new ArrayList<MessageEntity>();
}
} else {
74
Log.e("Status
COde
is
not
200",
"+statusCode);
return new ArrayList<MessageEntity>();
}
} catch (Exception ex) {
Log.e("Exception ", ex.getMessage());
return null;
}
}
@Override
protected void onPostExecute(List<MessageEntity> result) {
dialog.dismiss();
if(result != null) {
for(MessageEntity entity : result) {
list.add(entity);
}
Log.i("added", result.size()+"");
adapter.notifyDataSetChanged(); }
}
}
75
"staus
code
6. OUTPUT SCREENS
76
77
78
79
80
81
During the testing of the unit the specified test cases are executed and the actual results are
compared with the expected outputs. The final output of the testing phase is the testing report and
the error report, or a set of such reports. Each test report contains a set of test cases and the result
of executing the code with the test cases. The error report describes the errors encountered and
the action taken to remove the error
Testing is a process, which reveals errors in the program. It is the major quality
measure employed during software development. During testing, the program is executed with a
set of conditions known as test cases and the output is evaluated to determine whether the
program is performing as expected. In order to make sure that the system does not have errors,
the different levels of testing strategies that are applied at differing phases of software
development are:
Unit Testing: Unit testing involves the design of test cases that validate that the internal program
logic is functioning properly, and that program inputs produce valid outputs. All decision
branches and internal code flow should be validated. It is the testing of individual software units
of the application .it is done after the completion of an individual unit before integration. This is
a structural testing, that relies on knowledge of its construction and is invasive. Unit tests
perform basic tests at component level and test a specific business process, application, and/or
system configuration. Unit tests ensure that each unique path of a business process performs
accurately to the documented specifications and contains clearly defined inputs and expected
results.
Features to be tested
kinds of tests, must be written from a definitive source document, such as specification or
requirements document, such as specification or requirements document. It is a testing in which
the software under test is treated, as a black box .you cannot see into it. The test provides
inputs and responds to outputs without considering how the software works.
Incorrect or missing functions
Interface errors
Performance errors
In this testing only the output is checked for correctness. The logical flow of the data is not
checked.
White Box Testing: In this the test cases are generated on the logic of each module by drawing
flow graphs of that module and logical decisions are tested on all the cases. It has been uses to
generate the test cases in the following cases:
Integration Testing: Integration testing ensures that software and subsystems work together as a
whole. It tests the interface of all the modules to make sure that the modules behave properly
when integrated together.
Integration tests are designed to test integrated software components to determine
if they actually run as one program. Testing is event driven and is more concerned with the basic
outcome of screens or fields. Integration tests demonstrate that although the components were
individually satisfaction, as shown by successfully unit testing, the combination of components is
correct and consistent. Integration testing is specifically aimed at
arise from the combination of components.
86
7.4.3 Test Results: All the test cases mentioned above passed successfully. No defects
encountered.
System Testing: The purpose of testing is to discover errors. Testing is the process of trying to
discover every conceivable fault or weakness in a work product. It provides a way to check the
functionality of components, sub assemblies, assemblies and/or a finished product. It is the
process of exercising software with the intent of ensuring that the Software system meets its
requirements and user expectations and does not fail in an unacceptable manner. There are
various types of test. Each test type addresses a specific testing requirement.
Functional test: Functional tests provide systematic demonstrations that functions tested are
available as specified by the business and technical requirements, system documentation, and
user manuals.
Functional testing is centered on the following items:
Valid Input
Invalid Input
Functions
Output
87
Validation Testing: The system has been tested and implemented successfully and thus ensured
that all the requirements as listed in the software requirements specification are completely
fulfilled. In case of erroneous input corresponding error messages are displayed.
Compilation Testing: It was a good idea to do our stress testing early on, because it gave us
time to fix some of the unexpected deadlocks and stability problems that only occurred when
components were exposed to very high transaction volumes.
Execution Testing: This program was successfully loaded and executed. Because of good
programming there was no execution error.
Output Testing: The successful output screens are placed in the output screens section
Test component
Expected output
88
Evaluated output
8. CONCLUSION
In this project we were developed an android application which is useful to students who
can share doubts easily. This android application is mainly developing for online
interacion about student and faculty.In this app every student and faculty has its own
username and password for logon to the application.Faculty In this app student can post
his doubts corresponding to subject and branch.At the same time faculty can give answers
to their doubts corresponding to his assigned subjects.This app is mainly developing for
specifc college.The main advantage of this app is student and faculty can download this
app and make interaction and share the ideas.
9. BIBLOGRAPHY
89
TEXTBOOKS:
1. Java complete reference, Herbert schield,7th edition, Mc. Graw hill.
2. The definitive guide to SQLite, Mike Owens.
3. The Unified Modeling Language Reference Manual, James Rumbaugh, 2nd
edition.
4. Expert Android, by Satya Komatineni, Dave MacLean ,Dave MacLean
REFERENCES:
1. www.sun.com
2. www.android.com
3. www.developers.android.com
4. www.SQLite.com
After downloading and installing STUDENT-FACULTY application from play store, the
user can find the icon of this application.
90
The user needs to touch the icon of STUDENT-FACULTY application to open this
application.
After opening this application the user will get the home page which contains some
password..
After logging into the account, you can see your subjects page. And then click on the
91