Está en la página 1de 9

INSTITUTO DE EDUCACION SUPERIOR TECNOLÓGICA PÚBLICO

SANTIAGO ANTUNEZ DE MAYOLO


“Ser excelentes” Lic. Nohemy Esther CARHUANCHO HIDALGO

Indicador de logro 2

Apellidos y nombres: AROTOMA CASTRO KENNY


Periodo académico: V Turno: DIURNO Fecha: 13/07/2022

Instrucciones: Lea bien cada una de las interrogantes, note cuales son las exigencias y realiza lo solicitado en
los siguientes números. Tiene una duración de 60 minutos.

1. Realizar una aplicación móvil de diseño libre, que utilice los controles estudiados de cada categoria
del panel paleta que se aprendio hasta la fecha. Puede utilizar las actividades que usted desea, el
diseño tiene una puntuación de (4 puntos)

DISEÑO Y PROGRAMACIÓN WEB DESARROLLO DE APLICACIONES MÓVILES


INSTITUTO DE EDUCACION SUPERIOR TECNOLÓGICA PÚBLICO
SANTIAGO ANTUNEZ DE MAYOLO
“Ser excelentes” Lic. Nohemy Esther CARHUANCHO HIDALGO

DISEÑO Y PROGRAMACIÓN WEB DESARROLLO DE APLICACIONES MÓVILES


INSTITUTO DE EDUCACION SUPERIOR TECNOLÓGICA PÚBLICO
SANTIAGO ANTUNEZ DE MAYOLO
“Ser excelentes” Lic. Nohemy Esther CARHUANCHO HIDALGO

2. Se tiene 7 categorias estudiadas, excepto la categoría Google por lo tanto, minimo debe utilizar un
control de cada categoria, si desea puede utilizar varias Activitys. Se calificará de la siguiente
manera: (total 15 puntos)

Controles de vista: TextView 1 punto.

Controles EditText 1.5 puntos

Controles Button: Button, RadioButton, CheckBox, otro 2 puntos

Controles Layout: diferentes layouts 2 puntos

Controles RecyclerView, Spinner, ScrollView, Listview 2.5 puntos

DISEÑO Y PROGRAMACIÓN WEB DESARROLLO DE APLICACIONES MÓVILES


INSTITUTO DE EDUCACION SUPERIOR TECNOLÓGICA PÚBLICO
SANTIAGO ANTUNEZ DE MAYOLO
“Ser excelentes” Lic. Nohemy Esther CARHUANCHO HIDALGO

package com.example.categorias;

import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {


TextView tv1,tv2;
RadioGroup grupoRadiospreguntas;
RadioButton rbP1,rbP2,rbP3,rbP4;
Button btnSiguiente;
int contadorPregunta = 1;
int notaFinal = 0;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

tv1 = findViewById(R.id.tv2);
tv2 = findViewById(R.id.tv2);
rbP1 = findViewById(R.id.rbP1);
rbP2 = findViewById(R.id.rbP2);
rbP3 = findViewById(R.id.rbP3);
rbP4 = findViewById(R.id.rbP4);
grupoRadiospreguntas = findViewById(R.id.grupoRadiospreguntas);
btnSiguiente = findViewById(R.id.btnSiguiente);

tv1.setText("Pregunta #1");
tv2.setText("¿Qué necesitan las plantas para vivir?");
rbP1.setText("Sol, Agua, Tierra");
rbP2.setText("Cocacola");
DISEÑO Y PROGRAMACIÓN WEB DESARROLLO DE APLICACIONES MÓVILES
INSTITUTO DE EDUCACION SUPERIOR TECNOLÓGICA PÚBLICO
SANTIAGO ANTUNEZ DE MAYOLO
“Ser excelentes” Lic. Nohemy Esther CARHUANCHO HIDALGO

rbP3.setText("Pizza");
rbP4.setText("Chocolate");
btnSiguiente.setEnabled(false);

btnSiguiente.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
evaluarRespuestas();
contadorPregunta++;
imprimirPreguntas();

}
});
}

public void onRadioButtonClicked(View view) {


if (rbP1.isChecked()|| rbP2.isChecked()||rbP3.isChecked()||rbP4.is-
Checked()){
btnSiguiente.setEnabled(true);
}
}

public void evaluarRespuestas(){


if (contadorPregunta==1){
if (rbP1.isChecked()){
notaFinal+=2;
}
}
if (contadorPregunta==2){
if (rbP3.isChecked()){
notaFinal+=2;
}
}
if (contadorPregunta==3){
if (rbP1.isChecked()){
notaFinal+=2;
}
}
if (contadorPregunta==4){
if (rbP2.isChecked()){
notaFinal+=2;
}
}
if (contadorPregunta==5){
if (rbP2.isChecked()){
notaFinal+=2;
}
}
}

public void imprimirPreguntas(){


if (contadorPregunta==2){
grupoRadiospreguntas.clearCheck();
tv1.setText("Pregunta #2");
tv2.setText("Cuánto es 1+1");
rbP1.setText("La respuesta es 5");
rbP2.setText("La respuesta es 8");
rbP3.setText("La respuesta es 2");
rbP4.setText("La respuesta es 9");
btnSiguiente.setEnabled(false);
}
DISEÑO Y PROGRAMACIÓN WEB DESARROLLO DE APLICACIONES MÓVILES
INSTITUTO DE EDUCACION SUPERIOR TECNOLÓGICA PÚBLICO
SANTIAGO ANTUNEZ DE MAYOLO
“Ser excelentes” Lic. Nohemy Esther CARHUANCHO HIDALGO

if (contadorPregunta==3){
grupoRadiospreguntas.clearCheck();
tv1.setText("Pregunta #3");
tv2.setText("¿Cómo dicen los perros?");
rbP1.setText("Wuaf Wuaf");
rbP2.setText("Miau");
rbP3.setText("Kikirikiiii");
rbP4.setText("Oink Oink");
btnSiguiente.setEnabled(false);
}
if (contadorPregunta==4){
grupoRadiospreguntas.clearCheck();
tv1.setText("Pregunta #4");
tv2.setText("¿Cuál es la primera letra del Abedecedario?");
rbP1.setText("La primera letra es P");
rbP2.setText("La primera letra es A");
rbP3.setText("La primera letra es U");
rbP4.setText("La primera letra es S");
btnSiguiente.setEnabled(false);
}
if (contadorPregunta==5){
grupoRadiospreguntas.clearCheck();
tv1.setText("Pregunta #5");
tv2.setText("¿Los padres de mis padres son mis?");
rbP1.setText("Tios");
rbP2.setText("Abuelos");
rbP3.setText("Sobrinos");
rbP4.setText("Hermanos");
btnSiguiente.setEnabled(false);
}
if (contadorPregunta>5){
grupoRadiospreguntas.clearCheck();
tv1.setText("SU NOTA ES: "+notaFinal);
if (notaFinal>=6){
tv2.setText("Aprobado");
}else{
tv2.setText("Reprobado");
}
grupoRadiospreguntas.setVisibility(View.INVISIBLE);
btnSiguiente.setEnabled(false);
}
}

DISEÑO Y PROGRAMACIÓN WEB DESARROLLO DE APLICACIONES MÓVILES


INSTITUTO DE EDUCACION SUPERIOR TECNOLÓGICA PÚBLICO
SANTIAGO ANTUNEZ DE MAYOLO
“Ser excelentes” Lic. Nohemy Esther CARHUANCHO HIDALGO

<?xml version="1.0" encoding="utf-8"?>


<androidx.constraintlayout.widget.ConstraintLayout xmlns:an-
droid="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">

<LinearLayout
android:layout_width="409dp"
android:layout_height="729dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<TextView
android:id="@+id/tv1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:text="Pregunta #"
android:textSize="24sp" />

<TextView
android:id="@+id/tv2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:text="TextView"
android:textSize="24sp" />

<RadioGroup
android:id="@+id/grupoRadiospreguntas"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<RadioButton
android:id="@+id/rbP1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onRadioButtonClicked"
android:text="RadioButton" />

<RadioButton
android:id="@+id/rbP2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onRadioButtonClicked"
android:text="RadioButton" />
DISEÑO Y PROGRAMACIÓN WEB DESARROLLO DE APLICACIONES MÓVILES
INSTITUTO DE EDUCACION SUPERIOR TECNOLÓGICA PÚBLICO
SANTIAGO ANTUNEZ DE MAYOLO
“Ser excelentes” Lic. Nohemy Esther CARHUANCHO HIDALGO

<RadioButton
android:id="@+id/rbP3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onRadioButtonClicked"
android:text="RadioButton" />

<RadioButton
android:id="@+id/rbP4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="05dp"
android:onClick="onRadioButtonClicked"
android:text="RadioButton" />

<Button
android:id="@+id/btnSiguiente"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="siguiente"
android:textSize="20sp" />
</RadioGroup>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

DISEÑO Y PROGRAMACIÓN WEB DESARROLLO DE APLICACIONES MÓVILES


INSTITUTO DE EDUCACION SUPERIOR TECNOLÓGICA PÚBLICO
SANTIAGO ANTUNEZ DE MAYOLO
“Ser excelentes” Lic. Nohemy Esther CARHUANCHO HIDALGO

3. Elaborar el enunciado de su aplicación: 1 punto.

Descuentos por entregar fuera de la fecha establecida


Entrega puntual=0 p Después de 1 horas = -1p Después de 2 horas = -2p
Después de 3 horas = -3p Después de 8 horas = -4p Después de 1 día = -5p

DISEÑO Y PROGRAMACIÓN WEB DESARROLLO DE APLICACIONES MÓVILES

También podría gustarte