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
WARRIOR [948]
3 years ago
8

Write the definition of a method dashedLine, with one parameter, an int. If the parameter is negative or zero, the method does n

othing. Otherwise it prints a complete line terminated by a newline to standard output consisting of dashes (hyphens) with the parameter's value determining the number of dashes. The method returns nothing.
Computers and Technology
1 answer:
ZanzabumX [31]3 years ago
5 0

Answer:

import java.util.Scanner;

public class DashLine {

public static void main(String[] args) {

// Declaring variables

int n;

/*

* Creating an Scanner class object which is used to get the inputs

* entered by the user

*/

Scanner sc = new Scanner(System.in);

// Getting the input entered by the user

System.out.print("Enter a number :");

n = sc.nextInt();

// calling the method by passing the user entered input as argument

dashedLine(n);

}

//This method will print the dashed line for number greater than zer

private static void dashedLine(int n) {

if (n > 0) {

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

System.out.print("-");

}

System.out.println();

}

}

}

Explanation:

You might be interested in
To copy cell contents, you can select the cell and then press the ____ keys.
LenaWriter [7]
To copy cell contents, you can select the cell and then press the CTRL + C keys. 
They act as a sort of a shortcut, so you don't have to select, right click and then choose copy. 
8 0
4 years ago
Al and Bill are arguing about the performance of their sorting algorithms. Al claims that his O(N log N)-time algorithm is alway
lisabon 2012 [21]

Answer:

See in Explanation

Explanation:

All you know is that an O(n log n) algorithm is eventually (a lot) faster than an O(n^{2} ) algorithm, but for any specific value of n, you can't say anything. Indeed, the asymptotic growth of the function doesn't depend on its value on n. This means that if  f(n)=O(n^{2} ) then for all c_{1} ,....\ , c_{99}, the following function is also O(n^{2} ):

f^{'} (n)=[\ cnf(n)\  if \ n

So asymptotic notation is completely uninformative regarding the performance of algorithms on specific values of n.

You could say that functions such as f^{'}(n) are artificial and never really occur in practice. This is not quite true (you can hard-code some auxiliary information for small n, for example), but even if you consider "natural" functions, asymptotic notation doesn't help you to determine anything other than asymptotic's: consider for example n^{2} against 10^{100}n\  log \ n (such examples definitely happen in practice, for example in fast matrix multiplication).

7 0
4 years ago
HELP ASAP 90 Points
bogdanovich [222]

Answer:

Macros automate common tasks. A macro can be created for virtually any task that you perform in Word. The amount of steps is irrelevant. You can even create a macro that automatically places certain text in a document with as many attributes as you’d like!

Macros are created with a recording device similar to a common tape recorder. Once you start recording your macro, a toolbar pops up with standard stop and pause buttons. The following is an example of how to create a macro for your customized letterhead paper.

Creating The Letterhead Macro

Open a blank document. You want to assign your macro to all documents.

From the View Tab, choose Macros and Record Macro. The Record Macro dialog box is displayed as shown below.

Type a name for your macro, such as Letterhead. (Spaces are not allowed; use an underscore to indicate spacing).

Explanation:

4 0
3 years ago
Help meeeeeeeeeeeeeee please​
bija089 [108]

Answer:

Explanation:My explanation is above my comment :)

3 0
4 years ago
Even though the Certified Information Systems Security Professional (CISSP) certification is not geared toward the technical IT
nirvana33 [79]

Answer:

True

Explanation:

Even though the Certified Information Systems Security Professional (CISSP) certification is not geared toward the technical IT professional, it has become one of the standards for many security professionals is a true statement.

7 0
3 years ago
Other questions:
  • What acts as a platform on which application software runs?
    8·1 answer
  • Think back over the information presented in the lesson about how you can skillfully use the Internet when doing research. Selec
    14·1 answer
  • Which of the following apply to the definition of Wide Area Networks? Check all of the boxes that apply.
    7·2 answers
  • what is the ability to carry out financial transactions using mobile devices such as tablets and phones?
    5·1 answer
  • What happens if the user sysadmin invokes the mail command interface and there are no unread mail messages?
    13·1 answer
  • What are 2 main differences betweenarrays andstructs?
    7·1 answer
  • If you created a variable called name, what data type would that value be?
    15·2 answers
  • Pls answer i will give 20 points
    7·1 answer
  • Why would a programmer use the logical operator or in an if statement? (5 points)
    14·1 answer
  • An outpatient provides the following id: barbara jones, birth date 8/15/63. should a specimen be collected for this lab order?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!