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
melomori [17]
3 years 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:
V125BC [204]3 years ago
5 0

ANSWER: Here 3 print line statements are needed. So, the best code would be

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
What does SFA software provides tools for
solong [7]
They provide tools for sfa spftware
5 0
3 years ago
Read 2 more answers
What is the correct sequence of processing instructions in a machine cycle?
Aleks04 [339]

Answer:

The four-step process of fetch, decode, execute, and store. Type of memory where the contents of this are not erased when the computer is turned off.

7 0
3 years ago
Define a class named Doctor whose objects are records for a clinic’s doctors. Derive this class from the class Person given in L
pashok25 [27]

Answer:

Following is defined the required class having accessor methods and test program:

Explanation:

class Person

{

private String doc_name;

public Person(String doc_name)

{

this.doc_name = doc_name;

}

public String getDoc_Name()

{

return doc_name;

}

}

class Doctor extends Person

{

private double office_visit_fee;

private String Specialty;

public Doctor(String doc_name,double office_visit_fee,String Specialty)

{

super(doc_name);

this.office_visit_fee = office_visit_fee;

this.Specialty = Specialty;

}

//accessor methods

public double getOffice_Visit_Fee()

{

return office_visit_fee;

}

public String getSpecialty()

{

return Specialty;

}

public String toString()

{

return "Doctor Name "+getDoc_Name()+" Office Visit Fee :$"+office_visit_fee+

" Specialty : "+Specialty;

}

}

class Test

{

public static void main (String[] args)

{

 Doctor dctr = new Doctor("Joseph Lister",134.56,"Obstetrician");

 System.out.println(dctr);

}

}

Output:

Doctor Name Joseph Lister Office Visit Fee :$134.56 Speciality : Obstetrician

6 0
3 years ago
assume that you want to sort an array have 100000 elements which algorithm (insert sort algorithm or quick sort algorithm) is th
Rama09 [41]

Answer:

Quick Sort.

Explanation:

Quick Sort will be best suited for an array having 100000 elements instead of the insertion sort algorithm because as we know the average time complexity of quick sort is O(NlogN) and for insertion sort is O(n^2).The sorting totally depends upon the pivot that is being selected in quick sort.

While insertion sort is best suited for arrays that are already sorted it takes O(n) time in those cases.

Since the array that we have is very large and so we need an algorithm that can sort the array faster than the other sorting algorithms.Quick  Sort is also inplace and does not requires extra space to do the sorting.

4 0
3 years ago
List five application programs you recommend, and write a sentence explaining why.
MArishka [77]

Answer:

hi!

refer attachment

hope it helps!!?

5 0
3 years ago
Other questions:
  • What feature is required to send data from a web-connected device (like a point-of-sale system) to Google Analytics?
    14·1 answer
  • Two words are a ""reverse pair"" if each is the reverse of the other. Write a program that finds all the reverse pairs in the wo
    12·1 answer
  • Write a program that will ask the user to input a phrase (multiple word sentence), and an integer value. A static function will
    14·1 answer
  • What are the best app development companies in Dubai?
    8·1 answer
  • When considering changing the content of a cell which button should you press to leave the cell as it originally was?
    13·2 answers
  • MIPS assembly language
    10·1 answer
  • 3.4 lesson practice
    12·2 answers
  • The space between the margin<br> and start<br> of paragraph is called
    8·1 answer
  • PLEASE HELP
    15·1 answer
  • It's so eazy
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!