Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help finishing upthis code. I have to write a GUI program to conver allle

ID: 3613572 • Letter: I

Question

I need help finishing upthis code. I have to write a GUI program to conver allletters in a string uppercase letters, also using a dialog box forInput/Output. I have to allow the user to enter any stringthat they want. Any help would be greatly appreciated.


class Uppercase {
public static void main(String[] args)
{
    String s = "Alb34ert",
         String s2 =s.toUpperCase(); //Display String.
        System.out.println(s2)
    }
} I need help finishing upthis code. I have to write a GUI program to conver allletters in a string uppercase letters, also using a dialog box forInput/Output. I have to allow the user to enter any stringthat they want. Any help would be greatly appreciated.


class Uppercase {
public static void main(String[] args)
{
    String s = "Alb34ert",
         String s2 =s.toUpperCase(); //Display String.
        System.out.println(s2)
    }
}

Explanation / Answer

import java.io.*;

import java.util.*;

import java.awt.*;

import javax.swing.*;

publicclass cramster1

{

publicstatic voidmain(String[] a)throws IOException{

String input = "";

String output ="";

String temp;

input =JOptionPane.showInputDialog("enter astring");

temp =input.toUpperCase();

JOptionPane.showMessageDialog(null, temp);

}

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote