Mobile Application Development: Quiz Game
Mobile Application Development: Quiz Game
Mobile Application Development: Quiz Game
Development
2021-22
Quiz Game
Submitted by
1. Bharat Khalate
MAHARASHTRASTATEBOARDOFTECHNICAL
EDUCATION, MUMBAI
Place: Enrollmentno:1900150332
We wish to express our profound and sincere gratitude to our guide, who Asma
Hannure mam guided us in the structure of micro project as well as some main points
in that micro project also they cleared our all doubts about micro project. We are
Indebted to his constant encouragement, co-operation and help. It was his enthusiastic
support that helped us in overcoming various obstacles in the project.
We would also like to express our thankfulness to our beloved Principal as well as
HOD and other faculty members of our Second-year department for extending their
support and motivation
Finally, we completed our micro project that regarding to our syllabus as well as
department, Once more thanks for all Group members, Respected Asma Hannure
mam , Principal, HOD and other Faculty Members who helped us in the micro project
completion.
Thank You...!!!
3
PART A – Micro-Project Proposal
3 System Designing
1. Bharat Khalate
4 Data collection for the project
7 Testing
8 Error/Defect handling
Index
5
Sr.no Topic
2 Advantages
3 Course Outcomes
4 Literature Review
5 Actual Methodology
6 Resources
7 Source Code
8 Outputs
9 Skill Developed
10 Application
11 Area of Future
6
Information about project
Advantages
7
This application is simple to use.
You can see your option submitted is right or wrong in bottom of screen
In this project i used the radio group having four radio button
You can see the total score at last
Application is very light
Course Outcomes
a. Develop application using android.
b. Develop application using java.
Literature Review
In This Micro-Project we created a Application which convert one number system to
another number system .We made this Micro-Project Using Android studio we use java to
developed this application using java. This Micro Project contains limited features but the
essential one. The User can get to know about the source code whichever he need.
Actual Methodology
Collected information for the suggested topic.
Started the Micro-project.
Completed Micro-project.
Showed to respected teacher.
Submitted the Micro-project.
Resources
1. Software-JDK
2. Software-SDK 8
3. IDE-android studio
4. Windows 10
5. YouTube: Some programming
Source Code
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:background="@color/black_shade_2">
<TextView
android:id="@+id/tvh"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Welcome To Quiz Game"
android:textColor="@color/yellow"
android:textSize="33dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.136" />
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btns"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Start!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.53"
9
tools:ignore="TextContrastCheck"
android:background="@drawable/btn_gol"/>
<TextView
android:id="@+id/tvq"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="sfgjsfgfsgjsc"
android:textColor="@color/yellow"
android:textSize="35dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.143"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.267" />
<RadioGroup
android:id="@+id/rg"
android:layout_width="358dp"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<RadioButton
android:id="@+id/rb1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="abcd"
android:textColor="@color/yellow"
android:textSize="30dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.095"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.407" />
<RadioButton
android:id="@+id/rb2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="abcd"
android:textColor="@color/yellow"
android:textSize="30dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.095"
10
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.477" />
<RadioButton
android:id="@+id/rb3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="abcd"
android:textColor="@color/yellow"
android:textSize="30dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.095"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.547" />
<RadioButton
android:id="@+id/rb4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="abcd"
android:textColor="@color/yellow"
android:textSize="30dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.095"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.617" />
</RadioGroup>
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btnn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_gol"
android:text="Next!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.501"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.808"
tools:ignore="TextContrastCheck" />
</androidx.constraintlayout.widget.ConstraintLayout>
MainActivity.java
11
package com.example.quizgamebybharat;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
import android.view.Gravity;
import android.widget.Toast;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getSupportActionBar().hide();
setContentView(R.layout.activity_main);
h = (TextView) findViewById(R.id.tvh);
q = (TextView) findViewById(R.id.tvq);
btns = (Button) findViewById(R.id.btns);
btnn = (Button) findViewById(R.id.btnn);
rg = (RadioGroup) findViewById(R.id.rg);
rb1 = (RadioButton) findViewById(R.id.rb1);
rb2 = (RadioButton) findViewById(R.id.rb2);
rb3 = (RadioButton) findViewById(R.id.rb3);
rb4 = (RadioButton) findViewById(R.id.rb4);
q.setVisibility(View.INVISIBLE);
rb1.setVisibility(View.INVISIBLE);
rb1.setVisibility(View.INVISIBLE);
rb2.setVisibility(View.INVISIBLE);
rb3.setVisibility(View.INVISIBLE);
rb4.setVisibility(View.INVISIBLE);
btnn.setVisibility(View.INVISIBLE);
btns.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
q.setVisibility(View.VISIBLE);
rb1.setVisibility(View.VISIBLE);
rb1.setVisibility(View.VISIBLE);
rb2.setVisibility(View.VISIBLE);
rb3.setVisibility(View.VISIBLE);
rb4.setVisibility(View.VISIBLE);
btnn.setVisibility(View.VISIBLE);
h.setVisibility(View.INVISIBLE);
btns.setVisibility(View.INVISIBLE);
q.setText("1.Which is the most successful Team of IPL");
rb1.setText("1.MI");
rb2.setText("2.CSK");
rb3.setText("3.RR");
12
rb4.setText("4.DC");
/* if (rg.getCheckedRadioButtonId()== findViewById(R.id.rb1).getId())
{
sc++;
Toast.makeText(MainActivity.this, ""+sc, Toast.LENGTH_SHORT).show();
}*/
btnn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
{ rb1.setChecke
d(false);
rb1.setChecked(false);
rb2.setChecked(false);
rb3.setChecked(false);
rb4.setChecked(false);
q.setText("2.Capital of India is ");
rb1.setText("1.Chennai");
rb2.setText("2.Banglore");
rb3.setText("3.Mumbai");
rb4.setText("4.Delhi");
if (rg.getCheckedRadioButtonId()== findViewById(R.id.rb1).getId())
{
sc++;
Toast.makeText(MainActivity.this, ""+sc, Toast.LENGTH_SHORT).show();
}
btnn.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View view) {
{
rb1.setChecked(false);
rb2.setChecked(false);
rb3.setChecked(false);
rb4.setChecked(false);
q.setText("3.Capital of maharashtra is");
rb1.setText("1.Nagpur");
rb2.setText("2.Pune");
rb3.setText("3.Mumbai");
rb4.setText("4.Delhi");
if (rg.getCheckedRadioButtonId()== findViewById(R.id.rb4).getId())
{
sc++;
Toast.makeText(MainActivity.this, ""+sc, Toast.LENGTH_SHORT).show();
}
btnn.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View view) {
{
rb1.setChecked(false);
rb2.setChecked(false);
rb3.setChecked(false);
rb4.setChecked(false);
q.setText("4.Who is the first prime minister of India");
rb1.setText("1.Pandit Javaharlal Neharu");
rb2.setText("2.BharatRatna Indira Gandhi");
rb3.setText("3.BharatRatna Atal Bihari Vajpayee ");
rb4.setText("4.H.D. DEve Gowda");
if (rg.getCheckedRadioButtonId()== findViewById(R.id.rb3).getId())
{
sc++;
Toast.makeText(MainActivity.this, ""+sc, Toast.LENGTH_SHORT).show();
}
13
btnn.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View view) {
{
rb1.setChecked(false);
rb2.setChecked(false);
rb3.setChecked(false);
rb4.setChecked(false);
q.setText("5.Who was the first and only female prime presidant of india" +sc);
rb1.setText("1.Meera Kumari");
rb2.setText("2.Pratibha (Tai) Patil");
rb3.setText("3.Sushma Swaraj ");
rb4.setText("4.Niramala Sitaraman");
if (rg.getCheckedRadioButtonId()== findViewById(R.id.rb1).getId())
{
sc++;
Toast.makeText(MainActivity.this, ""+sc, Toast.LENGTH_SHORT).show();
}
btnn.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View view) {
{
rb1.setChecked(false);
rb2.setChecked(false);
rb3.setChecked(false);
rb4.setChecked(false);
q.setText("6.Which is the most selling car of 2022 in India till today");
rb1.setText("1.Maruti Suzuki Swift");
rb2.setText("2.Maruti Suzuki Boleno");
rb3.setText("3.MAruti Suzuki WagonR");
rb4.setText("4.Tata Nexon");
if (rg.getCheckedRadioButtonId()== findViewById(R.id.rb2).getId())
{
sc++;
Toast.makeText(MainActivity.this, ""+sc, Toast.LENGTH_SHORT).show();
}
btnn.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View view) {
{
rb1.setChecked(false);
rb2.setChecked(false);
rb3.setChecked(false);
rb4.setChecked(false);
q.setText("7.2019 Bharat Ratna Award was Given to");
rb1.setText("1.Pranab Mukherjee");
rb2.setText("2.Bhupen Hazarika");
rb3.setText("3.Nanaji Deshmukh ");
rb4.setText("4.All of the above");
if (rg.getCheckedRadioButtonId()== findViewById(R.id.rb3).getId())
{
sc++;
Toast.makeText(MainActivity.this, ""+sc, Toast.LENGTH_SHORT).show();
}
btnn.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View view) {
{
rb1.setChecked(false);
rb2.setChecked(false);
rb3.setChecked(false);
rb4.setChecked(false); 14
q.setText("8.Most selling bike of 2022 till now in india");
rb1.setText("1.Hero HF-Deluxe");
rb2.setText("2.Honda Activa");
rb3.setText("3.Honda CB-Shine");
rb4.setText("4.Hero Splendor+");
if (rg.getCheckedRadioButtonId()== findViewById(R.id.rb4).getId())
{
sc++;
Toast.makeText(MainActivity.this, ""+sc, Toast.LENGTH_SHORT).show();
}
btnn.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View view) {
{
rb1.setChecked(false);
rb2.setChecked(false);
rb3.setChecked(false);
rb4.setChecked(false);
q.setText("9.KGF stands for");
rb1.setText("1.Kollar gol field");
rb2.setText("2.Color Gold Field");
rb3.setText("3.Kollar Gold Field");
rb4.setText("4.Khalate's Gold Field");
if (rg.getCheckedRadioButtonId()== findViewById(R.id.rb4).getId())
{
sc++;
Toast.makeText(MainActivity.this, ""+sc, Toast.LENGTH_SHORT).show();
}
btnn.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View view) {
{
rb1.setChecked(false);
rb2.setChecked(false);
rb3.setChecked(false);
rb4.setChecked(false);
q.setText("10.Roll no of Bharat Khalate is ");
rb1.setText("1.42");
rb2.setText("2.{(x+y)-(b+c)}/2");
rb3.setText("3.86");
rb4.setText("4.010101010");
if (rg.getCheckedRadioButtonId()== findViewById(R.id.rb3).getId())
{
sc++;
Toast.makeText(MainActivity.this, ""+sc, Toast.LENGTH_SHORT).show();
}
btnn.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View view) {
{
if (rg.getCheckedRadioButtonId()== findViewById(R.id.rb3).getId())
{
sc++;
Toast.makeText(MainActivity.this, ""+sc, Toast.LENGTH_SHORT).show();
}
q.setText("CONGRATULATIONS YOU FINISHED THE QUIZ AND YOUR SCORE= "+sc+" \uD83E\uDD73\
uD83C\uDF89\uD83C\uDF8A");
q.setTextSize(50);
q.setGravity(Gravity.CENTER | Gravity.BOTTOM);
rb1.setVisibility(View.INVISIBLE);
rb1.setVisibility(View.INVISIBLE);
rb2.setVisibility(View.INVISIBLE); 15
rb3.setVisibility(View.INVISIBLE);
rb4.setVisibility(View.INVISIBLE);
btnn.setText("HOME !");
btnn.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View view) {
{
q.setVisibility(View.INVISIBLE);
rb1.setVisibility(View.INVISIBLE);
rb1.setVisibility(View.INVISIBLE);
rb2.setVisibility(View.INVISIBLE);
rb3.setVisibility(View.INVISIBLE);
rb4.setVisibility(View.INVISIBLE);
btnn.setVisibility(View.INVISIBLE);
btns.setVisibility(View.VISIBLE);
h.setVisibility(View.VISIBLE);
btnn.setText("NEXT !");
sc=0;
}
}
});
}
}
});
}
}
});
}
}
});
}
}
});
}
}
});
}
}
});
}
}
});
}
}
});
}
}
});
}
}
});
}); 16
}
Output
Skill Developed
WE learnt how to make Application in android
WE learnt how to use Android studio
WE learnt new programs concept in java and android
17
Area of future
We will add new function and data to make it easier for operating.
Conclusion
Hence from this Micro-Project we Learnt about how to write and compile program
And from this project we learnt different types of programming and their use in android
studio.
Reference
Srno. Reference Remark
1 tutorialspoint.com Website
2 YouTube: Some coding and programming YouTube
3 Different application Nirali,Techmax Pub.
18