Sort the array into descending sequence

Assignment Help Basic Computer Science
Reference no: EM13307405

1.      Create an array of 25 positions in main.

2.      Fill it with random numbers from 1 to 25, inclusive.

3.      Call a recursive print method to print the array - be sure to print the position number and each of the values in the array (i and array[i]).

4.      Call a recursive sum method to total all the elements in the array and return the sum to main. Print the sum from main.

5.      Sort the array into descending sequence.

6.      Call the recursive print method again.

7.      Call a recursive binary search method to search for a value in the array. Return the location of the value found to the main method and print the location where the target item was found in main.

8.      Call the recursive binary search method to search for a value not in the array. Return a -1 from the method so main can print that the value was not found.

9.      Call an iterative sum method to sum the values in the array. Print this total and use it to desk check the total developed by the recursive sum method.

Reference no: EM13307405

Questions Cloud

Create another function that also accepts the array : Create another function that also accepts the array as its parameter. This functions prints all the elements in the array. Call this function from the main after the previous function call.
Find the atomic mass number of the unknown nucleus : An unknown nucleus has twice the volume of a nucleus with 83 nucleons. What is the atomic mass number of the unknown nucleus
What are rotational velocity in rpm and linear velocities : One form of which consists of three equal weights joined by equal length ropes. The gaucho holds on to one weight spinning the bolas overhead. When the bolas is cast the weights cause the configuration to change
What is the actual kinetic energy of the electron : An electron in a television picture tube has a classical kinetic energy of 60 keV, which is the kinetic energy that Newton would calculate using the measured speed, What is the actual kinetic energy of the electron
Sort the array into descending sequence : Call an iterative sum method to sum the values in the array. Print this total and use it to desk check the total developed by the recursive sum method.
How much time is required to double speed of rear sprocket : The drawing shows the front and rear sprockets of a bicycle. Assume the chain does not slip or stretch. How much time is required to double the speed of the rear sprocket
Compute the position and magnification of the final image : An object is placed 19 cm to the left of a converging lens of focal length 25 cm, Find the position and magnification of the final image
Get a hole in one on the sixth hole discuss : A) Determine the probability that at least 4 of the 155 golfers would get a hole in one on the sixth hole. Discuss
Determine the power required to keep the object in motion : An object weighing 100N is traveling vertically upward from the ground in the absence of air resistance at a constant velocity of 5m/s

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Creating cut-over plan for alternate processing site

Create cut-over plan for alternate processing site based on given below. Consider LAN for small 100-person business, Pixel Inc. Business occupies one floor in an office building.

  Create a script that presents a movie guessing game

Use a single script file named Week5.php to display and process the form Can this be done with the movies 8 mile and black swan.

  Use collaboration technologies

Summarize the main reason(s) that prompted Isuzu Australia Limited (IAL) to use collaboration technologies.

  Executing intrusion detection system

Your company is trying to decide whether to execute intrusion detection system (IDS), or intrusion prevention system (IPS).

  Probability and statistics for computer science

Probability and Statistics for Computer Science  - What is the probability that V will get the project and if V gets the project, what is the probability that W did not bid

  Write bash shell script filestatic to examine number files

Write bash shell script filestatic. Script should examine the number files in directories given as arguments (parameters) to this script.

  Compute hash for nifty hash function

Bob allots the numeric value VChar to each letter in alphabet equal to letter's position in alphabet, i.e., VA = 1, VB = 2, ..., VZ = 26. For the message, he computes the hash.

  Write down the body of method for header

Write down the body of method for the following header. Method must return the welcome message which includes the user's name and visitor number.

  Calculate the average for each student and for each exam

The original program is supposed to ask the user to enter 3 grades for 5 students, and then calculate the average for each student and for each exam.

  Expalining independent of choice of a dbms

Which of the following is independent of the choice of a DBMS?

  Explaining visible and consistent management support

Illustrate visible and consistent management support. Establish privacy responsibilities. Privacy needs need to be incorporated into any position which handles personally identifiable information (PII).

  Write a java statement to display the string

Write a Java statement to display the string "The value is 100" to a user in a plain dialog box.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd