0% found this document useful (0 votes)
6 views4 pages

Preparation Questions For Moble App

The document contains preparation questions for a final exam in Mobile App Development at Norton University, covering topics related to Dart programming and Flutter framework. It includes multiple-choice questions about variable declarations, data types, commands, and widget functionalities, as well as problem-solving questions requiring code snippets. The questions aim to assess students' understanding of key concepts and practical skills in mobile app development.

Uploaded by

Yuddho Seavminh
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)
6 views4 pages

Preparation Questions For Moble App

The document contains preparation questions for a final exam in Mobile App Development at Norton University, covering topics related to Dart programming and Flutter framework. It includes multiple-choice questions about variable declarations, data types, commands, and widget functionalities, as well as problem-solving questions requiring code snippets. The questions aim to assess students' understanding of key concepts and practical skills in mobile app development.

Uploaded by

Yuddho Seavminh
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/ 4

Norton University

Preparation Questions for Final Exam


Mobile App Development

I. Single Choice Question


1. How to declare a nullable integer variable in Dart?
a. int? a;
b. int a;
c. int a?;
2. Which is correct datatype for a text value?
a. String
b. string
c. char[]
3. Which code is wrong about a variable declaration?
a. int a = 10;
b. var a = 10;
c. $a = 10;
4. Which datatype does not belong in Dart?
a. double
b. int
c. float
5. Which command is for checking to see if you install Flutter correctly?
a. flutter doctor -v
b. flutter pub get
c. flutter install
6. Which command is for upgrading package?
a. flutter doctor -v
b. flutter pub upgrade
c. flutter install
7. Why Null Safety is important for programming?
a. It prevents null pointer exception
b. It makes app run faster
c. It makes app run smoother
8. What is “hot reload” in Flutter?
a. It can let you change UI at a current state
b. It will restart app from the beginning
c. It will build your app again
9. Which syntax is wrong when declaring a function?
a. int sum(int a, int b) => a + b;
b. int sum({int a, int b}) => a + b;
c. int sum({int a = 5, int b = 10}) => a + b;
10. Which syntax is wrong about declaring a List?
a. List<int> x = [ ];
b. List<int> x = List.empty();
c. List<int> x = { };
11. Which syntax of using Map is wrong in the followings?
a. Map m = { };
b. Map m = [ ];
c. Map m = Map();
12. Which of following syntax is correct?
a. String text = 5 > 0 ? "Hello" ? "H";
b. String text = 5 > 0 : "Hello" ? "Hi";
c. String text = 5 > 0 ? "Hello" : "Hi";
13. What is the different between final and const in Dart?
a. The final is for declaring an integer and the const is for declaring a String
b. The final is for declaring an double and the const is for declaring a bool
c. The final is for declaring an immutable variable and const for a constant variable
14. What is the different between dynamic and var?
a. dynamic variable can change its type later, whereas var cannot
b. var variable can change its type later, whereas dynamic cannot
c. dynamic variable can change its value later, whereas var cannot
15. What is the different between final and var?
a. final is for immutable variable and var is for mutable variable
b. final is for mutable variable and var is for immutable variable
c. final is for String variable and var is for int variable
16. What is the default scroll direction of PageView?
a. horizontal
b. vertical
c. bottomToTop
17. Which option to make a ListView scroll from bottom to top?
a. scroll: bottomToTop
b. reversed: true
c. bottomToTop: true
18. Which syntax is correct for initializing a List?
a. List<int> x = (2, 5, 1);
b. List<int> x = [2, 5, 1];
c. List<int> x = {2, 5, 1};
19. Which is correct syntax of initializing a Map?
a. Map m = {"id":1, "name":"sok"};
b. Map m = {"id" = 1, "name" = "sok"};
c. Map m = {"id" => 1, "name" => "sok"};
20. Which syntax is wrong of initializing a List in Flutter Dart?
a. List x = [1, true, 2.5, Text(“Hello”)];
b. List<Widget> x = [1, true, 2.5, Text(“Hello”)];
c. List<dynamic> x = [1, true, 2.5, Text(“Hello”)];
21. Which method in List is used to display the value of each element?
a. [1, 2, 3].loop((element) => print(element));
b. [1, 2, 3].for((element) => print(element));
c. [1, 2, 3].forEach((element) => print(element));
22. If you want a ListView to scroll from left to right, which option is correct?
a. scrollDirection : Axis.horizontal
b. scrollDirection : Axis.vertical
c. reversed : true
23. What Widget does not have child option?
a. Container()
b. Drawer()
c. Image.network()
24. In Dart 2.12, why optional parameters needs a default value?
a. It prevents null pointer error
b. It makes code beautiful
c. It makes app run faster
25. What is the main feature of Row widget?
a. To display its children horizontally
b. To display its children vertically
c. To make its child scrollable
26. How to align a Row’s children with the equal space?
a. MainAxisAlignment.center
b. MainAxisAlignment.spaceBetween
c. MainAxisAlignment.spaceEvenly
27. Which widget has its default scroll from left to right?
a. PageView
b. ListView
c. GridView
28. Which parameter correctly belongs to Scaffold?
a. color
b. backgroundColor
c. foregroundColor
29. Which Widget have a scroll?
a. Row
b. Stack
c. GridView
30. Instead of using FloatingActionButton, which widget is equivalent to it?
a. Stack()
b. Row()
c. Column()
31. Which Widget does not have a child parameter?
a. Container()
b. BottomAppBar()
c. Image.network()
32. Which class is not a Widget in the following?
a. Color()
b. Padding()
c. Center()
33. If you want a ListView to scroll from left to right, which option is correct?
a. scrollDirection : Axis.horizontal
b. scrollDirection : Axis.vertical
c. reversed : true
II. Problem
34. Difference between GridView.count and GridView.extent?
35. Difference beween StatelessWidget and StatefulWidget?
36. Difference beween setState and State Management?
37. Write some code to display a Column of 5 items.
38. Write some code to display a Row of 5 items.
39. Write some code to display a ListView of 5 items.
40. Write some code to display GridView of 6 items with 2 column counts.
41. Write snippet code to display a Scaffold with AppBar and Body.
42. Write snippet code to display a Scaffold with Drawer and Body.
43. Write snippet code to display a Scaffold with BottomNavigationBar and Body.
44. Write snippet code to display a Scaffold with FloatingActionButton and AppBar.
45. Write snippet code to display a rounded rectangle image.
46. Write snippet code to display a cricle image.
47. Write some code to make a Column scrollable.
48. Write some code to make a Row scrollable.

You might also like