ruslffdr
07.05.2021 •
Mathematics
The volume of a wood box is 315 cubic inches. The length is 5 inches and the width is 7 inches. What is the height?
Solved
Show answers
More tips
- L Leisure and Entertainment Should You Buy a Ceramic Knife?...
- C Computers and Internet How to easily and quickly disable Firebug in Gmail and Google Docs...
- G Goods and services How to sew a ribbon: Tips for beginners...
- F Food and Cooking How to Make Mayonnaise at Home? Secrets of Homemade Mayonnaise...
- C Computers and Internet Which Phone is Best for Internet Surfing?...
- F Food and Cooking Everything You Need to Know About Pasta...
- C Computers and Internet How to Choose a Monitor?...
- H Horoscopes, Magic, Divination Where Did Tarot Cards Come From?...
- S Style and Beauty How to Make Your Lips Fuller? Ideas and Tips for Beautiful Lips...
Answers on questions: Mathematics
- M Mathematics Which of the following values are solutions to the inequality 6≥4x−5?...
- M Mathematics What is the solution to (x-2) (x+5)= 18...
- B Biology Prairie dogs are small mammals that live in large colonies in burrows in the ground. Prairie dogs that are near their own relatives when a predator approaches are much more...
- M Mathematics One weekday, the ticket sales person at a bus station asks every 10th ticket buyer if they had planned to use a laptop computer while traveling. of the 145 travelers questioned,...
- H Health Question 4 4 pts Which large blood vessel carries blood from the truck of the body to the right atrium...
- S Spanish Los valdivieso y los bolaños son dos ejemplos de familias en ecuador. los valdivieso son una familia...
- C Computers and Technology For the LEGv8 assembly instructions below, what is the corresponding C statement? Assume that the variables f, g, h, i, and j are assigned to registers X0, X1, X2, X3, and...
Ответ:
Here is the program fulfilling all the requirements given:
import javax.swing.JOptionPane;
public class SuperPower{
public static void main(String[] args) {
String power;
power = JOptionPane.showInputDialog("What is your super power?");
power = power.toUpperCase();
JOptionPane.showMessageDialog(null, power);} }
Explanation:
Does the file include a public class called "SuperPower"
See the statement:
public class SuperPower
Does the class include a public method called "main"? Is the "main" method static?
See the statement:
public static void main(String[] args)
Does the main method have a String assignment statement that uses "JOptionPane.showInputDialog"
See the statement:
power = JOptionPane.showInputDialog("What is your super power?");
Does the main method have a statement that uses "JOptionPane.showMessageDialog"?
See the statement:
JOptionPane.showMessageDialog(null, power);
Does the program convert the String from "JOptionPane.showInputDialog" using the "toUpperCase" method?
See the statement:
power = power.toUpperCase();
Does the submission include a screenshot that shows an Input dialog that asks, "What is your superpower?" Does the submission include a screenshot that shows a Message dialog stating " TO THE RESCUE!", where "" is the input converted to upper case?
See the attached screenshots
If the program does not let you enter an exclamation mark after "to the rescue" then you can alter the code as follows:
import javax.swing.JOptionPane;
public class SuperPower{
public static void main(String[] args) {
String power;
power = JOptionPane.showInputDialog("What is your super power?");
power = power.toUpperCase();
JOptionPane.showMessageDialog( null, power+"!");} } // here just add an exclamation mark which will add ! after the string stored in power