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
You want to create a hyperlink to a secure resource that ensures information is properly encrypted. you also want this link's co
ohaa [14]
Well, it kinda depends on the type of resource.
Lets say we are trying to access files or something. We could use the following link
<a href="ftps://SomeDotComSite"> Link to Resource</a>

If we are trying to access a page that gives us our resource we could use the following

<a href="https://SomeDotComSitePage"> Link to Page</a>


3 0
4 years ago
Dov'è il mio formaggio
fredd [130]

Answer:

non lo so, mi spiace

Explanation:

6 0
3 years ago
Read 2 more answers
X is a natural number with<br>GCF(x, 36) = 9 and LCM(x, 36)<br>36) =108<br> Find x.​
Ksenya-84 [330]

Answer:

27

Explanation:

GCF(27, 36) = 9

LCM(27, 36) = 108

6 0
3 years ago
After earning a learner license what test must be successful passed to earn an operator license?
Vikentia [17]
Your health care provider.. you must pass two tests.. the vision and knowledge tests
3 0
4 years ago
WHICH OF THE FOLLOWING IS A GROUP OF CELLS CHOSEN TO PERFORM AN ACTION?
sveticcg [70]
I believe it is C. Range
4 0
4 years ago
Other questions:
  • --- is a set of applications that manages the activities and resources of a computer.
    12·1 answer
  • If a user wants to change one small section of the formatting of a document and leave the rest the same, which process should be
    14·1 answer
  • You recently set up a DHCP server and need to configure your computer to start using it. Click the IPv4 properties option that y
    10·1 answer
  • What is it with the order of operations
    9·1 answer
  • List two ways to insert a chart in powerpoint
    14·1 answer
  • Question #5<br> How does the computer decide which path to follow in a selection control structure?
    12·1 answer
  • What are the five Ws?<br> (I don’t even know what this means)
    5·2 answers
  • Three different numbers need to be placed in order from least to greatest. For example, if the numbers are ordered 9, 16, 4, the
    9·1 answer
  • Program Convert Measurements:
    15·1 answer
  • Explain the application software and utility software in detail​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!