1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Helga [31]
2 years ago
13

Class CTRivers describes collection of CT rivers. It has no data, and it provides the following service methods. None of the met

hods prints anything, except method printListRec, which prints all rivers. // Prints all rivers recursively. Print them is same order as they were in the list . List can be empy or not. • void printListRec(River[] list, int n) // Returns index for the river object with given name. Returns -1 for unsuccessful search. List can // be empy or not. • int linearSearch(River[] list, int n, String name) // Returns ArrayList of rivers with length between min and max inclusive. Returns an empty // Arraylist if no such river was found. List can be empy or not. • ArrayList searchRange(River[] list, int n, int min, int max) // Sorts list of rivers by selection sort recursively (Compare river by their names.) List can be empy or not. • void sortByNameRec(River[] list, int n) // PRECONDITION: Method assumes that input list is sorted by names. First and last are indices of the first // and last character of the current substring. Returns index of River object with given name or returns -1 // if none of the rivers has that name. List can be empy or not. • int binarySearchRec(River[] list, int first, int last, String name) Three methods marked in yellow must be implemented recursively.
Computers and Technology
1 answer:
raketka [301]2 years ago
3 0

The answer & explanation for this question is given in the attachment below.

Download docx
You might be interested in
Write a program that takes an integer n as a parameter and sums all of the multiples of 2 or 5 from 1 to n. For example, if n =
Alex

Answer:

// here is code in c++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main() {

// variable

int num;

int tot_sum=0;

cout<<"enter a number: ";

// read the value of n

cin>>num;

// check the multiple of 2 or 5 from 1 to n

for(int x=1;x<=num;x++)

{

// if multiple of 2 or 5 then add them

   if(x%2==0 ||x%5==0)

   {

       tot_sum=tot_sum+x;

   }

}

// print the sum

cout<<"sum of multiple of 2 or 5 is:"<<tot_sum<<endl;

return 0;

}

Explanation:

Read the number "n" from user.Check every number from 1 to n, if it is a multiple of 2 or 5 then add them to "tot_sum".When the for loop end, "tot_sum" will have sum of all the number which are either multiple of 2 or 5.Print the sum.

Output:

enter a number:11

sum of multiple of 2 or 5 is:35

4 0
2 years ago
what is the correct process for setting up a recurring project for the same client in qbo accountant?
Anna [14]

Answer:

The answer is below

Explanation:

The correct process for setting up a recurring project for the same client in Quickbooks Online Accountant is as follows:

1. Go to Work, then select create a project

2. Select the Repeat button, then set the frequency and duration

3. Formulate the project and save it.

4. Reopen the project

5. And select the Duplicate button for the proportion of times you want it to recur. This includes assigning the interval, day of the recurrence, and end time.

6. Then select Save.

6 0
2 years ago
Define Class in C++. Briefly discuss.
lesya [120]

Answer:

Class are the collection of variable and member function.

Class are the blueprint of an object.

Explanation:

Following are the points regarding class in c++

1.In C++ class is an user defined datatype..

2.Classes are the collection of variable and function in c++.

3.To access the property of class we can create object of that class

4.We can use following syntax to declared any class in c++

class classname

{

accessmodifier:

//statement and function

};

main()

{

classname objectname;

}

implementation of class in c++

#include<iostream>

class test // class declaration

{

public: // access modifier

void fun3() // Method definition

{

cout<<" hello :";

}

};

void main() // main function

{

test ob;// creating object

ob.fun3(); // calling function

}

In this program we declared a class "test " in class test. We giving public access modifier .The public access modifier define that variable and function are accessible outside the class and in main method we create the object ob which call the function fun3().

Output:hello :

3 0
3 years ago
Explain how can you protect your computer from malware
rosijanka [135]
Trend micro security for your Mac or pc or trend micro mobil security for your android or iOS Mobil device?

Hope this helps!
6 0
3 years ago
Read 2 more answers
A recursive method without a special terminating case would _________. Hint: Self Check 13.3 had infinite number of isLucky() me
asambeis [7]

Answer:

You need exit condition like If, otherwise method will repeat endlessly.

7 0
3 years ago
Other questions:
  • Which of the following is not a job title associated with a career in visual and audio technology? master control operator produ
    9·1 answer
  • In 1-2 pages, identify a social networking technology and identify at least 10 security and/or privacy risks the technology has
    8·1 answer
  • The most accurate readings that you can take on an analog VOM are when the meter's pointer is at the A. center scale. B. extreme
    11·1 answer
  • You have just installed a new NIC in your PC to replace the old one that had started malfunctioning. What additional software mu
    15·1 answer
  • Which software application offers a variety of templates for creating reports, flyers, and newsletters that you can access withi
    12·1 answer
  • Why is it difficult to convince top management to commit funds to develop and implement a Strategic Information System
    13·1 answer
  • A swimming pool has a length of 28 feet, a width of 17 feet, and a depth of 6 feet. How much water can the swimming pool hold?
    10·1 answer
  • 25 Points Asap <br> Write a Java program named Light.java that displays a light bulb shown below:
    14·1 answer
  • The cost to ship a package is a flat fee of 75 cents plus 25 cents per pound. 1. Declare a const named CENTS_PER_POUND and initi
    12·1 answer
  • Which of the phases of the software development life cycle (SDLC) would the following action take place in?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!