Diploma Computer/IT

Mobile Application Development Practical 9

Mobile Application Development Practical 9 Question 1 Write a program to create a toggle button to display ON / OFF Bluetooth on the display screen. 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"> <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent"> <ToggleButton android:id="@+id/toggleButton" android:layout_width="153dp" android:layout_height="262dp" android:layout_gravity="center" android:drawableBottom="@drawable/bluetooth" android:textOff="off" android:textOn="on" /> <TextView android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="100dp" android:layout_gravity="center_horizontal" android:text="Bluetooth […]

Mobile Application Development Practical 9 Read More »

Mobile Application Development Practical 8

Mobile Application Development Practical 8 Question 1 Write a program to create a first display screen of any search engine using Auto Complete Text View. 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:id="@+id/main" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <AbsoluteLayout android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:id="@+id/text1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_x="56dp" android:layout_y="99dp" android:text="Search" /> <AutoCompleteTextView android:id="@+id/autoText" android:layout_width="200dp" android:layout_height="wrap_content" android:layout_x="138dp" android:layout_y="83dp" android:hint="Search

Mobile Application Development Practical 8 Read More »

Mobile Application Development Practical 7

Mobile Application Development Practical 7 Question 1 Write a program to accept username and password from the end user using Text View and Edit Text 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"> <TableLayout android:layout_width="match_parent" android:layout_height="match_parent"> <TableRow android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="50dp" android:layout_marginLeft="40dp" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Enter Username:" /> <EditText android:id="@+id/edittext" android:layout_width="160dp"

Mobile Application Development Practical 7 Read More »

Mobile Application Development Practical 6

Mobile Application Development Practical 6 Question 1 Write a program to display 10 students basic information in a table form using Table layout. 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"> <TableLayout android:layout_width="match_parent" android:layout_height="match_parent"> <TableRow android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="10dp"> <TextView android:id="@+id/textView" android:layout_width="100dp" android:layout_height="wrap_content" android:text="Roll No" /> <TextView android:id="@+id/textView" android:layout_width="301dp" android:layout_height="wrap_content" android:text="Student Name" />

Mobile Application Development Practical 6 Read More »

Mobile Application Development Practical 5

Mobile Application Development Practical 5 Question 1 Write a program to place Name, Age and mobile number linearly (Vertical) on the display screen using Linear layout. 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"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="20dp" android:orientation="vertical"> <TextView android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Student Name: Mahesh" /> <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Student

Mobile Application Development Practical 5 Read More »

Mobile Application Development Practical 4

Mobile Application Development Practical 4 Question 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!" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> </androidx.constraintlayout.widget.ConstraintLayout> MainActivity.java package com.example.practical4; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

Mobile Application Development Practical 4 Read More »

Programming In C Practical 25

Programming In C Practical 25 Question 1 Write a program for1.Addition using pointer2.Subtraction using pointer3.Multiplication using pointer4. Division using pointer Operations.cpp C #include<stdio.h> #include<conio.h> void main() { int num1,num2,result; int *ptr1,*ptr2,*ptr3; printf("n Enter first number:"); scanf("%d",&num1); printf("n Enter second number:"); scanf("%d",&num2); ptr1=&num1; ptr2=&num2; ptr3=&result; result=*ptr1+*ptr2; printf("n Addition is: %d",*ptr3); result=*ptr1-*ptr2; printf("n Subtraction is: %d",*ptr3); result=(*ptr1)*(*ptr2);

Programming In C Practical 25 Read More »

Programming In C Practical 23

Programming In C Practical 23 Question 1 Write a C Program to generate Fibonacci series using recursion. Fibo.cpp C #include<stdio.h> #include<conio.h> int fibonacci(int num) { if(num == 0) return 0; else if(num == 1) return 1; else return (fibonacci(num-1) + fibonacci(num-2)); } void main() { int n,i; printf("nEnter the number of terms in fibonacci series:

Programming In C Practical 23 Read More »

Programming In C Practical 22

Programming In C Practical 22 Question 1 Write program to reverse the number 1234 using function. Reverse.cpp C #include<stdio.h> #include<conio.h> int revfun(int num) { int rem,rev=0; while(num>0) { rem=num%10; rev=rev*10+rem; num=num/10; } return(rev); } void main() { clrscr(); int n=1234,rev; rev=revfun(n); printf("nReverse of given number is: %d",rev); getch(); } #include<stdio.h> #include<conio.h> int revfun(int num) {

Programming In C Practical 22 Read More »