Explore BrainMass
Share

Explore BrainMass

    Java applet, converting character to integer(vice versa) - ASCII

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    I guess my biggest issue is actually to draw a functionable applet.

    Design an applet Conversion.java that converts a character to a corresponding integer, and vice versa. The integer corresponding to a character is its ASCII code.
    The design should look as the attached picture.

    The applet has to have the following functionality:

    * After entering a character into the left text field and pressing the "Enter" button, the ASCII code should appear in the right text field.
    * If the user enters not a single character, a warning not a character should appear in red color.
    * After entering an ASCII code in the range [33..126] into the right text field, the corresponding character should appear in the left text field.
    * If the user enters an integer outside the range [33..126], a warning number out of range should appear in red color.
    * If the user enters not an integer in the right text field, a warning not a number should appear in red color.
    * If the conversion is successful, a confirmation conversion completed should appear in white color.

    The applet size is 200x100 pixels.
    The the width of the input fields is 1 and 3 characters, respectively.

    Thank you

    © BrainMass Inc. brainmass.com October 9, 2019, 10:47 pm ad1c9bdddf
    https://brainmass.com/computer-science/java/java-applet-converting-character-integer-vice-versa-ascii-232307

    Attachments

    Solution Summary

    A Java applet for converting character to integers and vice versa is examined.

    $2.19