0% found this document useful (0 votes)
8 views

Final - Ans

Uploaded by

lmalek462
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
0% found this document useful (0 votes)
8 views

Final - Ans

Uploaded by

lmalek462
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/ 10

COLLAGE OF ENGINEERING & technology – JANZOUR

Information system department

Course name: Mobile Application Final Exam (2 hour)

Q1 Choose the correct answer or answers from the answer below each question? (10 Marks)

1. What is sqflite?

a. A programming language
b. A database management system
c. A library for SQLite database in Flutter
d. A mobile application framework

2. What does sqflite provide in Flutter?

a. Support for web development


b. Access to local SQLite databases
c. Integration with Firebase
d. None of the above

3. Which of the following is true about sqflite?

a. It is a NoSQL database
b. It is platform-dependent and works only on Android
c. It allows developers to perform CRUD operations on a local SQLite database
d. It is primarily used for server-side database management

4. How can you initialize a SQLite database using sqflite in Flutter?

a. By calling openDatabase () function


b. By using Firebase Authentication
c. By importing the SQLite database package
d. By installing the SQLite CLI tool
5. Which is not a property of IconButton?

a. Child
b. OnPressed
c. Both A & B
d. None of above

6. Column is the which type of widget?

a. State-management Widget
b. Platform-specific Widget
c. Layout Widget
d. None of above

7. Which constructor class are used for give padding on both side (left and right)?

a. EdgeInsets ()
b. EdgeInsets.all ()
c. EdgeInsets.only()
d. EdgeInsets.symmentric()

8. Which properties belonging to scaffold widget?

a. background Color
b. body
c. resizeToAvoidBottomInset
d. All of above

9. Which is not an operator in dart.

a. Arithmetic
b. Type-test
c. Equality
d. I/O(input/output)

10. Which of the following operations can you perform using sqflite?

a. Sending HTTP requests


b. Storing data locally on the device
c. Rendering UI components
d. Accessing device sensors
Q2 True or false: Should you correct the false statement?" (10 marks)

1. Text Field widget allows app users to type text into an app.

a. True
b. False

2. Adding a Slider widget in a Flutter app interface should be used to select multiple
values at the same time.

a. True
b. False

The Slider widget in Flutter is typically used to allow users to select a single value
within a range by dragging a thumb along a track. It is not designed to select
multiple values simultaneously.

3. The Container is a Flutter widget that allows you to customize, compose, decorate
and position its child widget.

a. True
b. False

4. In Flutter, AlertDialog Widget is similar to a small interface which appears for a


few seconds at the bottom of the app user interface when the app user takes a
specific action such as clicking a button.

a. True
b. False

In Flutter, the AlertDialog widget is used to display a modal dialog window that
interrupts the user's interaction with the app.

5. When you want to create a Flutter app, you need to configure a lot of widgets and
change their format. You don't need to create everything from scratch. You can
easily add the Scaffold class or widget to your app. This class implements the
basic material design visual layout structure for your app.

a. True
b. False
6. If you want to create a Flutter app using a Mac computer, you need to install
Android Studio or another IDE software and another prerequisite software Flutter
SDK. However, you can test your Flutter apps using IPhone emulator only.
a. True
b. False

While it's true that you need to install Android Studio or another IDE and Flutter
SDK to develop Flutter apps on a Mac computer, you are not limited to testing
your Flutter apps using only an iPhone emulator. Flutter allows you to test your
apps on both Android and iOS

7. If you install the Flutter SDK on your computer and configure it as a plug-in for
Android Studio or another IDE software, Android Studio will be able to create
Flutter apps.

a. True
b. False

8. Flutter widgets are the basic building blocks of a Flutter user interface. Almost
everything in Flutter app is a widget such as images, icons, texts, menus, buttons,
row, column etc.

a. True
b. False

9. In Flutter development, you can add three rows inside a column and add an image
within each row.

a. True
b. False

10. Flutter apps are compiled directly to native code for optimal performance

a. True
b. False
Q3What the output this program? (5 Marks)

void main () {
print (factorial (6));
}
factorial(number) {
if (number <= 0) {
return 1;
} else {
return (number * factorial (number - 1));

}
}

output
720
Q4What the output this program? (5 Marks)

class Student {
String name;
int age;

String get stud_name {


return name;
}

void set stud_name(String name) {


this.name = name;
}

void set stud age(int age) {


if(age<= 0) {
print("Age should be greater than 5");
} else {
this. Age = age;
}
}

int get stud age {


return age;
}
}
void main () {
Student s1 = new Student();
s1.stud_name = 'MARK';
s1.stud_age = 0;
print(s1.stud_name);
print(s1.stud_age);
}

output

Age should be greater than 5


MARK
Null
Q5Writing a program to implement the front-end of an application and draw the (tree
application)

// ignore_for_file: prefer_const_constructors

import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {


const MyApp({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
backgroundColor: Colors.purple,
body: SafeArea(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
CircleAvatar(
radius: 50.0,
backgroundImage: AssetImage('Images/yourProfilePhoto.jpg'),
),
Text(
"AmirHossein Bayat",
style: TextStyle(
fontSize: 28.0,
color: Colors.white,
fontFamily: 'Pacifico',
fontWeight: FontWeight.bold),
),
Text(
"iOS & Android Developer",
style: TextStyle(
fontSize: 18.0,
color: Colors.white,
fontFamily: 'SourceSansPro',
letterSpacing: 2.5,
fontWeight: FontWeight.normal,
),
),
SizedBox(
height: 19.0,
width: 160.0,
child: Divider(
color: Colors.white,
),
),
Card(
color: Colors.white,
margin: EdgeInsets.symmetric(vertical: 12.0, horizontal: 20.0),

child: Padding(
padding: EdgeInsets.all(15.0),
child: Row(
children: const [
Icon(
Icons.phone,
color: Colors.purple,
),
SizedBox(
width: 20.0,
),
Text(
'+98 922 505 8169',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20.0,
color: Colors.deepPurple),
),
],
),
),
),
Card(
color: Colors.white,
margin: EdgeInsets.symmetric(vertical: 0.0, horizontal: 20.0),

child: Padding(
padding: EdgeInsets.all(15.0),
child: Row(
// ignore: prefer_const_literals_to_create_immutables
children: [
Icon(
Icons.email,
color: Colors.purple,
),
SizedBox(width: 20.0),
Text(
'[email protected]',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18.0,
color: Colors.deepPurple),
),
],
),
),
),Card(
color: Colors.white,
margin: EdgeInsets.symmetric(vertical: 12.0, horizontal: 20.0),

child: Padding(
padding: EdgeInsets.all(15.0),
child: Row(
// ignore: prefer_const_literals_to_create_immutables
children: [
Icon(
Icons.account_circle_rounded,
color: Colors.purple,
),
SizedBox(width: 20.0),
Text(
'@CodeWithflexz',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18.0,
color: Colors.deepPurple),
),
],
),
),
)
],
),
),
),
);
}
}

good luck

Nesrin alshagi

You might also like