subject

New Skills to be Applied In addition to what has been covered in previous assignments, the use of the following items, discussed in class, will probably be needed: Recursion One-dimensional arrays Program Description: Assignment #9 will be the construction of a program that reads in a sequence of integers from standard input until 0 is read, and stores them in an array (zero is the sentinel-it is not stored in the array). This is done using iteration (choose while or do-while loop). You may assume that there will not be more than 100 numbers. Then find the maximum number, find the largest even integer, sum of the numbers that are larger than the last number in the array, and count of numbers that are divisible by 3 using recursion. Thus, you will create four recursive methods findMax, largestEven, sumLargerThanLast and countDivisibleBy3 in Assignment9 class and they will be called by the main method. Specifically, the following recursive methods must be implemented (These methods should not contain any loop): public static int findMax(int[] numbers, int startIndex, int endIndex) public static int largestEven(int[] numbers, int startIndex, int endIndex) public static int sumLargerThanLast(int[] numbers, int startIndex, int endIndex, int lastElement) public static int countDivisibleBy3(int[] numbers, int startIndex, int endIndex)

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:00
Write a program that uses a widgetviewer object to do the following: generate two random integers between 1 and 9 (inclusive). name one of them x, the other y. display them to the user using jlabel objects. create a jlabel object displaying the text "enter an operation number." create a jtextfield for the user's input. create a jbutton displaying the text "press here when you've entered your operation." use addandwait to add it to the widgetviewer object. when the user clicks the jbutton, evaluate operation in the following order to determine the one and only mathematical operation to perform on x and y. use a jlabel to display the result. if operation is between 1 and 10 inclusive, add x and y. if operation is evenly divisible by 4, subtract y from x. if operation is evenly divisible by 5, use integer division to divide y into x. if operation is an even number, use floating point division to divide y into x. if none of the other tests on operation apply, multiply x and y. note: operation can be negative or zero.
Answers: 2
question
Computers and Technology, 23.06.2019 13:00
Donnie does not have powerpoint. which method would be best for elana to save and share her presentation as is? a pdf a doc an rtf a ppt
Answers: 3
question
Computers and Technology, 23.06.2019 15:00
1. which of the following statements are true about routers and routing on the internet. choose two answers. a. protocols ensure that a single path between two computers is established before sending packets over it. b. routers are hierarchical and the "root" router is responsible for communicating to sub-routers the best paths for them to route internet traffic. c. a packet traveling between two computers on the internet may be rerouted many times along the way or even lost or "dropped". d. routers act independently and route packets as they see fit.
Answers: 2
question
Computers and Technology, 24.06.2019 01:00
What are two ways to access the options for scaling and page orientation? click the home tab, then click alignment, or click the file tab. click the file tab, then click print, or click the page layout tab. click the page layout tab, or click the review tab. click the review tab, or click the home tab?
Answers: 2
You know the right answer?
New Skills to be Applied In addition to what has been covered in previous assignments, the use of th...
Questions
Questions on the website: 13722360