Tuesday, December 10, 2024

Mobile Software Programming Exams Questions and Answers

 

  1. What is mobile software programming?
    Mobile software programming involves developing applications for mobile devices like smartphones and tablets using frameworks, tools, and programming languages designed for mobile platforms.

  2. Differentiate between mobile app and mobile web app.

    • Mobile App: Installed on devices, developed using platform-specific tools.
    • Mobile Web App: Accessed through browsers, uses HTML, CSS, and JavaScript.
  3. List the advantages of mobile apps over websites.

    • Offline access
    • Faster performance
    • Better integration with device hardware
  4. What are the main types of mobile apps?

    • Native Apps
    • Web Apps
    • Hybrid Apps
  5. What is a native app? Provide an example.
    A native app is built for a specific platform (e.g., Android using Java/Kotlin or iOS using Swift). Example: WhatsApp.

  6. What is the importance of mobile app architecture?
    It ensures scalability, maintainability, and optimized performance of an app.

  7. What is the role of SDKs in mobile development?
    SDKs provide tools, libraries, and documentation for app development on a specific platform.

  8. Explain the term "responsive design" in mobile development.
    It refers to designing an app or website that adapts seamlessly to different screen sizes and resolutions.

  9. What is cross-platform development?
    It involves creating apps that run on multiple platforms using a single codebase (e.g., Flutter, React Native).

  10. What is an emulator?
    A virtual device that mimics the behavior of real mobile devices for testing apps.

  1. Name two popular tools for Android development.
  • Android Studio
  • Eclipse
  1. What is Flutter?
    A UI toolkit by Google for building natively compiled apps for mobile, web, and desktop from a single codebase.

  2. What is the significance of Android Studio?
    It provides an integrated environment with tools for app development, debugging, and testing.

  3. Differentiate between Flutter and React Native.

  • Flutter uses Dart and provides its own UI components.
  • React Native uses JavaScript and leverages native UI components.
  1. What is the Gradle build system in Android?
    Gradle automates building, testing, and packaging Android apps.

  2. What is Swift used for?
    Swift is Apple's programming language for iOS and macOS app development.

  3. Explain the term "Hot Reload" in Flutter.
    Hot Reload allows developers to see real-time changes in the code without restarting the app.

  4. What is Xcode?
    Apple's official IDE for developing iOS, macOS, and watchOS applications.

  5. How does Kotlin enhance Android development?
    Kotlin simplifies coding, reduces boilerplate code, and is fully interoperable with Java.

  6. What is PhoneGap/Cordova?
    Frameworks for developing cross-platform mobile apps using HTML, CSS, and JavaScript.

  1. Describe the Android activity lifecycle.
    Key states: onCreate, onStart, onResume, onPause, onStop, onDestroy.

  2. Why is the activity lifecycle important?
    It helps manage app resources and user interactions efficiently.

  3. What is the fragment lifecycle in Android?
    Similar to activities but includes additional callbacks like onAttach and onDetach.

  4. What are intents in Android?
    Intents are messaging objects used to communicate between components.

  5. Explain the iOS view controller lifecycle.
    Key methods: viewDidLoad, viewWillAppear, viewDidAppear, viewWillDisappear, viewDidDisappear.

  6. What is the role of background services in mobile apps?
    They allow apps to run tasks in the background, such as music playback or data synchronization.

  7. What is an app bundle?
    A package containing the compiled code and resources needed for app installation.

  8. What happens in the onPause() state in Android?
    The app is partially visible, and heavy processing tasks should be stopped.

  9. How do push notifications work?
    A cloud messaging service (like Firebase) delivers notifications from a server to a device.

  10. What are foreground and background apps?

  • Foreground: Actively in use and visible to the user.
  • Background: Running but not actively visible.
  1. What is asynchronous programming?
    A programming approach that allows tasks to run independently of the main thread, avoiding app freezes.

  2. How are RESTful APIs used in mobile apps?
    They allow apps to communicate with servers for data exchange using HTTP methods (GET, POST, etc.).

  3. What is JSON, and why is it important?
    JSON is a lightweight data-interchange format commonly used in RESTful APIs.

  4. Explain the term "multithreading."
    Multithreading enables concurrent execution of tasks, improving app performance.

  5. What is a Content Provider in Android?
    A component that manages shared app data (e.g., contacts).

  6. How do mobile apps access hardware features?
    Through platform APIs or libraries (e.g., camera, GPS, accelerometer).

  7. What is the significance of Firebase in mobile apps?
    Firebase provides services like real-time databases, authentication, analytics, and cloud messaging.

  8. How does geofencing work in mobile apps?
    It triggers actions when a device enters or exits a predefined geographic boundary.

  9. What is ProGuard in Android?
    A tool to shrink, optimize, and obfuscate app code for better security and performance.

  10. What is ARCore?
    Google’s platform for building augmented reality apps.

  1. Why is mobile app testing important?
    To ensure app reliability, usability, and performance across various devices.

  2. What are the types of mobile app testing?

  • Functional Testing
  • Performance Testing
  • Security Testing
  1. What is ADB (Android Debug Bridge)?
    A tool to communicate with an emulator or connected Android device for debugging.

  2. How is performance testing conducted for mobile apps?
    Using tools like Android Profiler, Xcode Instruments, or third-party platforms.

  3. What is crash analytics?
    The process of analyzing and fixing app crashes using tools like Firebase Crashlytics.

  4. What is App Store Optimization (ASO)?
    Techniques to improve app visibility and ranking on app stores.

  5. What are the steps for publishing an app on Google Play Store?

  • Create a developer account
  • Prepare an APK/AAB
  • Fill out app details
  • Upload and release
  1. How does beta testing work?
    The app is tested by a limited group of users before public release.

  2. What is continuous integration in mobile development?
    Automating code integration and testing to ensure stable builds.

  3. What are over-the-air (OTA) updates?
    Delivering app updates directly to user devices without requiring manual downloads.

  4. Write a CSS snippet to make a button responsive in a web app.

  5. button {

        padding: 10px 20px;

        font-size: 16px;

        width: 100%;

        max-width: 300px;

        margin: auto;

    }

  6. Implement onDestroy() in Android.
  7. override fun onDestroy() {
        super.onDestroy()
        // Cleanup resources
    }
  8. Write an override for onCreate in Android using Kotlin.
  9. override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
    }
  10. Implement a TextField widget in Flutter.
  11. TextField(
        decoration: InputDecoration(
            border: OutlineInputBorder(),
            labelText: 'Enter text',
        ),
    );
  12. Write a Swift code snippet to navigate between two ViewControllers.
  13. let vc = storyboard?.instantiateViewController(withIdentifier: "SecondVC") as! SecondVC
    self.navigationController?.pushViewController(vc, animated: true)
  14. How do you handle user input validation in Flutter?
  15. final _formKey = GlobalKey<FormState>();
    if (_formKey.currentState!.validate()) {
        print("Input is valid");
    }
  16. Write a CSS snippet to make a button responsive in a web app.
  17. button {
        padding: 10px 20px;
        font-size: 16px;
        width: 100%;
        max-width: 300px;
        margin: auto;
    }
  18. Design a Flutter app UI with a centered button.
  19. Center(
        child: ElevatedButton(
            onPressed: () {
                print("Button pressed");
            },
            child: Text("Click Me"),
        ),
    );
  20. Create a button click listener in Kotlin.
  21. val button = findViewById<Button>(R.id.button)
    button.setOnClickListener {
        Toast.makeText(this, "Button clicked!", Toast.LENGTH_SHORT).show()
    }
  22. Design a UI layout for a login screen with two EditTexts and a Button in XML.
  23. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">
        <EditText
            android:id="@+id/username"
            android:hint="Username"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
        <EditText
            android:id="@+id/password"
            android:hint="Password"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:inputType="textPassword" />
        <Button
            android:id="@+id/loginButton"
            android:text="Login"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    </LinearLayout>

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home