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
Drag the tiles to the correct boxes to complete the pairs.
Gala2k [10]

Answer:

So the first one i think is A. The second is 2, and that i do know

Explanation:

6 0
3 years ago
What types of storage can be used to access your data on another computer?
Ivenika [448]
<span>You could use cloud storage. Basically, the things you save are actually saved on another computer, that is, on another server, that is used as a hard drive for many pcs. You can access the cloud storage if you have internet and it works like a normal hard drive. There are even laptops that don't have storage other than cloud storage.</span>
6 0
2 years ago
Why would an online survey of 2,000 visitors to your college’s Web site be of little use in assessing the neighboring community’
musickatia [10]

Answer: the sample is not representative of the community.

Explanation:

Online surveys or surveys in general are made to obtain relevant information about a particular issue. If samples are not representative of that issue, they end up having little use.  

4 0
3 years ago
Question 3
prohojiy [21]

The Answer Should Be:

<u>The first thing for you to do when you arrive at an intersection is to stop at the traffic light. Your going to want to listen to the instructions or signals of the traffic Police.</u>

I Hope This Helps? :)

8 0
2 years ago
How does coding work on computers?
sleet_krkn [62]
Coding works through programming/programs. Programs have different coding languages, and text files. The code within the file is known as the "source CODE" this code is used in different ways, causing for the possibility of separate binary files that computers can directly run. Hope I helped.

5 0
3 years ago
Other questions:
  • Write a program that assigns two integer values from standard input to the variables int1 and int2, then prints "true" if they a
    10·1 answer
  • Periodically adding, changing and deleting file records is called file. A) Updating B) Upgrading C) Restructuring D) Renewing E)
    10·2 answers
  • Which player type focuses on level progression?
    13·1 answer
  • Write the steps for displaying multiple subtotal functions in excel.
    10·1 answer
  • If a*b = 2a - 56, calculate the value of<br>3 * 4​
    14·1 answer
  • Which is true about POP3 and IMAP for incoming email?
    13·1 answer
  • Recall that within our BinarySearchTree class the root variable is of type BSTNode. A BSTNode object has three attributes: info
    13·1 answer
  • Which line of code will eliminate the element “calculator” from an array of supplies?
    13·1 answer
  • WILL MARK BRAINLIEST!!!!!!!!!!!
    6·2 answers
  • Hi am feeling really happy just passed a test after a lot of tries :-)
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!