Yash Mad Report

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Micro-Project Report

MAD (22617)

Topic: Android Application for QUIZ game

1.0 Rationale:
Android application development is one of the rising and growing trend in the industry of
mobile. It examines the principles of mobile application design and covers the necessary
concepts which are required to understand mobile based applications and develop Android
based Applications in particular.

2.0 Aims/Benefits of the Micro-Project:

Aim: The create a Stand-Alone application for creating a Quiz game.

Benefits:
1) Able to understand working of intent.
2) Able to understand various components from pallets.
3) Able to understand various layouts provided.

3.0 Course Outcome Addressed:


1) Configure Android environment and development tools.
2) Develop rich user Interfaces by using layouts and controls.
3) Use User Interface components for android application development.
4) Create Android Application using Database.

4.0 Actual Methodology Followed:

1) Topic allocation.
2) Generating Proposal.
3) Identified the requirements.
4) Collected information from various sources.
5) Understood the concept.
6) Finalized the content for the report.
7) Generating Report.
5.0 Literature Review
1) Referred MAD Manuals.
2) Referred MAD Notes.
3) Referred Millionaire Trivia Game Quiz.

6.0 Actual Resources Used:

Sr. Name of specifications Qty. Remark


no resource/material

1 Computer system Intel i-5 12th gen Windows 1 -


10 pro

2 Android Studio Electro EEL 2022.1.1 1 -

7.0 Output of Microproject:


Screenshots:
SignUpPage.java QuizPage.java
package com.example.exp8_1;
package com.example.exp8_1;
import
import
androidx.appcompat.app.AppCompatActivity
androidx.appcompat.app.AppCompatActi
;
vity;
import android.annotation.SuppressLint;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Context;
import android.content.Intent;
import android.content.Intent;
import
import
android.database.sqlite.SQLiteDatabase;
android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.os.Bundle;
import android.view.View;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.Toast;
public class Quizpage extends
import org.w3c.dom.Text;
AppCompatActivity {
TextView txtname;
public class signuppage extends
int count=0;
AppCompatActivity {
SQLiteDatabase db;
EditText t1,t2,t3;
@SuppressLint("MissingInflatedId")
TextView tv1;
@Override
SQLiteDatabase db;
protected void onCreate(Bundle
@SuppressLint({"MissingInflatedId",
savedInstanceState) {
"WrongViewCast"})
super.onCreate(savedInstanceState);
@Override
setContentView(R.layout.activity_quizpag
protected void onCreate(Bundle
e);
savedInstanceState) {
txtname=findViewById(R.id.dispname);
super.onCreate(savedInstanceState);
db=openOrCreateDatabase("QUIZGAME.
setContentView(R.layout.signuppage);
db", Context.MODE_PRIVATE,null);
t1=findViewById(R.id.Username);
db.execSQL("CREATE TABLE IF NOT
t2=findViewById(R.id.Password1);
EXISTS userdetails(username
t3=findViewById(R.id.Password2);
VARCHAR,password VARCHAR,score
tv1=findViewById(R.id.resultsignup);
INTEGER);");
Bundle extra= getIntent().getExtras();
db=openOrCreateDatabase("QUIZGAME.db
String name=extra.getString("username");
", Context.MODE_PRIVATE,null);
txtname.setText(name);
db.execSQL("CREATE TABLE IF NOT
}
EXISTS userdetails(username
public void rightans(View v){
VARCHAR,password VARCHAR,score
count=count+1;
VACHAR)");
}
}
public void wrongans(View v){}
public void signuppage(View v){
public void submit(View v){
String name=t1.getText().toString();
String name=txtname.getText().toString();
String pass=t2.getText().toString();
Toast.makeText(this, name +" your
String pass2=t3.getText().toString();
previous test score was : "+count,
if(name.length()==0 &&
Toast.LENGTH_LONG).show();
pass.length()==0){ db.execSQL("UPDATE userdetails SET
score='" + count + "' WHERE
tv1.setText("Please enter your details in the username='" + name + "'");
fields"); Intent is=new
t1.requestFocus(); Intent(Quizpage.this,MainActivity.class);
} startActivity(is);
if(pass.equals(pass2)) { }
db.execSQL("INSERT INTO }
userdetails (username,password)
VALUES('"+t1.getText()+"','"+t2.getText()+"
');");
Toast.makeText(this," Sign Up
Complete Please Login to Proceed
",Toast.LENGTH_SHORT).show();
Intent id= new
Intent(signuppage.this,MainActivity.class);
startActivity(id);
}
else {
tv1.setText("SignUp Failed,Enter
Password Correctly");
}
}
public void loginsignup(View v){ LoginPage.java
Intent id= new if(c.getCount()!=0){
Intent(signuppage.this,MainActivity.class); Intent id = new Intent(MainActivity.this,
startActivity(id); Quizpage.class);
} id.putExtra("username",lusername);
} while(c.moveToNext()) {
String username=c.getString(0);
LoginPage.java String score=c.getString(2);
package com.example.exp8_1; Toast.makeText(this,"Welcome :
import "+username+" and your previous score
androidx.appcompat.app.AppCompatActivity was :
import android.annotation.SuppressLint; "+score,Toast.LENGTH_SHORT).show();
import android.app.AlertDialog; }
import android.content.Context; startActivity(id);
import android.content.Intent; }
import android.database.Cursor; else{
import tv1.setText("Invalid Details,If you are a
android.database.sqlite.SQLiteDatabase; new user please SignUp");
import android.os.Bundle; }
import android.view.View;
import android.widget.Button; }
import android.widget.EditText; public void signup(View v){
import android.widget.TextView; Intent i=new
import android.widget.Toast; Intent(MainActivity.this,signuppage.class)
public class MainActivity extends ;
AppCompatActivity { startActivity(i);
EditText et1, et2;
TextView tv1;
}
public void showMessage(String
SQLiteDatabase db; title,String message)
@SuppressLint("MissingInflatedId") {
@Override AlertDialog.Builder builder=new
protected void onCreate(Bundle AlertDialog.Builder(this);
savedInstanceState) { builder.setCancelable(true);
super.onCreate(savedInstanceState); builder.setTitle(title);
setContentView(R.layout.activity_main); builder.setMessage(message);
et1 = findViewById(R.id.username); builder.show();
et2 = findViewById(R.id.password); }
tv1=findViewById(R.id.resultmain); }
db=openOrCreateDatabase("QUIZGAME.db
", Context.MODE_PRIVATE,null);
db.execSQL("CREATE TABLE IF NOT
EXISTS userdetails(username
VARCHAR,password VARCHAR,score
INTEGER);");
}
public void login(View v) {
String lusername=et1.getText().toString();
String lpassword=et2.getText().toString();
Cursor c=db.rawQuery("Select * FROM
userdetails WHERE
username='"+lusername+"' and
password='"+lpassword+"'",null);

8.0 Skills Developed:


1) Developing understanding on how to develop an android application.
2) Developing understanding on how to manage layouts.
3) Developing understanding on how to design interfaces using components.

9.0 Application of Microproject:


1. Can be used to play quiz.
2. Can be used for test for Management subject.
3. Can be used as a sample application to create a proper quiz application.

You might also like