You are on page 1of 27

6th sem Computer Engineering Mobile Application Development (1030106608)

Practical 1
Aim: Installing Git on Windows.

1.Openhttp://git-scm.com/ in preferred browser. (example chrome)


The webpage will auto-detect what operating system. Look for the computer screen on the
right-hand side of the page. Click on Download 2.21.0 for Windows. Your computer should
automatically launch an explorer window and ask you where to save the program on your
computer.

2. Navigate to where you saved the Git program .exe file. Right-click on the file and choose
‘Run as Administrator’. If asked, enter in administrator credentials. This should launch the
installer.

3. The Git License will display. Read through and then Click Next to accept the terms of the
license.

RAJ PRAJAPATI (20270106129) Page | 1


6th sem Computer Engineering Mobile Application Development (1030106608)

4. Choose where Git will be installed. Click Next to choose the default location provided
unless you know you need to install the software somewhere else on your machine.

5. Select the components you want installed along with the Git software. There are already
some default options checked. Make sure to check: Windows Explorer integration, including
Git Bash Here and Git GUI Here. This component will allow you to use the Windows
Explorer context menu to access git Bash and Git Gui. All other options are optional. See
screenshot below.

RAJ PRAJAPATI (20270106129) Page | 2


6th sem Computer Engineering Mobile Application Development (1030106608)

6. Select your Start menu Folder. Choose Next to use the default.

7. Choose which default editor you would like Git to use. For this class, choose ‘Use the
Nano editor by default’ and click Next

RAJ PRAJAPATI (20270106129) Page | 3


6th sem Computer Engineering Mobile Application Development (1030106608)

8. Choose how you would like to use Git from the command line. You can choose ‘Git from
the command line and also from 3rd-party software’ or ‘Use Git from Git Bash only’ See
screenshot.

9. Choose a SSL/TLS library. Select ‘Use the native Windows Secure Channel library. This
allows Git to use the certificates that are native to your machine and may avoid a path
problem later on. See screenshot.

RAJ PRAJAPATI (20270106129) Page | 4


6th sem Computer Engineering Mobile Application Development (1030106608)

10. Choose an option for how Git should treat line endings in text files. Recommended to
keep the default as this is better if you’re planning on sharing your project with others who
may be using a different operating system. Choose ‘Checkout Windows-style, commit Unix-
style line endings’. See screenshot.

11. Configure your terminal emulator to use with Git Bash. Use the default ‘Use MinTTY’

RAJ PRAJAPATI (20270106129) Page | 5


6th sem Computer Engineering Mobile Application Development (1030106608)

12. Configure extra options. Check: Enable file system caching and Enable Git Credential
Manager

13. Choose Install to start the installation.

Once installed, you can access Git bash or the Git GUI via two different ways:
1. Open the Start menu, you’ll find a new Git entry with the Git Bash icon

2. Best Way: Navigate to a folder on your machine where you want to use Git

a. Right click inside the folder. You’ll notice two new options in your context menu: Git
Bash and Git Gui . Choose Git Bash.

RAJ PRAJAPATI (20270106129) Page | 6


6th sem Computer Engineering Mobile Application Development (1030106608)

Practical 2
Aim:Install Android studio.
Step 1

To download the Android Studio, visit the official Android Studio website in your web
browser.

Step 2

Click on the "Download Android Studio" option.

Step 3
 
Double click on the downloaded "Android Studio-ide.exe" file.
 

RAJ PRAJAPATI (20270106129) Page | 7


6th sem Computer Engineering Mobile Application Development (1030106608)

 
Step 4
 
"Android Studio Setup" will appear on the screen and click "Next" to proceed.
 

RAJ PRAJAPATI (20270106129) Page | 8


6th sem Computer Engineering Mobile Application Development (1030106608)

Step 5
 
Select the components that you want to install and click on the "Next" button.
 

 
Step 6
 
Now, browse the location where you want to install the Android Studio and click
"Next" to proceed.
 

RAJ PRAJAPATI (20270106129) Page | 9


6th sem Computer Engineering Mobile Application Development (1030106608)

 
Step 7
 
Choose a start menu folder for the "Android Studio" shortcut and click the
"Install" button to proceed.
 

 
Step 8
After the successful completion of the installation, click on the "Next" button.

RAJ PRAJAPATI (20270106129) Page | 10


6th sem Computer Engineering Mobile Application Development (1030106608)

 
Step 9
 
Click on the "Finish" button to proceed.
 

 
Now, your Android studio welcome screen will appear on the screen.
 

RAJ PRAJAPATI (20270106129) Page | 11


6th sem Computer Engineering Mobile Application Development (1030106608)

 
Android Studio Setup Configuration
 
Step 10
 
"Android Studio Setup Wizard" will appear on the screen with the welcome
wizard. Click on the "Next" button.
 

 
Step 11

RAJ PRAJAPATI (20270106129) Page | 12


6th sem Computer Engineering Mobile Application Development (1030106608)

 
Select (check) the "Standard" option if you are a beginner and do not have any
idea about Android Studio. It will install the most common settings and options
for you. Click "Next" to proceed.
 

 
Step 12
 
Now, select the user interface theme as you want. (I prefer Dark theme (Dracula)
that is most liked by the coders). Then, click on the "Next" button.
 

RAJ PRAJAPATI (20270106129) Page | 13


6th sem Computer Engineering Mobile Application Development (1030106608)

 
Step 13
 
Now, click on the "Finish" button to download all the SDK components.

And, the downloading and installation process of components gets started.


 

RAJ PRAJAPATI (20270106129) Page | 14


6th sem Computer Engineering Mobile Application Development (1030106608)

Step 14
 
After downloading all the necessary components, click on the "Finish" button.
 

Practical 3

Aim: Demonstrate Use of final and const keyword.


With Final Keyword:-

Input :

void main() {
final a = 100;
print(a);
}

Output:-

RAJ PRAJAPATI (20270106129) Page | 15


6th sem Computer Engineering Mobile Application Development (1030106608)

With Const Keyword:-

Input :

import 'dart:io';

void main() {
const pi = 3.14;
print('enter number:');
int? r = int.parse(stdin.readLineSync()!);
var area = pi * r * r;
stdout.write('area of circle is $area');
}

Output:-

RAJ PRAJAPATI (20270106129) Page | 16


6th sem Computer Engineering Mobile Application Development (1030106608)

Practical 4

Aim: Demonstrate use of String and String Buffer class.


INPUT :
import 'dart:io';
void main() {
  String s1 = "raj";
  String s2 = "PRAJAPATI";
  print(s1.toUpperCase());
  print(s2.toLowerCase());

  String s3 = '     hello';


  String s4 = 'hello dart';
  String s5 = 'hello     ';

  print(s3.trimLeft());
  print(s4.trim());
  print(s5.trimRight());

  print("s3.compareTo(s5): ${s3.compareTo(s5)}");
  print("s3.compareTo(s2): ${s3.compareTo(s2)}");

  StringBuffer sb = StringBuffer('Name:');
  sb.write('Raj PRAJAPATI');
  sb.writeCharCode(27);
  sb.writeln('Computer');
  sb.writeAll({'B.M.POLYtechnic', 'Surat'}, ',');

  sb.clear();
  print('String Length:${sb.length}');
  print('isEmpty:${sb.isEmpty}');

RAJ PRAJAPATI (20270106129) Page | 17


6th sem Computer Engineering Mobile Application Development (1030106608)

  print('isNotEmpty:${sb.isNotEmpty}');
}

OUTPUT:

RAJ PRAJAPATI (20270106129) Page | 18


6th sem Computer Engineering Mobile Application Development (1030106608)

Practical 5
AIM : Write a program to use loops.

Input :

void main()
{
for (int i = 0; i < 5; i++) {
print('prajapati RAJ parsottambhai');
}
}

Output:-

RAJ PRAJAPATI (20270106129) Page | 19


6th sem Computer Engineering Mobile Application Development (1030106608)

Practical 6

Aim:Write a program using recursive function.

Input :

import 'dart:io';
void main()
{
print('enter number:');
int? no=int.parse(stdin.readLineSync()!);
var f=fact(no);
print('factorial of $no is $f');
stdout.write('hello..');
}
int fact(int n)
{
if(n<=1)
return 1;
else
return(n*fact(n-1));
}
Output:-

RAJ PRAJAPATI (20270106129) Page | 20


6th sem Computer Engineering Mobile Application Development (1030106608)

Practical 7
Aim: Develop an application to display Hello Word.

Input :

import 'package:flutter/material.dart';
void main() {
runApp(const practical());
}
class practical extends StatelessWidget {
const practical({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(title: 'RAJ-Practical 7',
debugShowCheckedModeBanner: false,
home: Scaffold(
body: const Center(child: Text('Hello World', style: TextStyle(fontSize: 34))),
));}}
Output:-

RAJ PRAJAPATI (20270106129) Page | 21


6th sem Computer Engineering Mobile Application Development (1030106608)

Practical 8

Aim: Use Scaffold class to display name of your Application.

Input :

import 'package:flutter/material.dart';
void main() {
  runApp(const practical());
}
class practical extends StatelessWidget {
  const practical({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'RAJ-Practical 8',
        debugShowCheckedModeBanner: false,
        home: Scaffold(
          appBar: AppBar(
            title: const Text(''), ),
          body: const Center(child: Text('Welcome to MY FLUTTER PROJECT.',
style: TextStyle(fontSize: 34)),
     )
);
 }
}

RAJ PRAJAPATI (20270106129) Page | 22


6th sem Computer Engineering Mobile Application Development (1030106608)

Output:-

RAJ PRAJAPATI (20270106129) Page | 23


6th sem Computer Engineering Mobile Application Development (1030106608)

Practical 9

Aim: Insert an image to your Application.

Input :

import 'package:flutter/material.dart';

void main() {
runApp(MyApp());
}

class MyApp extends StatelessWidget {


@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'RAJ-Practical 9',
home: Scaffold(
appBar: AppBar(
title: Text('RAJ'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
'images/dev.png',
),
],
),
),
),
);
}
}

RAJ PRAJAPATI (20270106129) Page | 24


6th sem Computer Engineering Mobile Application Development (1030106608)

Output:-

RAJ PRAJAPATI (20270106129) Page | 25


6th sem Computer Engineering Mobile Application Development (1030106608)

Practical 10

Aim: Build an Application with floating action button.

Input :

import 'package:flutter/material.dart';

void main() {
runApp(MyApp());
}

class MyApp extends StatelessWidget {


@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(title: ' RAJ'),
debugShowCheckedModeBanner: false);
}
}

class MyHomePage extends StatefulWidget {


MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {


int _counter = 0;
void _incrementCounter() {
setState(() {
_counter++;
});
}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
backgroundColor: Colors.greenAccent,
),
body: Center(
child: Column(

RAJ PRAJAPATI (20270106129) Page | 26


6th sem Computer Engineering Mobile Application Development (1030106608)

mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'$_counter',
style: Theme.of(context).textTheme.headline4,
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: Icon(Icons.add),
),
);
}
}

Output:-

RAJ PRAJAPATI (20270106129) Page | 27

You might also like