Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a program that will perform the output below Fourth Quarter Java Programs 1: String Concatenation 2: Common Array 3: If Else Random Number

imageimageimage

Create a program that will perform the output below Fourth Quarter Java Programs 1: String Concatenation 2: Common Array 3: If Else Random Number 4: Sorting Array 5: Quit Enter your choice: I. II. The program uses a switch statement to allow the user to choose a program: (2 pts) Choice 1. The program will concatenate two strings from the user input (5 pts) Fourth Quarter Java Programs 1: String Concatenation 2: Common Array 3: If Else Random Number 4: Sorting Array 5: Quit Enter your choice: 1 Enter First string: Black Enter Second string: Pink First String: Black Second String: Pink Concatenated string: BlackPink III. Choice 2. The program determines the common elements of the Arrays. (6 pts) (Note you must use Scanner to insert the first and second array elements. Array size must be three) Fourth Quarter Java Programs 1: String Concatenation 2: Common Array 3: If Else Random Number 4: Sorting Array 5: Quit Enter your choice: 2 Enter your first array elements: 5 3 2 Enter your second array elements: 2 First Array Elements [5, 3, 2] Second Array Elements: [2, 3, 1] The common arrays are: 32 IV. Choice 3. The program determines a number (Computer Generated) between 1 to 5. (8 pts) (NOTE 1: The user will attempt to guess the number three.) (NOTE 2: The program would exit if the user guessed the number correctly or exceeded the given tries.) Fourth Quarter Java Programs 1: String Concatenation 2: Common Array 3: If Else Random Number 4: Sorting Array 5: Quit Enter your choice: 3 I have a number between 1 to 5 Guess the number: 2 That's wrong. Tries 1 Guess the number: 1 That's wrong. Tries 2 Guess the number: 3 You guessed it! Program ended. V. Choice 4. The program sorts the array and determines the second-largest array. (6 pts) (Note you must use Scanner to insert the arrays. Array size must be Five) Fourth Quarter Java Programs 1: String Concatenation 2: Common Array 3: If Else Random Number 4: Sorting Array 5: Quit Enter your choice: 4 Enter your array elements: 1 5 2 4 6 The Original Numbers [1, 5, 2, 4, 6] The Sorted Numbers [1, 2, 4, 5, 6] : Second Largest Number is 5 VI. Choice 6. The program will end. (2pts) Fourth Quarter Java Programs 1: String Concatenation 2: Common Array 3: If Else Random Number 4: Sorting Array 5: Quit Enter your choice: 5 Program Terminated VII. Invalid Input. Displays an Invalid Choice message. (2pts) Fourth Quarter Java Programs 1: String Concatenation 2: Common Array 3: If Else Random Number 4: Sorting Array 5: Quit Enter your choice: 9 Invalid choice! The option is only 1 to 5!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions