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
Eva8 [605]
3 years ago
10

Does this Java Program look correct? First, let me paste the question:Five friends are going to the theater. They have purchased

a row of five seats with an aisle on either end.James doesn't want to sit next to JillBetty and Herb are dating and want to sit next to each otherBob must sit on an aisleProvide a seating order that conforms to the above rules. An example of an invalid seating order is:James, Betty, Herb, Bob, JillThe above arrangement is invalid because: Bob is not sitting on an aisle.Specify the seating order as the names separated by commas (as in the above example). Please be sure to spell the names correctly, including capitalization.My Program:public class Seating{ public static void main (String [] args){ String James; String Jill; String Betty; String Herb; String Bob; system.output.println(Bob + "," + Jill + "," + Herb + "," + Betty + "," + James + "."; }}
Computers and Technology
1 answer:
atroni [7]3 years ago
4 0

Answer:

Your program is correct.

Explanation:

<u>You have this requeriments:</u>

  • James doesn't want to sit next to Jill.
  • Betty and Herb are dating and want to sit next to each other.
  • Bob must sit on an aisle.
  • Aisle on either end.

<u>Your answer:</u>

public class Seating{

public static void main (String [] args)

{ String James;

String Jill;

String Betty;

String Herb;

String Bob;

system.output.println(Bob + "," + Jill + "," + Herb + "," + Betty + "," + James + "."; } <em>//Bob is an aisle. James is not sit next to Jill. Betty and Herb are sit together.</em>

}

You might be interested in
Escribe, en los siguientes cuadros, los conceptos que correspondan
Fofino [41]

Answer:

Débito o debe                                                         Crédito o haber

Préstamo de la cooperativa                                          Efectivo

Gasto de arriendo                                              Cuentas por cobrar

Cuentas por pagar                                          Documentos por cobrar

Gasto de publicidad                                                Capital social

Hipoteca por pagar                                                       Ventas

Intereses pagados            Bancos (en el caso de cobros a través de bancos)

Bancos (en el caso que deba productos bancarios)

Explanation:

3 0
4 years ago
What is the definition of framerate?
ra1l [238]

Answer: The frequency at which frames in a television picture, film, or video sequence are displayed.

7 0
3 years ago
How many references should you have ready to list if an employer asks for them? a. 1-3
Leno4ka [110]
Best to have as many as possible. However usually 3
8 0
3 years ago
Cyberstalking is an example of a:
babunello [35]

Answer:

A cyber crime

Explanation:

Cyberstalking is a type of cybercrime that uses the internet and technology to harass or stalk a person. It can be considered an extension of cyberbullying and in-person stalking.

7 0
2 years ago
List at least 4 types of works covered by copyright law
Shtirlitz [24]

Answer:

musical works, dramatic works, literary works, sound recordings.

6 0
3 years ago
Other questions:
  • To get a sense of your digital footprint, you should:
    15·2 answers
  • You have a multi-domain Windows Server 2016 forest. You need to make a shared folder available to users from several domains. Wh
    6·1 answer
  • Write the definition of a class Telephone. The class has no constructors, one instance variable of type String called number, an
    9·1 answer
  • Where Can I Get Actual Microsoft AZ-900 Exam Questions?
    11·1 answer
  • Explain how a monitor can display the letters that you type on a keyboard. (Hint: Three Basic Computer Functions) *
    11·1 answer
  • As Assembly language code runs on a CPU invoking functions and using the stack, it is clear that CPU registers are
    8·1 answer
  • Technology that verifies a person's identity is _____. a smart card Automated Fingerprint Verification an EPD a digital ink pen
    13·2 answers
  • Is a list of instructions an arguments?<br> Yes or No
    6·2 answers
  • To reposition the legend to the left-hand side of a chart, click the _________ button, point to legend, click the right arrow ic
    7·1 answer
  • What type of attack uses many systems to flood the resources of a target, thus making the target unavailable?.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!