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
Most hand sewing begins and ends with
Burka [1]
I would say it has to be b but its what the correct answer is its up to you!

I hoped this helped you out!

Have a nice day!

4 0
3 years ago
Can someone please help me I need to turn this in my 3:00pm Eastern time
galben [10]

Answer:

1000000000

Explanation:

8 0
2 years ago
A digital system has been developed to measure temperatures in the range -10˚C to 100˚C. If the accuracy of the system is such t
8090 [49]

If you have 10 bits available then you can interpret any number in range [0,2^{10}-1]=[0,1023].

The system therefore could represent the actual temperature of 39°C.

Hope this helps.

7 0
3 years ago
WHAT DOES INFORMATION TECHNOLOGY DO??<br> Do they offer services or products
notsponge [240]
Yes

Explanation: Information technology, or IT, describes any technology that powers or enables the storage, processing and information flow within an organization. Anything involved with computers, software, networks, intranets, Web sites, servers, databases and telecommunications falls under the IT umbrella.
4 0
2 years ago
In a certain computer program, two positive integers are added together, resulting in an overflow error. Which of the following
Airida [17]

The option that best explains why the error occurs is that The program can only use a fixed number of bits to represent integers; the computed sum is greater than the maximum representable value.

<h3>Can programs represent integers?</h3>

An integer value is known to be often listed out in the source code of a program in a way called a sequence of digits that is said to be optionally prefixed with + or −. Note that some programming languages do use other notations, like hexadecimal.

Computers are known to use a a fixed number of bits to show an integer. The most -used bit-lengths for integers are known to be 8-bit, 16-bit, 32-bit or 64-bit.

Learn more about errors from

brainly.com/question/11472659

8 0
2 years ago
Other questions:
  • If your vehicle catches fire while you are driving, you should:
    5·2 answers
  • rob just got a new idea for the movie he's making, and he wants to put in late hours to get it done. Which of the following stat
    10·1 answer
  • Which aperture setting will give the shallowest depth of field?
    10·2 answers
  • Professor Zak allows students to drop the four lowest scores on the ten 100 point quizzes she gives during the semester. Design
    13·1 answer
  • The Coins class was created to hold all your loose change, kind of like a piggy bank! For this exercise, you are going to simula
    15·1 answer
  • HELP
    11·1 answer
  • 1) SuperFetch is a memory-management technique that a) determines the type of RAM your system requires. b) makes the boot-up tim
    7·1 answer
  • Which field would best function as a primary key for a table that tracks orders?
    11·2 answers
  • Simple example of hybrid computer​
    7·2 answers
  • Fwee Pwoints Fwor You
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!