100% found this document useful (1 vote)
960 views

Practical No. 04

This document contains the details of an experiment conducted by a student named Diksha Sunil Jadhav to develop mobile applications. The experiment involved writing two programs: 1) A simple "Hello World" program to display text on the screen. 2) A program to display the student's name and marks obtained in different subjects. The document provides the code snippets for the activity_main.xml layout file used to display the text in both programs. It also includes questions about the files and concepts used in Android programming.

Uploaded by

Diksha Jadhav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
960 views

Practical No. 04

This document contains the details of an experiment conducted by a student named Diksha Sunil Jadhav to develop mobile applications. The experiment involved writing two programs: 1) A simple "Hello World" program to display text on the screen. 2) A program to display the student's name and marks obtained in different subjects. The document provides the code snippets for the activity_main.xml layout file used to display the text in both programs. It also includes questions about the files and concepts used in Android programming.

Uploaded by

Diksha Jadhav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

DEPARTMENT OF COMPUTER ENGINEERING

Subject: Mobile Application Development (MAD) Subject Code: 22617


Semester: 6 Course: CO6IA
Laboratory No: V119 Name of the Subject Teacher: Prof. Prasad Koyande
Name of the Student: Diksha Sunil Jadhav Roll Id: 21203A0057

Experiment No. 04
Title of the experiment Develop a program to display Hello World on screen.

Practical Related Questions:

1. List the files used to write Hello World program.

 MainActivity.java
 activity_main.xml

2. What is an activity in Android programming?

 In Android programming, an "activity" is a fundamental component of the Android


application's user interface.
 It represents a single screen with a user interface that users can interact with.
 Each activity is defined as a subclass of the Activity class and plays a crucial role in the
overall navigation and user experience within an Android app.

Exercise:

1. Write a program to display HelloWorld.

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">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
android:textSize="40dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"

Diksha Jadhav – 21203A0057 Page No. | 1


app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

2. Write a program to display student name and marks.

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">

<TextView
android:id="@+id/t1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="50dp"
android:text="Student Name: Diksha Jadhav"
android:textSize="25dp"
android:gravity="center"
android:paddingBottom="40dp"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/t2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Marks"
android:textSize="25dp"
android:gravity="center"
android:paddingBottom="10dp"
app:layout_constraintTop_toBottomOf="@id/t1" />
<TextView
android:id="@+id/t3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="English - 80/100"
android:textSize="25dp"
android:gravity="center"
android:paddingBottom="10dp"
app:layout_constraintTop_toBottomOf="@id/t2" />
<TextView
android:id="@+id/t4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Maths - 90/100"
android:gravity="center"
android:textSize="25dp"
app:layout_constraintTop_toBottomOf="@id/t3"
android:paddingBottom="10dp" />
<TextView
android:id="@+id/t5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Science - 85/100"

Diksha Jadhav – 21203A0057 Page No. | 2


android:textSize="25dp"
android:gravity="center"
android:paddingBottom="10dp"
app:layout_constraintTop_toBottomOf="@id/t4" />
<TextView
android:id="@+id/t6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="SST - 84/100"
android:textSize="25dp"
android:gravity="center"
android:paddingBottom="10dp"
app:layout_constraintTop_toBottomOf="@id/t5" />
<TextView
android:id="@+id/t7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Hindi - 98/100"
android:textSize="25dp"
android:gravity="center"
android:paddingBottom="10dp"
app:layout_constraintTop_toBottomOf="@id/t6" />
<TextView
android:id="@+id/t8"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Marathi - 99/100"
android:textSize="25dp"
android:gravity="center"
android:paddingBottom="10dp"
app:layout_constraintTop_toBottomOf="@id/t7" />

</androidx.constraintlayout.widget.ConstraintLayout>

Process related (15M) Product related (10M) Total (25M) Sign of the teacher

Diksha Jadhav – 21203A0057 Page No. | 3

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy