Professional Documents
Culture Documents
LIST APP
By
WASIM KHAN
(2018-Arid-0270)
November, 2020
WORD CHALLENGE WITH FRIEND
LIST APP
Submitted By
WASIM KHAN
(2018-Arid-0270)
Supervised By
MR. AZHAR JAMIL
SUPERVISORY COMMITTEE
First, I owe gratitude to Allah Almighty, the most merciful and compassionate
most gracious and beneficial who enabled me to accomplish the task. I feel
honors to express heartiest feelings to professor of BIIT, Mr. Azhar Jamil for
his guidance and kind supervision. I am very thankful to my all teachers
especially Mr. Azhar Jamil, all credit goes to them for my current and future
work in this field.
This project is dedicated to my father and brothers who have never failed to give us
financial and moral support, for giving all our needs during the time we developed our
system and for teaching us that even the largest task can be accomplished if we take
one step at a time. “I pray that ALLAH (SWT) give continuous skill to my hands,
clear visions to my mind, kindness and meekness to my heart”. “I have learned many
things from this venture, but most of all, I have come to realize more than ever”.
“Quality is never an accident. It is always the result of high intention, intelligent
direction, sincere effort and skillful execution. It is the wise choice of many
alternatives”.
ABSTRACT
The “Word Challenge With Friend List” game is an android application game. In this
game, users will register themselves or they can get random login id. The basic
purpose of this project was to facilitate the players to play game. Various functions
have been added in this project.
For instance, this project created an option whereby multiple users could play
with each other at the same time when they were online. In addition, one player
has to select word for the other opponent in this game. The other opponent needs
to guess that word by dashing of this word. Moreover, users can also add their
friends in this game. They can also saw their friends’ list in a separate section.
However, admin has no right to challenge anyone. Admin can add Category,
level and word, in database. Finally, a proper database system was recorded by
using web services. Novices can implement similar web services in order to
secure the database and entertain the user.
TABLE OF CONTENTS
Contents Page No.
CERTIFICATEiii
ACKNOWLEDGEMENTiv
DEDICATIONS.................................................................................................................v
ABSTRACTvi
TABLE OF CONTENTSvii
LIST OF FIGURESix
CHAPTER 1- INTRODUCTION01
1.1 Project View01
1.2 Problem Statement01
1.3Objectives01
1.4 Proposed Solution02
1.5 Scope02
CHAPTER 2- Project Background03
2.1 Related Projects and Research Articles03
CHAPTER 3- CONCEPTUAL DESIGN07
3.1 Requirement Elicitation (Sources of requirements)07
3.2 Requirement Specification07
3.2.1 Functional Requirements..........................................................................................07
3.2.2 Non-functional Requirements...................................................................................07
3.2.3 Domain Requirements..............................................................................................08
3.3 Requirement Modeling08
3.3.1 Dataflow Diagram or Usecase Diagram................................................................................08
3.4 Database Design09
3.4.1 Entity Relatonship Diagram...................................................................................................10
3.5 Conceptual Diagram.................................................................................................................10
CHAPTER 4- IMPLEMENTATION12
4.1 Tools & Technologies12
CHAPTER 5- CONCLUSION22
5.1 Concluding Remarks22
5.2 Future Directions22
5.3 Limitations22
BIBILIOGRAPHY………23
LIST OF FIGURES
Figures PageN
INTRODUCTION
On admin side, all the management of project overall strategies are handled by
the admin like he can add category, level and word which is not present in activity.
Report is generated and sent to the administration. Every person with a little
knowledge of android platform can use this software application services. This
software application provides the easy and understandable user interface. Android
based smart phones are getting popular and it is everyone's need in this era.
1
2
1.2 PROBLEM STATEMENT
1.3 OBJECTIVES
The user will first interact with the application and after that he will fetch
different reports for his requirement. This system will be efficient & accurate. This
system will be user friendly and easy to use due to its simple and attractive interface.
The System will be more secure. Android is spreading quickly, increasing number of
mobile phone manufacturers today are considering using it in their most current cell
phones. Android application development is gaining momentum to support the
growing need for Android-based smartphones and increasing adaptation with such
devices. It is an open source OS used to develop applications to support customers
demands. Android mobile application can also be customized to meet varying client
needs. Android game development is utilized to produce out of the box games which
would thrill all its players.
It will be launched or can be used only in android environment and with the
specific login accounts. The data will be kept safe because we use WCF Web Service
to fetch the data from the database.
CHAPTER 2
PROJECT BACKGROUND
Word Challenge With Friend List was not already developed .But this
application concept matches with my project. In this application (Swaira Sahar,2017)
stated that accepts first it display the splash Screen Android is a first complete, then
game interface shows below. It is developed by the open handset Alliance, a group of
more than 30 technology and mobile companies. It is supported by Google and this
project uses a Google Mobile SDK for testing an application.
The aim Hangman is a game that cheats at the classic game Hangman.
Normally, when writing a computer to play Hangman, the computer picks a single
word and accurately represents it as the human player tries to guess all of the letters in
the word. In Evil Hangman, the computer instead maintain the word list of every word
in the English language, and then continuously cuts down the word list to try to dodge
the guesses as much possible.
This project focuses on developing a game application that is developed using
XML and JAVA where the service seeker and service providers can have their
profiles to know about each other. This web application increases the security
allowing the service seeker to know the person who is going to fix the problem posted
by him. Both services provider and seeker will have an option to choose the person
according to the ratings and reviews that are posted previously.
4
5
In Figure 2.2 When user will start the game, he will see the game
screen where he will guess the word that opponent his send a challenge to him.
7
CONCEPTUAL DESIGN
3.1 REQUIREMENT ELICITATION
The requirements are gathered from director of BIIT and supervisor. In each
meeting, there was discussion of assigning the objectives/requirements. I have
follows each instruction from supervisor and director.
Word Challenge With Friend List App user can insert own data and store that
data in the database by using web services. On server side, the data will be view by
the admin.
Login Account
New logins account for user (Player) for Registration.
Add Friend
In adding new friend, user will send friend request.
Multi player
Multi player will participate and could challenge each other.
Add Word
In adding new word, only admin would add new category, level and
word.
Admin Login
Admin can change category, level and word.
Hint For Player
Opponent player can see hint for his challenge.
8
9
3.2.2 Non-Functional Requirements
Following are the non-functional requirements which are mandatory for these
applications according to the international policies.
Reliability
This system is safety ensured. Exceptional handling is ensured for avoiding
unwanted crash and errors.
Performance
This system is full of speed and accuracy user does not have to wait for any
response and the databases and portal has been optimized.
Availability
24/7 server availability is ensured.
Design Constraints
The interfaces are simple and user friendly, user does not have to bother about
it.
In figure 3.3.1 shows the detailed operation done by user, how the request will
be forward and from which table response will be get. The application performs
action according to the needs of user.
Every application requires a database design because we have to store the data
for every entity. Following is the design of the database of my application. This
database is implemented by Web services.
11
3.4.1 ENTITY RELATIONSHIP DIAGRAM
Admin sends request to the Web service and SQL database and to store or
retrieve the data and the database stores or sends the data as a response.
CHAPTER 4
IMPLEMENTATION
• Android Studio.
• Fiddler.
Module 1: Login
Output Screen
13
14
In Figure 4.1 is login screen in which admin and user enter email and password
Code
return true;
}
}
catch (Exception ex)
{
Toast.makeText(getApplicationContext(),"user not found
",Toast.LENGTH_SHORT).show();
return false;
}
public void validation()
{
if(TextUtils.isEmpty(edtSignInUserId.getText().toString()))
{
edtSignInUserId.setError("Please enter your Id");
}
if(TextUtils.isEmpty(edtSignInUserpassword.getText().toString()))
{
edtSignInUserpassword.setError("Please enter your Password");
}
else{
15
if (edtSignInUserId.getText().toString().equals("wasim@gmail.com" )&&
edtSignInUserpassword.getText().toString().equals("123") )
{
SharedPreferences sharedPref = getSharedPreferences("MainPrefs",
Context.MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPref.edit();
editor.putString("user_id", "wasim");
editor.putString("user_name", "Wasim Khan");
editor.apply();
Output screen
In Figure 4.2 is registration screen of User in which user make the account for game
playing.
Code
Signupbutton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
16
if(TextUtils.isEmpty(edtSignupUserFname.getText().toString())) {
edtSignupUserFname.setError("Please enter first name");
}
if(TextUtils.isEmpty(edtSignupUserLname.getText().toString())) {
edtSignupUserLname.setError("Please enter last name");
}
if(TextUtils.isEmpty(edtSignupId.getText().toString())) {
edtSignupId.setError("Please enter id");
}
if(TextUtils.isEmpty(edtSignupPassword.getText().toString())) {
edtSignupPassword.setError("Please enter password");
}
if(TextUtils.isEmpty(edtSignupConfirmpassword.getText().toString())) {
edtSignupConfirmpassword.setError("Please enter confirm password");
}
else {
registerUser();
Toast.makeText(getApplicationContext(),"successfully data
save",Toast.LENGTH_SHORT).show();
Intent intent = new Intent(getApplicationContext(), SignInActivity.class);
startActivity(intent);
}
}
});
private void registerUser() {
Registration registration = new Registration();
registration.FirstName=edtSignupUserFname.getText().toString().trim();
registration.LastName=edtSignupUserLname.getText().toString().trim();
registration.id=edtSignupId.getText().toString().trim();
registration.password=edtSignupPassword.getText().toString().trim();
registration.confirmpassword=edtSignupConfirmpassword.getText().toString().tri
m();
Output screen
In Figure 4.3 is view friend screen of user in which user can see his friends
and their friend can accept and reject their challenge.
Code
public class FriendsFragment extends Fragment {
ArrayList<FriendList> friendListArrayList=new ArrayList<>();
ArrayList<friendList> friendLists = new ArrayList<>();
friendAdapter friendAdapter;
public FriendsFragment() {
// Required empty public constructor
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_friends, container, false);
18
ListView friendList = rootView.findViewById(R.id.friendList);
friendListArrayList.add(friendList1);
}
friendAdapter = new friendAdapter(getContext(), R.layout.friendlist,
friendListArrayList);
friendList.setAdapter(friendAdapter);
public FriendList (){};
Output Screen
In Figure 4.4 all the active user will show in this activity and anyone can send
challenge to the active user.
Code
addfriendbutton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (pos==0)
{
Toast.makeText(getContext(),"Item selected
first",Toast.LENGTH_SHORT).show();
}
else
{
/* Fragment fragment = new FriendsFragment();
FragmentManager fragmentManager =
getActivity().getSupportFragmentManager();
FragmentTransaction fragmentTransaction =
fragmentManager.beginTransaction();
fragmentTransaction.replace(R.id.frame_layout, fragment);
fragmentTransaction.addToBackStack(null);
fragmentTransaction.commit();*/
20
SharedPreferences sharedPref =
getActivity().getSharedPreferences("MainPrefs", Context.MODE_PRIVATE);
if (UId.equals("NOTHING FOUND"))
{
Toast.makeText(getActivity().getApplicationContext(), "Something
went wrong", Toast.LENGTH_LONG).show();
return ;
}
if (ToId.equals("NOTHING FOUND"))
{
Toast.makeText(getActivity().getApplicationContext(), "Something
went wrong", Toast.LENGTH_LONG).show();
return ;
}
else
{
Toast.makeText(getActivity().getApplicationContext(), "Data Save
Successfully", Toast.LENGTH_LONG).show();
}
friendList.fromId = UId;
friendList.toId = ToId;
friendList.attempted=attmp;
// Toast.makeText(getActivity().getApplicationContext(), "Data Save
Successfully", Toast.LENGTH_LONG).show();
Gson gson = new Gson();
String json = gson.toJson(friendList);
//String jsonString = "";
WCFHandler.PostJsonResult("wordchallenge/FriendList",json);
//
}
}
});
private void FetchActiveUsers()
{
String result = WCFHandler.GetJsonResult("wordchallenge/AllUsers");
Gson gson = new Gson();
21
// _activeuser = gson.fromJson(result,String[]);
_activeuser = gson.fromJson(result, new TypeToken<List<String>>()
{}.getType());
}
}
Module 5: Play Activity
Output Screen
In Figure 4.5 is show the user playing the game and he will guess the word
that opponent sent as a challenge.
Code
challengeuser.setOnClickListener(new View.OnClickListener() {
@Override
Context.MODE_PRIVATE);
SharedPreferences.Editor editor1 = shared1.edit();
editor1.putString("user_word2", challenge.word2);
editor1.apply();
}
challenge.category = sspinner.getSelectedItem().toString().trim();
// String fromid = getIntent().getExtras().getString("key");
Context.MODE_PRIVATE);
SharedPreferences.Editor editor = sharedP.edit();
editor.putString("category", challenge.category);
editor.apply();
23
Module 6: Admin
Output Screen
In Figure 4.6 is admin can add category, level and new word into database.
Code
}
public void initialiazation()
{
categorytxt=findViewById(R.id.categoryeditText);
leveltxt=findViewById(R.id.leveleditText);
wordtxt=findViewById(R.id.wordeditText);
savebtn=findViewById(R.id.savebutton);
backbtn=findViewById(R.id.backbutton);
}
private void registerUser() {
// Registration registration = new Registration();
Admin admin=new Admin();
admin.Category=categorytxt.getText().toString().trim();
admin.Levels=leveltxt.getText().toString().trim();
admin.Word1=wordtxt.getText().toString().trim();
//register(firstname,lastname,id,password);
Output Screen
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_last);
trybtn=findViewById(R.id.PlayButton);
ebtn=findViewById(R.id.ExitButton);
trybtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent=new Intent(getApplicationContext(),TryActivity.class);
startActivity(intent);
}
});
ebtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// System.exit(0);
}
});
}}
CHAPTER 5
CONCLUSION
Word Challenge With Friend List App User can get information regarding the
active user and separate friends section. They can easily register themselves for
playing the game. As a result, the next frontier of educational gaming will be created
by the very generation who were nurtured by games throughout childhood.
Application will allow a new user to register and after successfully registration. Then
visit the side of app.
5.3 Limitations
This software application is easy to use, easy to install in Android supported
mobile devices. Users have to just download and install it.
26
BIBLIOGRAPHY
Code. (2017, may 19). Retrieved December 2019, from Managing multiple login/registration
flows in an Android Java app:www.lynxpro.com/blog/managing-multiple-
loginregistration-flows-android-java-app/
(2018, June 15). Retrieved January 2020, from 16 Android Menu Open Source UI Animation
Components Libraries [Java & Obj-C]:uxplanet.org/16-java-menu-open-source-ui-
animation-components-libraries-java-obj-c-75b0c3f7dcc8
(2018, December 8). Retrieved january 2020, from Start Developing Android Apps (Java):
developer.apple.com/library/archive/referencelibrary/GettingStarted/Develop Androi
dAppsJava/CreateATableView.html
(2019, march 13). Retrieved october 2019, from Getting started with Core Data using Java 4:
wojciechkulik.pl/ android/getting-started-with-core-data-using-java-4
27