Search This Blog

Wednesday, 16 August 2023

Frequently Asked Questions on Mobile Application Development

0 comments

 Important Questions for Mid Exams

    Set 1:

    What are the features of J2ME?

    J2ME technology provides tools to build an industrial-strength Java application designed to run on a small computing device with following features:
    • Quick response time
    • Compatibility with companion services
    • Full-featured applications that can run on  cell phones and Personal Digital Assistant with capabilities found on desktop and laptop computers 
    How does J2ME differ from other Editions of Java?

    The Java 2 Micro Edition (J2ME) contains the API used to create applications for small computing devices, including wireless Java applications.  J2ME implements a stripped-down J2SE because of the limited resources in small computing devices.

    The following are some of the features available in J2SE but not part of J2ME:
    1. Performing Floating Point Arithmetic
    2. Supporting finalize() method
    3. Handling Exceptions of All types

    Explain J2ME Configuration.

    J2ME must service many different kinds of small computing devices, including screen phones, digital set-top boxes used for cable television, cell phones, and Personal Digital Assistants. This issue has been resolved by introducing a two-fold approach of introducing configuration and profiles.

    Configuration defines the Java run-time environment and core classes that operate on each device.  It defines the Java Virtual Machine for a particular small computing device.  There are two different configurations for J2ME:

    • Connected Limited Device Configuration (CLDC) and 
    • Connected Device Configuration (CDC)
    Distinguish between CDC and CLDC.

    The CLDC is designed for 16-bit or 32-bit small computing devices with limited amounts of memory.  They have the following limitations in their configuration:
    • CLDC devices usually have memory in the range of 160 KB and 512 KB  and are battery powered. 
    • They also use an inconsistent, small- bandwidth network wireless connection and may not have a user interface.
    • CLDC devices use the KJava Virtual Machine (KVM) implementation, which is a
    • stripped-down version of the JVM. 
    • CLDC devices include pagers, personal digital assistants, cell phones, dedicated terminals, and handheld consumer devices with between 128KB and 512KB of memory.
    CDC devices have the following configuration:
    • They use a 32-bit architecture processor.
    • They have at least two megabytes (2 MB) of memory available, and implement a complete functional JVM
    • CDC devices include digital set-top boxes, home appliances, navigation systems, point-of-sale terminals, and smart phones.
    What are MIDlets?  Why do we need to group MIDlets into MIDlet Suite?
    • A MIDlet is a J2ME application designed to operate on an MIDP (CDLC) small computing device.
    • A MIDlet is defined with at least a single class that is derived from the javax .microedition.midlet.MIDlet abstract class.
    • Developers commonly bundle related MIDlets into a MIDlet suite, which is contained within the same package and implemented simultaneously on a small computing device.
    A key benefit of grouping MIDlet's into MIDlet suite is that they share the same data, including data in persistent storage such as user preferences.  Data cannot be shared between MIDlets that are not from the same MIDlet suite

    What are the objectives of MIDlet Programming?

    At the center of every MIDlet are the MIDP API classes used by the MIDlet to interact with the user and handle data management.   The following tasks can be performed during the life cycle of a MIDlet:

    • Display screens of data and prompt the user to respond with an appropriate command. 
    • The command object causes the MIDlet to execute one of three routines: perform a computation, make a network request, or display another screen.
    • Write and read persistent data
    • Store data in data types
    • Receive data from and send data to a network

    Briefly discuss the basic concepts of Wireless Technology.


    List down the minimum requirements of small computing devices for running a MIDlet.
    What is Screen Class?  How does it differ from Canvas class in developing a MIDlet.
    • The Screen class is a kind of Displayable Class.  This is the base class of higher-level UI classes such as Form, TextBox, List and Alert
    • The Screen class and its derived classes are referred to as high-level user interface components.  Sub classes of Screen classes can be used to display information on the screen or collect information from a user (through UI such as forms, check boxes, radio buttons). 
    • Canvas class is used for creating low-level UI in a MIDlet.  It can be used to display graphical images such as those used for games.

    Discuss some of the UI classes available in LCDUI package of MIDP for creating MIDlets.

    Refer this page

    What are the steps required to create an instance of an ImageItem Class?


    Set 2:
    1. Explain the evolution of J2ME.
    2. Briefly discuss the concept of Wireless Technology and Microwave Technology.
    3. Explain Radio Data Networks.
    4. Explain about the Personal Digital Assistance.
    5. In detail explain J2ME Architecture with a neat diagram.
    6. Explain some of the J2ME Best Practices.
    7. Explain the anatomy of a MIDlet suite.
    8. Write a MIDlet for selecting an option from a Choice Group object.
    9. Give a brief note on Animations.
    10. Write a MIDlet program for drawing a rectangle on a Canvas.

    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;

    public class DrawRectangle extends MIDlet {
     private Display display;
      protected void startApp() {
        Canvas canvas = new LineCanvas();
        display = Display.getDisplay(this);
        display.setCurrent(canvas);
      }
      protected void pauseApp() {
      }
      protected void destroyApp(boolean unconditional) {
      }
    };
    class LineCanvas extends Canvas {
      public void paint(Graphics g) {
        int width = getWidth();
        int height = getHeight();
        g.setColor(0);
        g.setStrokeStyle(Graphics.SOLID);

            g.drawRect(width/4, 0, width/2, height/4);

      }
    }
    Set 3:

    1. Define Profile in J2ME.  Name the profiles defined in J2ME for CLDC devices.
    2. Develop a MIDlet using List UI to display a list of Items in a List Box that can be selected by the user for input.
    3. What are the three layers of J2ME?  Explain them briefly.
    4. List down the software required for developing MAD.  Which language do you prefer for MAD?  Justify.
    5. Name the packages provided by J2ME for MIDlet programming. Identify the three methods that every MIDlet must implement for its execution.
    6. Briefly discuss the basics of Radio Data Networks.
    7. Write notes on Personal Digital Assistance.
    8. What are the three types of UI available for MIDlet programming.  Name the classes available for creating high-level UI.
    9. Develop a MIDlet for displaying a Help button by clicking which the user will be provided with some useful information in a TextBox on the screen.
    10. Explain the Command Class and CommandAction Listener. Illustrate event handling with an example.

    Leave a Reply