logo

Crowdly

Browser

Додати до Chrome

Mobile Device Programming (CS326/CSE5333/CS326n)

Шукаєте відповіді та рішення тестів для Mobile Device Programming (CS326/CSE5333/CS326n)? Перегляньте нашу велику колекцію перевірених відповідей для Mobile Device Programming (CS326/CSE5333/CS326n) в e-learning.msa.edu.eg.

Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!

A Student Course Registration system needs to be modeled in Dart.

Develop a Dart program that represents a Student with the following information:

  • name (String)
  • studentId (int)
  • courseName (String)
  • isRegistered (bool)

Your program must include:

  1. A class named Student with suitable attributes and a constructor.
  2. A method registerCourse() that marks the student as registered only if the student is not already registered.
  3. A method dropCourse() that marks the student as not registered only if the student is currently registered.
  4. A method displayInfo() that prints all student details in a clear format.
  5. In main(), create two Student objects and demonstrate course registration and course dropping for each
Переглянути це питання

(Code Evaluation)

Evaluate the following Flutter code. Does it correctly handle null safety, and will it display a default text if the value of message is null? If not, fix it.

 

 

String? message;

 

Text(message ?? 'Default Message');

Переглянути це питання

(Code Evaluation)

Evaluate the correctness of the following code snippet. Does it display a CircularProgressIndicator while data is loading, and does it handle the snapshot.data null case correctly?

 

 

Future<String> fetchData() async {

  await Future.delayed(Duration(seconds: 2));

  return 'Data loaded';

}

 

FutureBuilder<String>(

  future: fetchData(),

  builder: (context, snapshot) {

    if (snapshot.connectionState == ConnectionState.waiting) {

      return CircularProgressIndicator();

    } else if (snapshot.hasData) {

      return Text(snapshot.data!);

    } else {

      return Text('Error loading data');

    }

  },

);

Переглянути це питання

(Design)

Design a Flutter app with two pages. On the first page, display a button labeled 'Go to Profile.' On the second page, display a user's profile information. Use Navigator.push and return data when navigating back.

Переглянути це питання

Identify and fix the error in the following code snippet.

 

 

void main() {

  int x = 5;

  print("The square of x is: $x * $x");

}

Переглянути це питання

 (Code Examination)

Examine the following code snippet for handling Bluetooth disconnections. Identify potential issues and suggest improvements.

 

 

void disconnectBluetooth() async {

  if (_connection != null && _connection!.isConnected) {

    await _connection!.close();

    _connection = null;

    print('Disconnected from Bluetooth device');

  } else {

    print('No active Bluetooth connection to disconnect');

  }

}

Переглянути це питання

(Code Examination)

Evaluate the following Flutter code for capturing an image using the camera and displaying it in a preview. Identify issues and suggest improvements.

 

 

Future<void> captureImage() async {

  final image = await _cameraController.takePicture();

  setState(() {

    _capturedImage = Image.file(File(image.path));

  });

}

Переглянути це питання

Analyze the  code below. What will be printed to the console? Explain your answer.

 

 

void main() {

  int sum = 0;

  for (int i = 1; i <= 4; i++) {

    sum += i * 2;

  }

  print(sum);

}

Переглянути це питання

(Code Evaluation)

Examine the following code for integrating a Google Map and displaying a marker on a hardcoded location. Identify potential improvements and make the marker dynamic.

 

 

GoogleMap(

  initialCameraPosition: CameraPosition(

    target: LatLng(37.7749, -122.4194),

    zoom: 12,

  ),

  markers: {

    Marker(

      markerId: MarkerId('marker1'),

      position: LatLng(37.7749, -122.4194),

    ),

  },

);

Переглянути це питання

Write a  function that returns the greatest common divisor (GCD) of two numbers using a while loop.

 

 

Переглянути це питання

Хочете миттєвий доступ до всіх перевірених відповідей на e-learning.msa.edu.eg?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome