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
Elanso [62]
3 years ago
15

This project is to mimic a meeting request system by checking the requesting party’s validity, and the number of people attendin

g. Then it will make a decision as to whether the meeting can take place and display an informative message.
Display a welcome message and then ask the user to enter his/her name Display a personal welcome message by addressing the user by his/her name. Declare a constant and assign a number to it as the Conference Room capacity.

Ask the user how many people are attending the meeting. Display a meaningful message for each of the three different scenarios. The message informs the user whether he/she can have the requested room and also displays the number of people that must be excluded or that can still be invited based on the room capacity. Here are the three scenarios.

people attending are fewer than the Room Capacity
people attending are more than the Room Capacity
people attending are exactly the same as the Room Capacity

The system will keep running until the user quits (meaning all this happens in a loop)
Computers and Technology
1 answer:
alexgriva [62]3 years ago
4 0

Answer:

See explaination for the program code

Explanation:

Meeting.java

------

import java.util.Scanner;

public class Meeting {

public static void main(String[] args) {

Scanner input = new Scanner(System.in);

final int ROOM_CAPACITY = 100;

int numPeople, diff;

String name;

System.out.println("****** Meeting Organizer ******");

System.out.print("Enter your name: ");

name = input.nextLine();

System.out.println("Welcome " + name);

do{

System.out.print("\nHow many people would attend the meeting? (type 0 to quit): ");

numPeople = input.nextInt();

if(numPeople < 0)

System.out.println("Invalid input!");

else if(numPeople != 0)

{

if(numPeople > ROOM_CAPACITY)

{

diff = numPeople - ROOM_CAPACITY;

System.out.println("Sorry! The room can only accommodate " + ROOM_CAPACITY +" people. ");

System.out.println(diff + " people have to drop off");

}

else if(numPeople < ROOM_CAPACITY)

{

diff = ROOM_CAPACITY - numPeople;

System.out.println("The meeting can take place. You may still invite " + diff + " people");

}

else

{

System.out.println("The meeting can take place. The room is full");

}

}

}while(numPeople != 0);

System.out.println("Goodbye!"); }

}

output

---

****** Meeting Organizer ******

Enter your name: John

Welcome John

How many people would attend the meeting? (type 0 to quit): 40

The meeting can take place. You may still invite 60 people

How many people would attend the meeting? (type 0 to quit): 120

Sorry! The room can only accommodate 100 people.

20 people have to drop off

How many people would attend the meeting? (type 0 to quit): 100

The meeting can take place. The room is full

How many people would attend the meeting? (type 0 to quit): 0

Goodbye!

You might be interested in
Write a Java program to count the characters in each word in a given sentence?Examples:Input : geeks for geeksOutput :geeks-&gt;
dimulka [17.4K]

Answer:

import java.util.Scanner;

public class Main

{

public static void main(String[] args) {

   

    Scanner in = new Scanner(System.in);

   

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

    String sentence = in.nextLine();

   

    String[] words = sentence.split("\\s");

   

    for(String s : words)

     System.out.println(s + " -> " + s.length());

}

}

Explanation:

Ask the user to enter a sentence

Get each word in the sentence using split method and put them in words array

Loop through the words. Print each word and number of characters they have  using the length method in required format

4 0
3 years ago
When using the Internet, it is important to know the validity of web page you are using. How can you know if the information is
Svetradugi [14.3K]

Answer: it would be the first option

ANSWER FROM EPICTORRACAT

4 0
2 years ago
What is the difference between a field and an infoobject? What is the advantage of using infoobjects instead of fields in an ads
kenny6666 [7]

The difference between a field and an infoobject as well as its advantages is given below.

<h3>What is the difference between InfoObject and adso?</h3>

The difference between Infoprovider and ADSO can be seen when we tell about the definition of both.

Note that Info Providers are known to be tools that are often used to save the data in SAP BW system. Info Providers are said to be the objects that can be seen in BW, which are saving data physically or virtually and it is one that give access to the data and can also be in the assessment for reporting issues.

In terms of ADSO , it is one that Corporate memory and it is one that helps a person to be able save the full history of the data that can be used for reconstruction purposes, and it is one where a person do not need to to extract it all from the source system.

<h3>What is the advantage of using infoobjects instead of fields in an adso?</h3>

Modeling InfoObjects brings is one that gives a lot of additional effort when compared to ADSO . ADSO is one that helps or enables you to be able to compress your data, thereby lowering the total data footprint.

Learn more about InfoObjects  from

brainly.com/question/1382377

#SPJ1

6 0
2 years ago
1k bits equals to how many bits
ruslelena [56]

Answer:

1000 bits

Explanation:

hope it helps :D

8 0
2 years ago
How useful is the creation of folders for your computer
aleksandr82 [10.1K]
Depends on your operating system. For any system not Chrome OS, folder creation is an organizational must. Your hard drive stores data sequentially in the form of bits. Whenever you want to access information on your hard drive, the drive has to, much like an array in programming, run through all the data until it comes across the desired file. This, as you could probably imagine, is cumbersome. We, as the users, have the luxury of not having to deal with that kind of information acquisition. We can create folders and directories into which we can place files. The reason I mentioned Chrome OS earlier, was because Chrome OS stores just about everything in the cloud. There isn't any real need to create directories on a Chrome system because all of that data can be managed and stored on Google's servers, as opposed to in files and organized by yourself.
5 0
3 years ago
Other questions:
  • If you are upgrading your operating system to Windows 7, you may not use the In-Place Upgrade Installation Option with
    14·1 answer
  • What natural resource are available on the coast but not somewhereelse
    13·1 answer
  • What is the analysis stage in System development life cycle?
    12·1 answer
  • Which of the following should you do if your accelerator is stuck? A. Pump your brakes to build fluid pressure. B. Shift to Neut
    14·2 answers
  • What is emerging as a major business area of innovation that offers a flexible collection of computers on the internet that can
    6·1 answer
  • 24 POINTS!!! <br> Why are Sequences, Selection, and Iteration building blocks of algorithms?
    5·1 answer
  • Interest on loan paid to sangam stores Rs5000(journal entry)​
    13·1 answer
  • Which of the following is not the disadvantage of closed
    7·2 answers
  • What are some other possible causes of an overheating laptop
    7·1 answer
  • Question #1
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!