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
ipn
3 months ago
13

Three business partners are forming a company whose name will be of the form "name1, name2 and name3". however, they can't agree

whose name should be first, second or last. help them out by writing code that reads in their three names and prints each possible combination exactly once, on a line by itself (that is, each possible combination is terminated with a newline character). assume that name1, name2 and name3 have already been declared and use them in your code. assume also that stdin is a variable that references a scanner object associated with standard input. for example, if your code read in "larry", "curly" and "moe" it would print out "larry, curly and moe", "curly, larry and moe", etc., each on a separate line. submit
Computers and Technology
1 answer:
zubka84 [1K]3 months ago
5 0

ANSWER: You must use 3 print line commands here. Thus, the optimal code looks like this:

import java.util.Scanner;

public class business {

public static void main(String args[]){

Scanner stdin = new Scanner(System.in);

String Larry = stdin.nextLine();

String Curly = stdin.nextLine();

String Moe = stdin.nextLine();

System.out.println(Larry + "\t" + Curly + "\t" + Moe);

System.out.println(Larry + "\t" + Moe + "\t" + Curly);

System.out.println(Curly + "\t" + Larry + "\t" + Moe);

System.out.println(Curly + "\t" + Moe + "\t" + Larry);

System.out.println(Moe + "\t" + Larry + "\t" + Curly);

System.out.println(Moe + "\t" + Curly + "\t" + Larry);

}

}

You might be interested in
The Coins class was created to hold all your loose change, kind of like a piggy bank! For this exercise, you are going to simula
Amiraneli [1052]

Answer:

Coins c1 = new Coins (4, 3, 2, 1);

c1.bankValue();

c1.addQuarter();

c1.addQuarter();

c1.addDime();

c1.addDime();

c1.addPenny();

c1.bankCount();

c1.bankValue();

Explanation:

8 0
1 month ago
You are given a string of n characters s[1 : : : n], which you believe to be a corrupted text document in which all punctuation
ivann1987 [1066]

Response: explained in the explanation section

Explanation:

Given that:

Assume D(k) =║ true if [1::: k] is a valid sequence of words, or false otherwise

  • In determining D(n)

the sub problem s[1::: k] is a valid sequence of words IFF s[1::: 1] is valid and s[ 1 + 1::: k] is a valid word.

Thus, we derive that D(k) is defined by the following recurrence relation:

D(k) = ║ false max(d[l] ∧ DICT(s[1 + 1::: k]) otherwise

Algorithm:

Valid sentence (s,k)

D [1::: k]             ∦ array of boolean variables.

for a ← 1 to m

do;

d(0) ← false

for b ← 0 to a - j

for b ← 0 to a - j

do;

if D[b] ∧ DICT s([b + 1::: a])

d (a) ← True

(b). Algorithm Output

      if D[k] == True

stack = temp stack            ∦stack assists in displaying the strings in order

c = k

while C > 0

stack push (s [w(c)]::: C] // w(p) denotes the index in s[1::: k] of the valid word // at position c

P = W (p) - 1

output stack

= 0 =

cheers, I hope this aids you!!!

8 0
2 months ago
A data analyst is using the Color tool in Tableau to apply a color scheme to a data visualization. They want the visualization t
Harlamova29_29 [1022]

Answer:

Color contrast refers to the disparity in brightness between text (or any foreground item) and the background it is set against.

Explanation:

In the realm of web accessibility, the extent to which one color contrasts with another dictates whether the information can be easily read by most individuals.

Contrast creates visual differences and helps elements stand out.

6 0
2 months ago
Other questions:
  • Which of these is an example of the integrity principle that can ensure your data is accurate and untampered with?
    10·2 answers
  • In the middle of the iteration, how should a team handle requirement changes from the customer? (1 correct answer)
    7·2 answers
  • for question 1-3, consider the following code what is output if the user types in 9? click all that apply A, B, C, D click all t
    13·1 answer
  • The following code is intended to test if x is NOT less than 17. Fill in the correct symbol:
    14·2 answers
  • A wireless network does not benefit like a wired network does, when it comes to collision reduction. Which device reduces collis
    6·1 answer
  • Asia pacific and Japanese sales team from cloud kicks have requested separate report folders for each region.The VP of sales nee
    14·1 answer
  • What statement best describes Konrad Zuse?
    6·2 answers
  • 5) [4 points] Suppose you have a simple computer that is capable of storing only the months of the year. The number of bits avai
    12·1 answer
  • A feedback mechanism that can be used to measure the effectiveness of a CSIRT is the ____. a. after action review b. IR plan tes
    8·1 answer
  • Which of the following corresponds to the computer interface technology that uses icon, etc?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!