For this code you must use the 'ready to program' ide in java, and do not use
Fantastic news! We've Found the answer you've been seeking!
Question:
For this code you must use the 'ready to program' ide in java, and do not use scanner class.
Ready to program ide: https://ready-to-program-with-java.software.informer.com/1.7/
I
Transcribed Image Text:
Write a program that fills an array of 10 elements with random integers between 1 and 50 (each number should only be represented once). Output the arrays in a meaningful way (i.e., identify each element #, horizontally). (a) Create a second array of the same size. Copy the elements of the first array into the second array, but in reverse order (i.e., element #10 from the 2nd array should match element#1 from the 1st array). Output both arrays. For example, suppose you have an array with {6, 2, 9, 4, 7). The reverse array is{ 7, 4,9, 2, 6}. (b) Create a sorted method to sort the array in ascending order. Output both arrays (original and sorted) with proper message. (c) Write and test a method that will rotate (or shift) an array by N spaces. A positive number will shift the array down. Values that go off the end of the array will "wrap" back to the beginning. The user should be able to enter positive or negative values, and the program should output the array before and after the shift. For example, suppose you have an array with {1, 2, 3, 4, 5). A rotation of +1 would give {5, 1, 2, 3,4} and +2 would give {4, 5, 1, 2, 3}. No bulletproof Save program as Array_yourName Write a program that fills an array of 10 elements with random integers between 1 and 50 (each number should only be represented once). Output the arrays in a meaningful way (i.e., identify each element #, horizontally). (a) Create a second array of the same size. Copy the elements of the first array into the second array, but in reverse order (i.e., element #10 from the 2nd array should match element#1 from the 1st array). Output both arrays. For example, suppose you have an array with {6, 2, 9, 4, 7). The reverse array is{ 7, 4,9, 2, 6}. (b) Create a sorted method to sort the array in ascending order. Output both arrays (original and sorted) with proper message. (c) Write and test a method that will rotate (or shift) an array by N spaces. A positive number will shift the array down. Values that go off the end of the array will "wrap" back to the beginning. The user should be able to enter positive or negative values, and the program should output the array before and after the shift. For example, suppose you have an array with {1, 2, 3, 4, 5). A rotation of +1 would give {5, 1, 2, 3,4} and +2 would give {4, 5, 1, 2, 3}. No bulletproof Save program as Array_yourName
Expert Answer:
Answer rating: 100% (QA)
Heres a simple Java program that fulfills the requirements you provided Save the program as ArrayYourNamejava and replace YourName with your actual na... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
answer the question clearly You are building a flight-control system for which a convincing safety case must be made. Would you assign the tasks of safety requirements engineering, test case...
-
Explain why some conditions on the market are regarded as anomalies and explain how that affects factor investing.
-
Consider Wal-Mart, the world's largest retailer. Classify the following items as an Asset (A), a Liability (L), or an Owners' Equity (E) for Wal-Mart (pp. 10-11): ___ a. Accounts payable ___ b....
-
explain the impact of environmental change, such as climate change and habitat fragmentation, on species distribution, speciation rates, and extinction risks, and how these changes might drive shifts...
-
For a given data set containing 26 points, the assumptions of the linear model are satisfied. The following values are computed: b1 = 46.8 and sb = 15.2. Perform a test of the hypothesis H0 : 1 = 0...
-
The Metro Central Railroad is a commuter railroad that stops at the Village of Katonah. Katonah, a growing community, decides to construct and operate a parking lot near the railroad station to...
-
The Accounting Equation Determine the missing amount in each of the following cases: Stockholders' Assets Liabilities Equity $600,000 $ 0 $340,000 160,000 64,000 0 0 80,000 98,000
-
The periodicity assumption assumes that: a. a transaction can only affect one period of time. b. estimates should not be made if a transaction affects more than one time period. c. adjustments to the...
-
OS evolves to support different types of computing such as multiprogramming, multitasking and multiprocessing. a) Briefly explain what these three types of computing are. b) Discuss their individual...
-
You are given the following information on an investment property. Units Rent per Unit Vacancy Allowance Expenses Cap Rate 33 $1,284 5% 20.9% of net rental income 7.56% Using the NOI and the cap...
-
Analyze Race and Respect (In Rethinking text). (Literature Circles - Choose a role that you'll take on, e.g., incident detective, or summarizer, etc.) Reread Literature Circles Assignment above....
-
A manufacturer of car parts is struggling financially. Their managers get bonuses based on how well their net income meets the budget. In early 2018, there was a management switch. The new manager...
-
A new waste truck is needed for a portion of the city. Compare the asset with the Benefit-Cost method? The interest rate is 10% Present value = $55,000 Annual cost = $11,500 Annual savings = $28,500...
-
What is the error in readFile()? public void readFile(){ FileInputStream fbStream = null; Scanner inFS = null; int value = 0; fbStream= new FileInputStream("data.txt"); InFS-new Scanner(fbStream);...
-
Illini Company, Inc. Balance Sheet as of 12/31/20X0 Assets Current Assets: Cash $1,500,000 Accounts receivable, net 18,000 Inventory 50,000 Total current assets 1,568,000 Equipment 90,000 Goodwill...
-
List the important concepts that you learned from this chapter. What concepts are you not clear about? 1. Explain the strategy to evaluate reactor design equations and how this chapter expands on...
-
a. List additional QTAs that could have been taken in addition to the ones listed for each CTA in the table. b. Apply the seven types of actions of CTA to Example 13-2 and write an action that should...
-
1. Reactant A has been unsuccessful in courting/dating reactant B because of a completing reaction. The matchmaker advises that the only way a will succeed is to raise the temperature. Is this a...
-
The W250 \(\times 28\) A-36 steel column is fixed at its base. Its top is constrained to rotate about the \(y-y\) axis and free to move along the \(y-y\) axis. Determine the force \(\mathbf{P}\) and...
-
The W250 28 A-36 steel column is fixed at its base. Its top is constrained to rotate about the \(y-y\) axis and free to move along the \(y-y\) axis. If \(e=350 \mathrm{~mm}\), determine the allowable...
-
The W14 \(\times 53\) column is fixed at its base and free at its top. Determine the maximum eccentric load \(P\) that it can support without causing it to buckle or yield. Take \(E_{\mathrm{st}}=\)...
Study smarter with the SolutionInn App