Webbrowser.docx

  • Uploaded by: nilesh shirodkar
  • 0
  • 0
  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Webbrowser.docx as PDF for free.

More details

  • Words: 7,287
  • Pages: 92
CHANDRABHAN SHARMA COLLEGE OF ARTS, COMMERCE AND SCIENCE POWAI VIHAR COMPLEX, POWAI, MUMBAI-400076

PROJECT REPORT FOR

Android IT Webbrowser BY Mr. Mohd naved Qureshi SUBMITTED IN THE PART FULFILLMENT OF THE REQUIREMNT FOR THE DEGREE IN BACHELOR OF SCIENCE

(INFORMATION TECHNOLOGY) SEMESTER VI

UNDER THE GUIDANCE OF PROF. ARVIND SINGH

UNIVERSITY OF MUMBAI YEAR 2016-2017

ACKNOWLEDGMENT We had a great pleasure for representing this project report for “Android Webbrowser application” and we grab this opportunity to convey our immense regards towards all the distinguished people who have their valuable contribution in the hour of need. We profoundly thank our principal Dr. CHITRA NATRAJAN for giving us support throughout the course and made us capable of being worthy of recognition and extended query facility to us for making and computing this project smoothly. We would like to express our sincere thanks to Prof. SANDEEP VISHWAKARMA (Head of IT DEPARTMENT) for his constant encouragement, which made this project a success. We are highly obliged to Prof. ARVINDRA SINGH teaching staff member of the Information Technology department, who spread efforts in making the project a successful one with her guidance, appropriate advice and encouragement and of course the inspiration without which the project would be ineffective difficult task. We sincerely thank and express my profound gratitude to our teachers for their timely and prestigious guidance. We also thank my family members for their continued support in completing this project work and last but not the least; we wish to thank all my friends and well-wishers who are directly or indirectly linked with the success of our project.

SR. No.

CONTENT

1.

OBJECTIVE AND SCOPE 1.1 OBJECTIVE 1.2 SSCOPE

2.

THEORETICAL BACKGROUD 2.1 INTRODUCTION TO ANDROID OS 2.2 ANDROID OPERATING SYSTEM ARCHITECTURE 2.3 COMPARING ANDROID AND OTHER OPERATING SYSTEM 2.4 INTRODUCTION TO BRAINOZOID 2.5 INTRODUCTION TO SQLITE DATABASE WITH RESPECT TO ANDROID

3.

SYSTEM ANALYSIS

4.

GANNT CHART

5.

SYSTEM DESIGN 5.1 UML 5.2 SEQUENCE DIAGRAM 5.3 CLASS DIAGRAM 5.4 DATA FLOW DIAGRAM

6.

METHODOLOGY ADOPTED 6.1 MODEL USED – INCREMENTAL

Page No.

MODEL 6.2 DETAILS OF THE SOFTWARES USED 6.2.1 JAVA SE SDK 6.2.2 ECLIPSE 6.2.3 ANDROID SDK 6.2.4 ANDROID ADT PLUGIN 6.3 DETAILS OF THE HARDWARE USED 7

8

MODULE EXPLANATION 7.1 7.2 7.3 7.4

TESTING 8.1 TESTING METHODS 8.2 UNIT TESTING 8.3 INTEGRATION TESTING 8.4 FUCTIONAL TESTING 8.5 USER-ACCEPTANCE TESTING 8.6 TEST CASES

9

SCREEN SHOTS 9.1 TABLE DESIGN FIG.1 9.2 TABLE DESIGN FIG.2 9.3 APPLICATION DESIGN FIG.1 9.4 APPLICATION DESIGN FIG.2

9.5 APPLICATION DESIFN FIG.3 9.6 APPLICATION DESIGN FIG.4 CODING PART 10

SYSTEM MAINTENANCE 10.1 MAINTENANCE 10.2 EVALUATION

11

CONCLUSION

12

BIBLOGRAPHY

SYNOPSIS ‘WebBrowser Application’

INTRODUCTION :

 Android is a popular technology coming up these days. The WebBrowserApplication is Android based application.  WebBrowserApplication is designed and developed to improve the students knowledge.  WebBrowser Application provides the facility of choosing different levels to the users. Therefore the first time users can adjust to the application environment.

PROBLEM DEFINITION :  Some of the Applications didn’t provide the service of displaying the correct answers to the questions to which users failed to answer correctly.  Other IT WebBrowser application does not provides all type of question in one single application.

PROPOSED SYSTEM :  Android is an open source operating system, which is extensively used in Smartphone’s.  Android has gained popularity over last few years. And is very user friendly and is mass appealing.  The user can choose the level in which he would like to take a quiz.  The score of the user is calculated and displayed at the end of the WebBrowser session.

OBJECTIVES :  The app can be used to evaluate the competency of the person taking the WebBrowser.  The app is used to prepare the user for any type of test which is related to Information Technology.  The main objective of this app is that it is build for smartphone and the user can take the test anywhere from his smartphone.  This app increases the users IQ level of taking any test.  This app gives the instant result after the user is done taking the test.

MODULES : QUESTIONS : This module provides the questions which the user has to answer. This module is the heart to the entire WebBrowser application. It also provides the options with the questions to aid the user.

SETTINGS : This module provides the user the choice to choose between different levels. There are three different levels in our application. The levels are as follows Easy, Medium and Hard.

RULES :

This module provides the basic rules which are to be adhered while playing the WebBrowser application. It also provides the “First Time User” a tip to select easier levels to get accustomed to the application.

EXIT : This module generally Exit the WebBrowser after clicking on this Exit button.

HARDWARE REQUIREMENTS (For Developing the Application) :    

PLATFORM : Windows XP, Windows 7 or later version DISK SPACE: 4 GB(minimum) RAM: 2 GB(minimum) PHONE: Android Supported Smartphone.

SOFTWARE REQUIREMENTS :

 ANDROID : Java SE SDK Android SDK Eclipse IDE (Classic version) ADT Plugin for Eclipse  DATABASE : SQLite

TECHNIQUES :  Our application is entirely based on Android programming, thus the framework and coding will be done using android SDK and Eclipse IDE.  The modules mentioned above will be done using android programming, Android being an Open source OS enables to run only on android based Smartphones.  SQLite Database is used here to store in the details of the members accessing the application. SQLite is an inbuilt database which is present in the android SDK bundle.  About to databse In this project SQLite Browser is to be used.

OBJECTIVE AND SCOPE

1.1 OBJECTIVE :  The main objective is to develop a WebBrowser application for android based smartphones.  The application will be able to cater the needs of students and other android based smart phone users to gain knowledge about the Languages, database, Network Security, OS.  The application will also have a feature where the user can select the level of difficulty so as to get accustomed to the questions.

1.2 SCOPE : The scope of the application is huge considering that the application is based on android OS which has a very large user base compared to other mobile Operating Systems such as the IOS, Symbian. The features of the quiz application are:  User can test their Knowledge level by answering the questions to a different type of Questions.  Users can select the level of difficulty.

 As our application is a android based. Plus the “WebBrowserApplication” is free of cost there by attracting more number of users. Also the present applications lack the “fun” element because of various factors such as name of the application.

THEORETICAL BACKGROUNG

2.1 INTRODUCTION TO ANDROID O.S: Android is a Linux-based operating system designed primarily for touch screen mobile devices such as smartphones and tablet computers. Initially developed by Android, Inc., which Google backed financially and later bought in 2005, Android was unveiled in 2007 along with the founding of the Open Handset Alliance: a consortium of hardware, software, and telecommunication companies devoted to advancing open standards for mobile devices. The first Android-powered phone was sold in October 2008. Android is open source and Google releases the code under the Apache License. This open source code and permissive licensing allows the software to be freely modified and distributed by device manufacturers, wireless carriers and enthusiast developers. Additionally, Android has a large community of developers writing applications ("apps") that extend the functionality of devices, written

primarily in a customized version of the Java programming language. In October 2012, there were approximately 700,000 apps available for Android, and the estimated number of applications downloaded from Google Play, Android's primary app store, was 25 billion. These factors have allowed Android to become the world's most widely used smartphone platform, overtaking Symbian in the fourth quarter of 2010, and the software of choice for technology companies who require a low-cost, customizable, lightweight operating system for high technology devices without developing one from scratch. As a result, despite being primarily designed for phones and tablets, it has seen additional applications on televisions, games consoles and other electronics. Android's open nature has further encouraged a large community of developers and enthusiasts to use the open source code as a foundation for community-driven applications, which add new features for advanced users or bring Android to devices which were officially released running other operating systems.

2.2 ANDROID OPERATING SYSTEM ARCHITECTURE

Android consists of a kernel based on Linux kernel version 2.6 and, from Android 4.0 Ice Cream Sandwich onwards, version 3.x, with middleware, libraries and APIs written in C, and application software running on an application framework which includes Java-compatible libraries based on Apache Harmony. Android uses the Dalvik virtual machine with just-in-time compilation to run Dalvik 'dex-code', which is usually translated from Java byte code. The main hardware platform for Android is the ARM architecture. There is support for x86 from the Android x86 application, and Google TV uses a special x86 version of Android. Android's linux kernel has further architecture changes by Google outside the typical Linux kernel development cycle. Android does not have a nativeX Window System by default nor does it support the full set of standard GNU libraries, and this makes it difficult to port existing Linux applications or libraries to Android. Support for simple C and SDL applications is possible by injection of a small Java shim and usage of the JNI like, for example, in the Jagged Alliance 2 port for Android. Certain features that Google contributed back to the Linux kernel, notably a power management feature called wakelocks, were rejected by mainline kernel developers, partly because kernel maintainers felt that Google did not show any intent to maintain their own code. Google announced in April 2010 that they would hire two employees to work with the Linux kernel community, but Greg Kroah-Hartman, the current Linux kernel maintainer for the stable branch, said in December 2010 that he

was concerned that Google was no longer trying to get their code changes included in mainstream Linux. Some Google Android developers hinted that "the Android team was getting fed up with the process," because they were a small team and had more urgent work to do on Android. In August 2011, Linus Torvalds said that "eventually Android and Linux would come back to a common kernel, but it will probably not be for four to five years". In December 2011, Greg Kroah-Hartman announced the start of the Android Mainlining Application, which aims to put some Android drivers, patches and features back into the Linux kernel, starting in Linux 3.3.

Linux included the auto sleep and wake locks capabilities in the 3.5 kernel, after many previous attempts at merger. The interfaces are the same but the upstream Linux implementation allows for two different suspend modes: to memory, and to disk. The merge will be complete starting with Kernel 3.8, Google has opened a public code repository that contains their experimental work to re-base Android off Kernel 3.8. The flash storage on Android devices is split into several partitions, such as "/system" for the operating system itself and "/data" for user data and app installations. In contrast to desktop Linux distributions, Android device owners are not given root access to the operating system and sensitive partitions such as /system are read-only. However, root access can be obtained by exploiting security flaws in Android, which is used frequently by the open source community to enhance the capabilities of their devices, but also by malicious parties to install viruses and malware.

Whether or not Android counts as a Linux distribution is a widely debated topic, with the Linux Foundation and Chris DiBona, Google's open source chief, in favour. Others, such as Google engineer Patrick Brady disagree, noting the lack of support for many GNU tools, including glibc, in Android.

2.3 COMPARING ANDROID AND OTHER OPERATING SYSTEMS : Every Mobile Phone Platform or OS has its own unique features, users have to compare them and get the One is most perfect to serve their needs. Here we discuss some of ways where Google’s Android win over iPhone, Windows Phone and everything else out in the market. Let’s dive in and see what makes android better.

1. MAPS AND NOTIFICATION : Google’s Maps is simply the best and the free Navigation makes it perfect. Though Google’s Maps uses more data, still u might prefer it than buying an offline Expensive navigation app for iPhone and other OS. Also, HTC is offering a free version of offline Maps on their phones.

2. NOTIFICATION BAR : Android’s Notification bar is a unique features which will notify for Emails, SMSs Facebook notifications, charging, software updates, task managers and almost usable from any screen without leaving the running application.

3. WIDGETS : If you use widgets on an Smartphone, you already know the importance of them. Just set up a page with your Google Voice, RSS, Twitter and Facebook streams and organize them any way you

want. If you never used widgets, it’s hard to imagine how worse it would be a smartphone without them.

4. CARRIER CHOICE : You’re stuck with AT&T if you have an iPhone or Windows 7 phone. But With Google Android there is a wide variety of choice to pick the best carrier in your area for your budget.

5. HOTSPOT : Most of the Android handset will allow to tether or create a virtual Hotspot and connect other devices. iPhone does do tethering, but limited. Windows 7 doesn’t create hotspots at all.

6. SCREEN SIZE : With Android you can a device between 3.2-inch to 7inch. With Android, like the HTC Aria, which has a 3.2-inch HVGA screen, or 4.3-inch screens on the Droid X or Sprint EVO. Even 5inch on Dell tablet or 7-inch on Samsung Galaxy Tab. With iPhone you’re stuck at 3.5 inch. Windows Mobile 7 has various size but the resolution is fixed 400×800.

7. VOICE ACTION : Windows Phone has speech recognition and iPhone does Voice Control, but nothing is comparable to Google Voice Actions. With Voice Actions on Android you can do just about anything.

8. FASTEST BROWSER : Browsing Internet is one of most task user do on the Smatphone. With full Flash support and fastest cpu on high end Android Phone browsing is just pleasure.

9. BETTER BUTTONS : While iPhone ends up with only home button, Windows Phone does little better with search and back button. Android just perfect with an extra button for Setting Menu.

10. GOOGLE VOICE : Let users routing calls over Internet and cheap international service by Google Voice save your pocket. While it is available on iOS and Windows Phone as a web service, Google Voice is just better than nothing.

2.4 INTRODUCTION TO WebBrowser Application  WebBrowserApplication is an android based quiz application. The primary purpose of this application is to check the users or students knowledge.  The application is based on Android OS because it allows applications to run on low memory. Another reason for developing this app on Android is because with the help of this app user can improve their IT knowledge.

 The “WebBrowserApplication” can be very useful applications for students who want a quick revision on a particular subject. They can be evaluated by the result displayed after they have answered the questions.  The android smart phone user can also check the list of correct answers at the end of the quiz. This adds to over all app experience for the user.

2.5 INTRODUCTION TO SQLITE DATABASE WITH RESPECT TO ANDROID :

 SQLite is a relational database management system contained in a small (~350 KB) C programming library. In contrast to other database management systems, SQLite is not a separate process that is accessed from the client application, but an integral part of it.  SQLite is ACID-compliant and implements most of the SQL standard, using a dynamically and weakly typed SQL syntax that does not guarantee the domain integrity.  SQLite is a popular choice as embedded database for local/client storage in application software such as web browsers. It is arguably the most widely deployed database engine, as it is used today by several widespread browsers, operating systems, and embedded systems, among others. SQLite has many bindings to programming languages.  The source code for SQLite is in the public domain.

SYSTEM ANALYSIS

3. SYSTEM ANALYSIS : 1. In our research I found that most of the WebBrowser based applications on Google play store have very monotonous names which do not find users interest, the applications name should be as such that the user must find it interesting and must catch users imagination.

2. The user can choose the difficulty levels in other application but main thing is that other application which do not give the All the IT fields knowledge to users.

3. As part of our analysis, I collected those question with the help of this the student or that user can improve their knowledge. 4. I have searched various Websites , Applications to understand the problem.

5. After a rigorous analysis process we jotted down various designs of the processes and the various user interfaces were also prepared but this user interface is very simple and user friendly.

Gannt Chart

SYSTEM DESIGN 5.SYSTEM DESIGN : System Design is very important aspect of application development. It helps the programmer with easy work flow. Using System Design a plan can be made for designing the user- interface. We are using the Object Oriented Approach for the Application. So we include the required UML diagrams for our System Design.

5.1 UML :  The heart of the object-oriented problem solving is the construction of a model. The model abstracts the essential details of the underlying problem from its usually complicated real world.  The unified modelling language (UML) is a standard language for specifying, visualizing, constructing and documenting the artifacts of a software system, business model and other nonsoftware systems.

 UML is a very important part of object oriented software development process.  UML uses graphical notations to express the design of a software application.  UML helps application teams to communicate, explore potential designs and validate the architectural design of the software.  At the centre of the UML are its four kinds of modelling diagrams, which we will describe here : Data Flow diagram  Sequence diagram  Class Diagram

5.2 SEQUENCE DIAGRAM :

When an object passes a message to another object, the receiving object might in turn send a message to another object, which might in turn send messages to another object, and so on. This stream from sequence. The messages are ordered in sequence by time. Sequence diagrams model these sequences. Sequence diagrams describe interactions among classes in terms of an exchange of messages over time. Sequence diagrams demonstrate the behaviour of objects in a use case by describing the objects and the messages they pass. By examining these messages in details the functionality and data associated with each

of these objects such as operations attributes can be discovered. The diagrams are read left to right and descending. A sequence diagram depicts the sequence o actions that occur in a system. The invocation of methods in each object, and the order in which the invocation occurs is captured in a sequence diagram. This makes the sequence diagram very useful tool to easily represent the dynamic behaviour of systems.

Modelling the flow of control by time ordering emphasizes the passing of message as they unfold over time, which is particularly useful way to visualize dynamic behaviour in the context of use case scenario. Sequence diagrams do better job of visualizing simple iteration and branching than do collaboration diagrams. A sequence diagram is two dimensional in nature. On the horizontal axis, it shows the life the object that it represents, while on the vertical axis, it shows the sequence of creation or invocation of these objects.

5.3 CLASS DIAGRAM : The class diagram describes the attributes and operations of a class and also the constraints imposed on the system. The class diagrams are widely used in the modelling of object oriented systems because they are the only UML diagrams which can be mapped directly with object oriented languages. The class diagram shows a collection of classes, interfaces, associations, collaborations and constraints. It is also known as a structural diagram.

PURPOSE: The purpose of the class diagram is to model the static view of an application. The class diagrams are the only diagrams which can be directly mapped with object oriented languages and thus widely used at the time of construction. The UML diagrams like activity diagram, sequence diagram can only give the sequence flow of the application but class diagram is a bit different. So it is the most popular UML diagram in the coder community. So the purpose of the class diagram can be summarized as: 

Analysis and design of the static view of an application.



Describe responsibilities of a system.



Base for component and deployment diagrams.



Forward and reverse engineering.

5.4 DATA FLOW DIAGRAM: Data flow diagrams present the logical flow of information through a system in graphical or pictorial form. Data flow diagrams have only four symbols, which makes useful for communication between analysts and users. Data flow diagrams show the data used and provided by processes within a system. DFDs make use of four basic symbols. A DFD usually comprises of four components. These four components can be represented by four simple symbols. These symbols can be explained in detail as follows: External entities are represented by squares. Processes are represented by rectangles with rounded corners; Data Flows are represented by arrows; and finally, Data Stores are represented by open-ended rectangles.

 EXTERNAL ENTITY : An external entity is a source or destination of a data flow which is outside the area of study. Only those entities which originate or receive data are represented on a business process diagram. The symbol used is an oval containing a meaningful and unique identifier.

 PROCESS : A process shows a transformation or manipulation of data flows within the system. The symbol used is a rectangular box which contains 3 descriptive elements: Firstly an identification number appears in the upper left hand corner. This is allocated arbitrarily at the top level and serves as a unique reference. Secondly, a location appears to the right of the identifier and describes where in the system the process takes place. This may, for example, be a department or a piece of hardware. Finally, a descriptive title is placed in the centre of the box. This should be a simple imperative sentence with a specific verb, for example 'maintain customer records' or 'find driver'.

 DATA FLOW: A data flow shows the flow of information from its source to its destination. A data flow is represented by a line, with arrowheads showing the direction of flow. Information always flows to or from a process and may be written, verbal or electronic. Each data flow may be referenced by the processes or data stores at its head and tail, or by a description of its contents.

 DATA STORE : A data store is a holding place for information within the system. It is represented by an open ended narrow rectangle. Data stores may be long term files such as sales ledgers, or may be short-term accumulations: for example batches of documents that are waiting to be processed. Each data store should be given a reference followed by an arbitrary number.

METHODOLOGY

6. ECLIPSE :

In computer programming, Eclipse is a multi-language software development environment comprising a base workspace and an extensible plug-in system for customizing the environment. It is written mostly in Java. It can be used to develop applications in Java and, by means of various plug-ins, other programming languages including Ada, C, C++, COBOL, Fortran, Haskell, Perl, PHP, Python, R, Ruby (including Ruby on Rails framework), Scala, Clojure, Groovy, Scheme, and Erlang. It can also be used to develop packages for the software Mathematica. Development environments include the Eclipse Java development tools (JDT) for Java and Scala, Eclipse CDT for C/C++ and Eclipse PDT for PHP, among others.

6.1 ANDROID SDK :

The Android software development kit (SDK) includes a comprehensive set of development tools. These include a debugger, libraries, a handset emulator based on QEMU, documentation, sample code, and tutorials. Currently supported development platforms include computers running Linux , Mac OS X 10.5.8 or later, Windows XP or later. The officially supported integrated development environment (IDE) is Eclipse using the Android Development Tools (ADT) Plugin, though IDE fully supports Android development out of the box, and NetBeans IDE also supports Android development via a plugin. Additionally, developers may use any text editor to edit Java and XML files, then use command line tools Java Development Kit and Apache Ant are

required to create, build and debug Android applications as well as control attached Android devices.

Enhancements to Android's SDK go hand in hand with the overall Android platform development. The SDK also supports older versions of the Android platform in case developers wish to target their applications at older devices. Development tools are downloadable components, so after one has downloaded the latest version and platform, older platforms and tools can also be downloaded for compatibility testing. Android applications are packaged in .apk format and stored under /data/app folder on the Android OS (the folder is accessible only to the root user for security reasons). APK package contains .dex files compiled byte code files called Dalvik executables, resource files, etc.

6.2 ANDROID ADT PLUGIN : Android Development Tools (ADT) is a plugin for the Eclipse IDE that is designed to give you a powerful, integrated environment in which to build Android applications. ADT extends the capabilities of Eclipse to let you quickly set up new Android projects, create an application UI, add components based on the Android Framework API, debug your applications using the Android SDK tools, and even export signed (or unsigned) .apk files in order to distribute your application.

Developing in Eclipse with ADT is highly recommended and is the fastest way to get started. With the guided project setup it provides, as well as tools integration, custom XML editors, and debug output pane, ADT gives you an incredible boost in developing Android applications.

ANDROID VIRTUAL DEVICE MANAGER : The AVD Manager is an easy to use user interface to manage your AVD (Android Virtual Device) configurations. An AVD is a device configuration for the Android emulator that allows you to model different configurations of Android-powered devices. When you start the AVD Manager in Eclipse or run the android tool on the command line, you will see the AVD Manager as shown (below):

6.3 DETAILS OF HARDWARES USED :    

PLATFORM : Windows XP, Windows 7 or later version DISK SPACE: 4 GB(minimum) RAM: 2 GB(minimum) PHONE: Android Supported Smartphone.

MODULE EXPLANATION

7.1 QUESTIONS : This module provides the questions which the user has to answer. This module is the heart to the entire quiz application. It also provides the options with the questions to aid the user.

7.2 SETTINGS : This module provides the user the choice to choose between different levels. There are three different levels in our application. The levels are as follows Easy, Medium and Hard.

7.3 RULES : This module provides the basic rules which are to be adhered while playing the quiz application. It also provides the “First Time User” a tip to select easier levels to get accustomed to the application.

7.4 EXIT : This module generally Exit the Quiz game after clicking on this Exit button.

TESTING

8.1 TESTING METHODS : System testing is a critical phase implementation. Testing of the system involves hardware devise and debugging of the computer programs and testing information processing procedures. Testing can be done with text data, which attempts to stimulate all possible conditions that may arise during processing. If structured programming Methodologies have been adopted during coding the testing proceeds from higher level to lower level of program module until the entire program is tested as unit. The testing methods adopted during the testing of the system were unit testing and integrated testing.

8.2 UNIT TESTING : Unit testing focuses first on the modules, independently of one another, to locate errors. This enables the tester to detect errors in coding and logical errors that is contained within that module alone. Those resulting from the interaction between modules are initially avoided.

8.3 INTEGRATION TESTING : Integration testing is a systematic technique for constructing the program structure while at the same time to uncover the errors associated with interfacing. The objective is to take unit-tested module and build a program structure that has been detected by designing. It also tests to find the discrepancies between the system and its original objectives. Subordinate stubs are replaced one at time actual module. Tests were conducted at each module was integrated. On completion of each set another stub was replaced with the real module.

8.4 FUNCTIONAL TESTING : Functional testing is a technique in which all the functionalities of the program are tested to check whether all the functions that where proposed during the planning phase are full filled. This is also to check that if all the functions proposed are working properly. This is further done in two phases:

- One before the integration to see if all the unit components work properly - Second to see if they still work properly after they have been integrated to check if some functional compatibility issues arise.

8.5 USER-ACCEPTENSE TESTING: User Acceptance testing is a technique in which the end user is used to test the application. User Acceptance Testing is important phase in the application development. For the UserAcceptance testing we deployed our application android based HTC smartphone. But first we need to determine the correct pixel size and the screen resolution. Also the version of the android OS is a important factor that should be looked upon before deploying the application.

8.6 TEST CASES : Sr.

Test Cases

No.

Action Performed

Expected Output

Result

1.

User click s Application “WebBrowserApplication” pass “WebBrowserApplication” is launch opens application

2.

User Clicks the “play” button

The button Questions are displayed action is processed

pass

3.

User selects settings option

The button Various levels of action is difficulty are displayed processed

pass

4.

User selects “Easy” in the settings option

Updating is done

Update is successful

pass

5.

User selects “Medium” in the settings options

Updating is done

Update is successful

pass

6.

User selects “Hard” in the settings options

Updating is done

Update is successful

pass

7.

User selects “exit” option

The button User exits the action is application processed

pass

8.

User can select “Rules” opetion

The button Rules are displayed action is processed

Pass

SCREEN SHOTS

9.1 TABLE DESIGN FIG.1 : 9.1.2 FIG.2:

This is the table figure which is used in SQLite browser for creating a database question and answer tables.

9.2 Main Page Of the Application

Basic Working Of the WebBrowser app

9.4 Setting Page View

9.5 Rules Page View

9.5 Answers Page View

CODING PART SplshActivity.java

package com.tmm.android.quizApp;

import java.io.IOException; import java.util.List;

import android.app.Activity; import android.content.Intent; import android.content.SharedPreferences; import android.database.SQLException; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button;

import com.tmm.android.chuck.R; import com.tmm.android.quizApp.db.DBHelper; import com.tmm.android.quizApp.quiz.Constants; import com.tmm.android.quizApp.quiz.GamePlay; import com.tmm.android.quizApp.quiz.Question;

public class SplashActivity extends Activity implements OnClickListener{

@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.welcome);

// Quiz app Menu Button playBtn = (Button) findViewById(R.id.playBtn); playBtn.setOnClickListener(this); Button settingsBtn = (Button) findViewById(R.id.settingsBtn); settingsBtn.setOnClickListener(this); Button rulesBtn = (Button) findViewById(R.id.rulesBtn); rulesBtn.setOnClickListener(this); Button exitBtn = (Button) findViewById(R.id.exitBtn); exitBtn.setOnClickListener(this); }

/** * Listener for game menu */ @Override public void onClick(View v) { Intent i;

switch (v.getId()){ case R.id.playBtn : //once logged in, load the main page //Log.d("LOGIN", "User has started the game");

//Get Question set // List questions = getQuestionSetFromDb();

//Initialise Game with retrieved question set /// GamePlay c = new GamePlay(); c.setQuestions(questions); c.setNumRounds(getNumQuestions()); ((ChuckApplication)getApplication()).setCurrentGame(c);

//Start Game Now.. // i = new Intent(this, QuestionActivity.class); startActivityForResult(i, Constants.PLAYBUTTON); break;

case R.id.rulesBtn : i = new Intent(this, RulesActivity.class); startActivityForResult(i, Constants.RULESBUTTON); break;

case R.id.settingsBtn : i = new Intent(this, SettingsActivity.class); startActivityForResult(i, Constants.SETTINGSBUTTON); break;

case R.id.exitBtn : finish(); break; }

}

/** * Method that retrieves a random set of questions from * the database for the given difficulty * @return * @throws Error */ private List getQuestionSetFromDb() throws Error { int diff = getDifficultySettings(); int numQuestions = getNumQuestions(); DBHelper myDbHelper = new DBHelper(this); try { myDbHelper.createDataBase();

} catch (IOException ioe) { throw new Error("Unable to create database"); } try { myDbHelper.openDataBase(); }catch(SQLException sqle){ throw sqle; } List questions = myDbHelper.getQuestionSet(diff, numQuestions); myDbHelper.close(); return questions; }

/** * Method to return the difficulty settings * @return */ private int getDifficultySettings() { SharedPreferences settings = getSharedPreferences(Constants.SETTINGS, 0); int diff = settings.getInt(Constants.DIFFICULTY, Constants.MEDIUM); return diff; }

/**

* Method to return the number of questions for the game * @return */ private int getNumQuestions() { SharedPreferences settings = getSharedPreferences(Constants.SETTINGS, 0); int numRounds = settings.getInt(Constants.NUM_ROUNDS, 20); return numRounds; }

}

SettingActivity.java

package com.tmm.android.quizApp;

import android.app.Activity; 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.RadioButton;

import com.tmm.android.chuck.R; import com.tmm.android.quizApp.quiz.Constants;

/** * @author robert.hinds * */ public class SettingsActivity extends Activity implements OnClickListener{

@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.settings);

/** * set listener on update button */ //for update button Button updateBtn = (Button) findViewById(R.id.nextBtn); updateBtn.setOnClickListener(this);

/** * Set selected button if saved */

updateButtonPreferences();

}

/** * Method to update default check box */ private void updateButtonPreferences() { RadioButton c1 = (RadioButton)findViewById(R.id.easySetting); RadioButton c2 = (RadioButton)findViewById(R.id.mediumSetting); RadioButton c3 = (RadioButton)findViewById(R.id.hardSetting);

SharedPreferences settings = getSharedPreferences(Constants.SETTINGS, 0); int difflevel = settings.getInt(Constants.DIFFICULTY, Constants.MEDIUM);

//to select different levels we are using.. switch (difflevel) { case Constants.EASY : c1.toggle(); break;

case Constants.MEDIUM :

c2.toggle(); break;

case Constants.HARD : c3.toggle(); break; } }

@Override public void onClick(View arg0) { /** * check which settings set and return to menu */ if (!checkSelected()) { return; } else { SharedPreferences settings = getSharedPreferences(Constants.SETTINGS, 0);

Editor e = settings.edit(); e.putInt(Constants.DIFFICULTY, getSelectedSetting()); e.commit(); finish(); }

}

/** * Method to check that a checkbox is selected * * @return boolean */ //to select any level private boolean checkSelected() { RadioButton c1 = (RadioButton)findViewById(R.id.easySetting); RadioButton c2 = (RadioButton)findViewById(R.id.mediumSetting); RadioButton c3 = (RadioButton)findViewById(R.id.hardSetting); return (c1.isChecked() || c2.isChecked() || c3.isChecked()); }

/** * Get the selected setting

*/ private int getSelectedSetting() { RadioButton c1 = (RadioButton)findViewById(R.id.easySetting); RadioButton c2 = (RadioButton)findViewById(R.id.mediumSetting);

if (c1.isChecked()) { return Constants.EASY; } if (c2.isChecked()) { return Constants.MEDIUM; }

return Constants.HARD; }

}

RulesActivity.java package com.tmm.android.quizApp;

import com.tmm.android.chuck.R;

import android.app.Activity; import android.os.Bundle;

import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.TextView;

/** * @author robert.hinds * */ public class RulesActivity extends Activity implements OnClickListener{ TextView t; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.rules);

//finish button Button backBtn = (Button) findViewById(R.id.backBtn); backBtn.setOnClickListener(this);

t = (TextView) findViewById(R.id.textView1);

}

@Override

public void onClick(View arg0) { /** * if the back button is clicked then go back to the main menu */ finish(); }

}

QuestionsActivity.java package com.tmm.android.quizApp; import java.util.List; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.KeyEvent; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.RadioButton; import android.widget.TextView;

import com.tmm.android.chuck.R; import com.tmm.android.quizApp.quiz.GamePlay; import com.tmm.android.quizApp.quiz.Question;

import com.tmm.android.quizApp.util.Utility; public class QuestionActivity extends Activity implements OnClickListener{

private Question currentQ; private GamePlay currentGame;

@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.question); currentGame = ((ChuckApplication)getApplication()).getCurrentGame(); currentQ = currentGame.getNextQuestion(); Button nextBtn = (Button) findViewById(R.id.nextBtn); nextBtn.setOnClickListener(this);

/** * Update the question and answer options.. */ setQuestions();

}

/** * Method to set the text for the question and answers from the current games

* current question */ private void setQuestions() { //set the question text from current question String question = Utility.capitalise(currentQ.getQuestion()) + "?"; TextView qText = (TextView) findViewById(R.id.question); qText.setText(question);

//set the available options List<String> answers = currentQ.getQuestionOptions();

//this is for ans one TextView option1 = (TextView) findViewById(R.id.answer1); option1.setText(Utility.capitalise(answers.get(0)));

// this is for ans two TextView option2 = (TextView) findViewById(R.id.answer2); option2.setText(Utility.capitalise(answers.get(1)));

//this is for ans three TextView option3 = (TextView) findViewById(R.id.answer3); option3.setText(Utility.capitalise(answers.get(2)));

//this is for ans four TextView option4 = (TextView) findViewById(R.id.answer4);

option4.setText(Utility.capitalise(answers.get(3))); }

@Override public void onClick(View arg0) { //Moving to next question

/** * validate a checkbox has been selected */ if (!checkAnswer()) return;

/** * check if end of game */ if (currentGame.isGameOver()){ //all qstn ends and select endgame Intent i = new Intent(this, EndgameActivity.class); startActivity(i); finish(); } else{ Intent i = new Intent(this, QuestionActivity.class);

startActivity(i); finish(); } }

@Override public boolean onKeyDown(int keyCode, KeyEvent event) { switch (keyCode) { case KeyEvent.KEYCODE_BACK : return true; }

return super.onKeyDown(keyCode, event); }

/** * Check if a checkbox has been selected, and if it * has then check if its correct and update gamescore */ private boolean checkAnswer() { String answer = getSelectedAnswer();

if (answer==null){ //Log.d("Questions", "No Checkbox selection made - returning"); return false; } else { //Log.d("Questions", "Valid Checkbox selection made - check if correct"); if (currentQ.getAnswer().equalsIgnoreCase(answer)) { //Log.d("Questions", "Correct Answer!"); currentGame.incrementRightAnswers(); } else{ //Log.d("Questions", "Incorrect Answer!"); currentGame.incrementWrongAnswers(); } return true; } }

/** * */ private String getSelectedAnswer() { RadioButton c1 = (RadioButton)findViewById(R.id.answer1);

RadioButton c2 = (RadioButton)findViewById(R.id.answer2); RadioButton c3 = (RadioButton)findViewById(R.id.answer3); RadioButton c4 = (RadioButton)findViewById(R.id.answer4); if (c1.isChecked()) { return c1.getText().toString(); } if (c2.isChecked()) { return c2.getText().toString(); } if (c3.isChecked()) { return c3.getText().toString(); } if (c4.isChecked()) { return c4.getText().toString(); }

return null; }

}

AnswersActivity,java package com.tmm.android.quizApp;

import android.app.Activity; import android.os.Bundle; import android.view.KeyEvent; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.TextView;

import com.tmm.android.chuck.R; import com.tmm.android.quizApp.quiz.GamePlay; import com.tmm.android.quizApp.util.Utility;

/** * @author robert.hinds * */ public class AnswersActivity extends Activity implements OnClickListener {

@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.answers);

GamePlay currentGame = ((ChuckApplication)getApplication()).getCurrentGame();

TextView results = (TextView)findViewById(R.id.answers); String answers = Utility.getAnswers(currentGame.getQuestions()); results.setText(answers);

//handle button actions Button finishBtn = (Button) findViewById(R.id.finishBtn); finishBtn.setOnClickListener(this);

}

/* (non-Javadoc) * @see android.app.Activity#onKeyDown(int, android.view.KeyEvent) * * This method is to override the back button on the phone * to prevent users from navigating back in to the quiz */ @Override public boolean onKeyDown(int keyCode, KeyEvent event) { switch (keyCode) {

case KeyEvent.KEYCODE_BACK : return true; }

return super.onKeyDown(keyCode, event); }

@Override public void onClick(View v) { switch (v.getId()){ case R.id.finishBtn : finish(); } }

ChuckApplication.java package com.tmm.android.quizApp;

import com.tmm.android.quizApp.quiz.GamePlay;

import android.app.Application;

public class ChuckApplication extends Application{ private GamePlay currentGame;

/** * @param currentGame the currentGame to set */ public void setCurrentGame(GamePlay currentGame) { this.currentGame = currentGame; } public GamePlay getCurrentGame() { return currentGame; } } }

EndgameActivity.java

package com.tmm.android.quizApp;

import android.app.Activity; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.view.KeyEvent; import android.view.View;

import android.view.View.OnClickListener; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView;

import com.tmm.android.chuck.R; import com.tmm.android.quizApp.quiz.Constants; import com.tmm.android.quizApp.quiz.GamePlay; import com.tmm.android.quizApp.quiz.Helper;

/** * @author robert.hinds * */ public class EndgameActivity extends Activity implements OnClickListener {

@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.endgame); GamePlay currentGame = ((ChuckApplication)getApplication()).getCurrentGame(); String result = "You Got " + currentGame.getRight() + "/" + currentGame.getNumRounds() + ".. "; String comment = Helper.getResultComment(currentGame.getRight(), currentGame.getNumRounds(), getDifficultySettings());

TextView results = (TextView)findViewById(R.id.endgameResult); results.setText(result + comment);

int image = Helper.getResultImage(currentGame.getRight(), currentGame.getNumRounds(), getDifficultySettings()); ImageView resultImage = (ImageView)findViewById(R.id.resultPage); resultImage.setImageResource(image);

//handle button actions Button finishBtn = (Button) findViewById(R.id.finishBtn); finishBtn.setOnClickListener(this); Button answerBtn = (Button) findViewById(R.id.answerBtn); answerBtn.setOnClickListener(this);

}

/** * Method to return the difficulty settings * @return */ private int getDifficultySettings() { SharedPreferences settings = getSharedPreferences(Constants.SETTINGS, 0); int diff = settings.getInt(Constants.DIFFICULTY, 2); return diff;

}

/* (non-Javadoc) * @see android.app.Activity#onKeyDown(int, android.view.KeyEvent) * * This method is to override the back button on the phone * to prevent users from navigating back in to the quiz */ @Override public boolean onKeyDown(int keyCode, KeyEvent event) { switch (keyCode) { case KeyEvent.KEYCODE_BACK : return true; }

return super.onKeyDown(keyCode, event); }

@Override public void onClick(View v) { switch (v.getId()){

case R.id.finishBtn : finish(); break;

case R.id.answerBtn : Intent i = new Intent(this, AnswersActivity.class); startActivityForResult(i, Constants.PLAYBUTTON); break; } }

}

DBHepler.java package com.tmm.android.quizApp.db;

import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.List;

import android.content.Context; import android.database.Cursor;

import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteException; import android.database.sqlite.SQLiteOpenHelper;

import com.tmm.android.quizApp.quiz.Question;

/** * @author robert.hinds * */ public class DBHelper extends SQLiteOpenHelper{

//this is the default path of android app. private static String DB_PATH = "/data/data/com.tmm.android.chuck/databases/"; private static String DB_NAME = "questionsDb"; private SQLiteDatabase myDataBase; private final Context myContext;

/** * Constructor * Takes and keeps a reference of the passed context in order to access to the application assets and resources. * @param context */ public DBHelper(Context context) {

super(context, DB_NAME, null, 1); this.myContext = context; }

/** * Creates a empty database on the system and rewrites it with your own database. * */

//creating db with using input- output excptn public void createDataBase() throws IOException{

boolean dbExist = checkDataBase(); if(!dbExist) { //By calling this method and empty database will be created into the default system path //of app so we are gonna be able to overwrite that db with our db. this.getReadableDatabase();

try { copyDataBase(); } catch (IOException e) { throw new Error("Error copying database"); } } }

/** * Check if the database already exist to avoid re-copying the file each time you open the application. * @return true if it exists, false if it doesn't */ private boolean checkDataBase(){ SQLiteDatabase checkDB = null; try{ String myPath = DB_PATH + DB_NAME; checkDB = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READONLY); }catch(SQLiteException e){ //database does't exist yet. } if(checkDB != null){ checkDB.close(); }

return checkDB != null ? true : false; }

/** * Copies your database from your local assets-folder to the just created empty database in the * system folder, from where it can be accessed and handled. * This is done by transfering bytestream.

* */ private void copyDataBase() throws IOException{

//Open local db as the input stream InputStream myInput = myContext.getAssets().open(DB_NAME);

// Path to created empty db String outFileName = DB_PATH + DB_NAME;

//Open the empty db as the output stream OutputStream myOutput = new FileOutputStream(outFileName);

//transfer bytes from the inputfile to the outputfile byte[] buffer = new byte[1024]; int length; while ((length = myInput.read(buffer))>0){ myOutput.write(buffer, 0, length); }

//Close the streams myOutput.flush(); myOutput.close(); myInput.close();

}

public void openDataBase() throws SQLException{ //Open the database String myPath = DB_PATH + DB_NAME; myDataBase = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READONLY); }

@Override public synchronized void close() { if(myDataBase != null) myDataBase.close(); super.close(); }

@Override public void onCreate(SQLiteDatabase db) { }

@Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { }

// Add your public helper methods to access and get content from the database. // You could return cursors by doing "return myDataBase.query(....)" so it'd be easy // to you to create adapters for your views.

public List getQuestionSet(int difficulty, int numQ){ List questionSet = new ArrayList(); Cursor c = myDataBase.rawQuery("SELECT * FROM QUESTIONS WHERE DIFFICULTY=" + difficulty + " ORDER BY RANDOM() LIMIT " + numQ, null); while (c.moveToNext()){ //Question Found in DB Question q = new Question(); q.setQuestion(c.getString(1)); q.setAnswer(c.getString(2)); q.setOption1(c.getString(3)); q.setOption2(c.getString(4)); q.setOption3(c.getString(5)); q.setRating(difficulty); questionSet.add(q); } return questionSet; } }

CONCLUSION In Summary, the project, “Android Based WebBrowser Application -WEBBROWSERApplication” provides a Technical based quiz applications where users can improve their Technical knowledge. There are different types of question which is related with Database, Network security, Java, ASP.NET, Operating System. Settings can be used to select the level of difficulty, according to which the questions will be displayed .In the other module We have provided questions based on the difficulty level selected By the user. For these modules we have created a database using SQLite .The database contains the questions as wells a difficulty level mapped

to

it.

BIBLIOGRAPHY

WEBSITES :    

www.google.com. www.youtube.com. www.sanfoundry.com. Wikipedia

BOOKS :    

Java Reference book (pdf) FY , SY ,TY Notes Android SQLite Database pdf file Database Managemet System , ASP.NET, Network Security Book

More Documents from "nilesh shirodkar"

Ajssh2014(3.4-13).pdf
April 2020 1
Ajssh2014(3.4-13).pdf
April 2020 1
Webbrowser.docx
May 2020 2
Km Notes.docx
June 2020 1
Ijcatr05021006.pdf
April 2020 0