Complete the program below so that it prompts the user for two strings (or words) and then prints them out in alphab For example, Please enter two words: grade class Order: class grade LexiOrder.java

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Assignment 2
← → C
esc
CIS VitalSource Books...
Please enter two words: grade class
Order: class grade
LexiOrder.java
1
2
3
4
5
6
Complete the program below so that it prompts the user for two strings (or words) and then prints them out in alphabetical orde
For example,
10
11
12
13
14
15
16
7 */
8 public class Lexiorder
9 €
17
18
19
20
21
22
23
24
25
26
27 }
CodeCheck
CodeCheck
codecheck.io/files/wiley/codecheck-bjlo-1-branch-103
import java.util.Scanner;
/**
A program reads two integer values
and prints out the larger of the two.
If the values are equal, only one of the value is printed.
1
}
!
public
public
X
static void main(String[] args).
// Print prompt to enter two words (strings)
System.out.println("Please enter two words: ");
// Read in both integer values.
Scanner in
String word1
String word2= in.next();
*
F1
Q
// Determine the correct alphabetical order of words
// and print out the words in one line, in order.
// Your work here.
Reset
C
new Scanner(System.in);
in.next();
2
*
F2
W
#3
80
F3
E
4
CodeCheck
a
F4
R
%
5
k
FS
T
A
X
MacBook Air
6
F6
Homework
Y
&
7
A
F7
T
Transcribed Image Text:Assignment 2 ← → C esc CIS VitalSource Books... Please enter two words: grade class Order: class grade LexiOrder.java 1 2 3 4 5 6 Complete the program below so that it prompts the user for two strings (or words) and then prints them out in alphabetical orde For example, 10 11 12 13 14 15 16 7 */ 8 public class Lexiorder 9 € 17 18 19 20 21 22 23 24 25 26 27 } CodeCheck CodeCheck codecheck.io/files/wiley/codecheck-bjlo-1-branch-103 import java.util.Scanner; /** A program reads two integer values and prints out the larger of the two. If the values are equal, only one of the value is printed. 1 } ! public public X static void main(String[] args). // Print prompt to enter two words (strings) System.out.println("Please enter two words: "); // Read in both integer values. Scanner in String word1 String word2= in.next(); * F1 Q // Determine the correct alphabetical order of words // and print out the words in one line, in order. // Your work here. Reset C new Scanner(System.in); in.next(); 2 * F2 W #3 80 F3 E 4 CodeCheck a F4 R % 5 k FS T A X MacBook Air 6 F6 Homework Y & 7 A F7 T
Assignment 2
SC
CIS VitalSource Books...
Smallest.java
Complete the program below so that it prompts for and reads in three integer values, and then prints out the smallest of the three.
For example, one sample run of this program looks like the following:
Please enter three integer values: 66 22 34
Smallest: 22
1 import java.util.Scanner;
2
3
4
5
6
7 */
8 public class Smallest
90
10
11
12
13
14
15
16
17
18
19
20
222222
21
23
24
25
/**
26}
CodeCheck
CodeCheck
codecheck.io/files/wiley/codecheck-bjlo-1-branch-104
1
This program reads three integer values
and prints out the smallest of the three.
If the values are equal, print out only one of them.
public static void main(String[] args)
{
}
!
// Print prompt to enter three integer values
System.out.println("Please enter three integer values:");
// Read in the three integer values.
Scanner in
new Scanner(System.in);
int valuel= in.nextInt ();
int value2= in.nextInt ();
int value3= in.nextInt ();
// Determine and print out the smallest value
System.out.println(smallest);
Reset
F1
2
*
F2
W
#
3
80
F3
E
CodeCheck
$
4
9
F4
R
%
5
16
F5
T
X
A
MacBook Air
6
Homework-02
F6
Y
&
7
Transcribed Image Text:Assignment 2 SC CIS VitalSource Books... Smallest.java Complete the program below so that it prompts for and reads in three integer values, and then prints out the smallest of the three. For example, one sample run of this program looks like the following: Please enter three integer values: 66 22 34 Smallest: 22 1 import java.util.Scanner; 2 3 4 5 6 7 */ 8 public class Smallest 90 10 11 12 13 14 15 16 17 18 19 20 222222 21 23 24 25 /** 26} CodeCheck CodeCheck codecheck.io/files/wiley/codecheck-bjlo-1-branch-104 1 This program reads three integer values and prints out the smallest of the three. If the values are equal, print out only one of them. public static void main(String[] args) { } ! // Print prompt to enter three integer values System.out.println("Please enter three integer values:"); // Read in the three integer values. Scanner in new Scanner(System.in); int valuel= in.nextInt (); int value2= in.nextInt (); int value3= in.nextInt (); // Determine and print out the smallest value System.out.println(smallest); Reset F1 2 * F2 W # 3 80 F3 E CodeCheck $ 4 9 F4 R % 5 16 F5 T X A MacBook Air 6 Homework-02 F6 Y & 7
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY