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
Katarina [22]
3 years ago
9

Fill in this function that takes three parameters, two Strings and an int. 4- // Write some test function calls here! The String

s are the message that should be printed. You should alternate printMessage("Hi", "Karel", 5); between the Strings after each line. The int represents the total number of lines that should be printed. public void printMessage(String lineOne, String lineTwo, in For example, if you were to call 19.
printMessage("Hi", "Karel", 5);
// Start here! 12 the function should produce the following output:
Hi
Karel
Hi
Kare
Computers and Technology
1 answer:
zimovet [89]3 years ago
8 0

Answer:

The function in Java is as follows:

public static void printMessage(String lineOne, String lineTwo, int lines){

       for(int i = 1;i<=lines;i++){

           if(i%2 == 1){

               System.out.println(lineOne);

           }

           else{

               System.out.println(lineTwo);

           }

       }

   }

Explanation:

This defines the function

public static void printMessage(String lineOne, String lineTwo, int lines){

This iterates through the number of lines

       for(int i = 1;i<=lines;i++){

String lineOne is printed on odd lines i.e. 1,3,5....

      if(i%2 == 1){

               System.out.println(lineOne);

           }

String lineTwo is printed on even lines i.e. 2,4,6....

           else{

               System.out.println(lineTwo);

           }

       }

   }

To call the function from main, use:

printMessage("Hi", "Karel", 5);

You might be interested in
The system should enable the staff of each academic department to examine the courses offered by their department, add and remov
Ganezh [65]

Answer:

See attached picture.

Explanation:

See attached picture.

3 0
3 years ago
HELP ASAP WILL GIVE BRAINLY Question 19 Multiple Choice Worth 5 points) (05 03 MC) Network technologies specialist Hannah has be
nasty-shy [4]

Network technologies specialist Hannah would need to configure: C. RIP version 2 using Internet Protocol Version 4 (TCP/IPv4).

<h3>What is RIP?</h3>

RIP is an acronym for Routing Information Protocol and it can be defined as an intradomain routing protocol which is typically designed and developed based on distance vector routing.

<h3>The types of RIP.</h3>

In Computer networking, there are two main types of Routing Information Protocol (RIP) and these include:

  • RIP version 1.
  • RIP version 2.

RIP version 2 are generally designed and developed to include subnet masks unlike RIP version 1. Thus, Hannah would need to configure RIP version 2 using Internet Protocol Version 4 (TCP/IPv4) allow several machines on different subnets to communicate with each other using broadcasts.

Read more on routing protocol here: brainly.com/question/24812743

4 0
3 years ago
Two electronics technicians are looking at the piece of testing equipment shown in the figure above. Technician A says that this
finlep [7]
Correct answer is B. had this question in the past
5 0
3 years ago
Which business application uses electronic tags and labels to identify objects wirelessly over short distances?
Varvara68 [4.7K]

Answer:

Option A (Radio Frequency Identification)

Explanation:

Option A (Radio Frequency Identification)

Radio Frequency Identification:

This technology uses radio waves to transfer data between a reader and movable items. The benefit of this technology is we do not require physical contact with items and scanner.

Components of RFID:

  • tags (computer chip)
  • Reader
  • Communication System
  • RFID software

There are two RFID standards:

  • Electronic Product Code (EPC) standard
  • International Standard Organization (ISO)
4 0
3 years ago
What year does futurist ray kurzweil believe ai will meet human intelligence?.
Paladinen [302]

Answer:

2029

Explanation:

Kurzweil claims that a machine will pass the Turing test by 2029.

3 0
3 years ago
Read 2 more answers
Other questions:
  • Assume that to_the_power_of is a function that expects two integer parameters and returns the value of the first parameter raise
    13·1 answer
  • A software programâs _________ indicates what can legally be done with that program.]
    5·1 answer
  • A computer that no longer works after having minor repair work done to it may have been damaged by ____
    13·2 answers
  • What hernia repair codes can be reported with add-on code 49568?
    6·1 answer
  • Which remote assistance option requires peer name resolution protocol (pnr) and ipv6?
    5·1 answer
  • A user on a home network needs to boost the signal of the wireless router. What should the user purchase to accomplish this?
    14·1 answer
  • The larger the Word Size of a computer
    6·1 answer
  • Which of these best represents a call to action?
    7·2 answers
  • Which daemon manages the physical memory by moving process from physical memory to swap space when more physical memory is neede
    14·1 answer
  • Low-level formatting ____. Group of answer choices is different from physical formatting is usually performed by the purchaser o
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!