answer.
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
il63 [147K]
2 years ago
6

Write a method called makeStars. The method receives an int parameter that is guaranteed not to be negative. The method returns

a String whose length equals the parameter and contains no characters other than asterisks. Thus, makeStars(8) will return ******** (8 asterisks). The method must not use a loop of any kind (for, while, do-while) nor use any String methods other than concatenation. Instead, it gets the job done by examining its parameter, and if zero returns an empty string otherwise returns the concatenation of an asterisk with the string returned by an appropriately formulated recursive call to itself.
Computers and Technology
1 answer:
serious [3.7K]2 years ago
6 0

Answer:

// import the Scanner class

// to allow the program receive user input

import java.util.Scanner;

// The class Solution is defined

public class Solution{

   // main method to begin program execution

   public static void main(String[] args) {

       // scanner object scan is declared

       Scanner scan = new Scanner(System.in);

       // Prompt the user to enter a number

       System.out.println("Enter the number of stars you want: ");

       // user input is assigned to numOfStar

       int numOfStar = scan.nextInt();

       // call the makeStars method

       makeStars(numOfStar);

   }

   

   // makeStars method print stars using recursion

   // the method call itself till starNum == 0

   public static void makeStars(int starNum){

       if (starNum != 0){

           System.out.print("*");

           makeStars(starNum -1);

       }

   }

}

Explanation:

The code is well comment and solve the problem using recursion.

You might be interested in
The attack in which the attacker sends a forged packet with the same source IP address and destination IP address in which the v
Sergeeva-Olga [200]

Answer:

TEARDROP

Explanation:

Teardrop is a form of attack in which the attacker sends a forged packet with the same source IP address and destination IP address in which the victim may be tricked into sending messages to and from itself .

Teardrop attack also involves sending fragmented packets to a target machine in which the victim is been tricked into sending messages to and from itself. One of the fields in an IP header is the “fragment offset” field, indicating the starting position of the data contained in a fragmented packet relative to the data in the original packet.

7 0
2 years ago
___________ is an approach to boundary spanning that results from using sophisticated software to search through large amounts o
snow_tiger [21]

Answer: Business intelligence

Explanation:

Most of the enterprises and organizations collects huge amount of data through the use of MIS. These data can be based on any aspect of the business. But the collection of such large sets of data is useless until and unless there is a business intelligence associated with it. the work of business intelligence is to use software tools for analysis of the collected data so that it could be useful for enterprise or company to look for patterns and trends in the market.

The outcome of such business intelligence is very helpful particularly to managers, executives for taking particular decisions in the greater interest of the company.

So we can say, business intelligence is an approach to boundary spanning that results from using sophisticated software to search through large amounts of internal and external data to spot patterns, trends, and relationships that might be significant.

4 0
1 year ago
E-mail is an efficient means of disseminating information quickly and inexpensively. However, HIPAA regulations affect e-mail us
oksano4ka [1.4K]

Sending potentially sensitive information by email

Potentially sensitive information can be sent via Email only if the Email is encrypted

Explanation:

No doubt Email is an inexpensive efficient means of communicating quickly. But it is prone to hacking and it is not a secure mechanism. In order to add security ,the Email needs to be sent in an encrypted form. Banking and HIPAA regulations require the emails to be sent in encrypted form as it is a secure mechanism. Even if one has the consent from the client , the Email has to be in encrypted. Even if the Organization's e-mail system has appropriate firewalls and related infrastructure , the golden rule is to send encrypted format Emails.

7 0
2 years ago
Write a function called sum_scores. It should take four arguments, where each argument is the team's score for that quarter. It
saw5 [17]

Answer:

Here is the Python program which has a function sum_scores:

def sum_scores(score1, score2, score3, score4):

   sum = score1 + score2 + score3 + score4

   print(sum)    

sum_scores(14,7,3,0)

Explanation:

  • Method sum_scores takes four arguments, score1, score2, score3, score4.
  • The sum variable adds these four scores and stores the value of their addition.
  • Lastly print statement is used to print the value stored in sum variable which is the value obtained by adding the four scores.
  • Last statement calls the sum_scores method and passes four values to it which are 14,7,3,0
  • The output of the above program is:
  • 24
  • If you want to use return statement instead of print statement you can replace print(sum) with return sum. But in order to display the sum of the scores you can replace sum_scores(14,7,3,0) with print(sum_scores(14,7,3,0))
  • The program along with the output is attached as a screenshot.

5 0
2 years ago
Which statement best describes the Tell Me feature in PowerPoint 2016?
Triss [41]

Answer:

It is definitely not used for locating the options in the menu. its the new feature available which is available from the Tell Me text box which you can find immediately right of the very last cmd tab which is above the ribbon. And as you add any help topic to this into textbox, the excel shows all Excel command list , command which are related to the help topic in a drop down.

Explanation:

The answer is self explanatory.

8 0
1 year ago
Other questions:
  • What is a cursor?
    6·2 answers
  • Gaven's instructor told him to include a personal statement in his work portfolio. Why did his instructor recommend including a
    6·1 answer
  • The tuna marketers' task in the "tunathewonderfish.com" website and related campaign was to ________.
    15·1 answer
  • Which option describes wearable technology? A. the incorporation of technology into objects we use regularly B. rugged technolog
    8·1 answer
  • Which of the following is true with regard to defensive programming? Preconditions should never be visible to callers. Program c
    8·1 answer
  • A file concordance tracks the unique words in a file and their frequencies. Write a program that displays a concordance for a fi
    6·1 answer
  • If you are viewing a webpage with customized or regenerated content, such as updated stock quotes, what type of webpage are you
    5·1 answer
  • Two-dimensional array indexes are listed as
    8·1 answer
  • int) You are the head of a division of a big Silicon Valley company and have assigned one of your engineers, Jim, the job of dev
    8·1 answer
  • What is a key differentiator of Conversational AI? It implements Natural Language Understanding (NLU) and other human-like behav
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!