Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The following must be done in Java. participant.txt 84528887 19147829 47790583 57183738 11668820 36892964 28312322 73978883 32687155 17996398 11905916 39031522 78606510 85700729 70457812 76501578 63330956

The following must be done in Java.

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

image text in transcribed

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

participant.txt

84528887 19147829 47790583 57183738 11668820 36892964 28312322 73978883 32687155 17996398 11905916 39031522 78606510 85700729 70457812 76501578 63330956 50063405 93105255 22927494 95916883 24721757 16680511 56018661 12103114 66851233 68084396 80728705 11307370 24599943 78094192 97090745 89525528 66676723 61076498 67773814 26643366 83247855 21149488 99804103 34981910 15728983 17612994 95709651 99880522 84226500 98746904 80293917 81424912 33182806

Overview: An object-oriented application is required for a virtual meeting system that manages participants and virtual meeting spaces. The application performs the following operations: 1. Load participant data from a data file 2. Create a new virtual room 3. Allocate participants to breakout rooms 4. Add a new participant to a breakout room 5. Display a list of all participants in a breakout room 6. Close a breakout room based on a room number 7. Open a breakout room based on a room number 8. Find a participant's breakout room number 9. Display a list of all breakout rooms managed by the system 10. Display a list of all breakout rooms managed by the system and the participants in each room The application consists of four domain classes: Virtual Meeting System, Virtual Room, BreakoutRoom and Participant. VirtualMeeting System Class The VirtualMeeting System class has the following methods. These are invoked by the Virtual Runner class. Method Signature Return Type Purpose loadParticipantData(String filename) void create VirtualRoom(String name) void allocateParticipants(String code ) void Read data from a file and loads the data into an array for allocation to breakout rooms Creates a virtual room with the supplied name, containing 5 breakout rooms Allocates participants to the breakout rooms of a virtual room using a strategy determined by the supplied code Adds a new participant to the breakout room with the supplied room number if it exists Returns a list of the participants in the breakout room with the supplied room number if found, otherwise returns null Opens a breakout room with the supplied room number if it exists addParticipant (String participantin, int roomNumber) boolean listParticipants(int roomNumber) String openBreakoutRoom(int roomNumber) boolean closeBreakoutRoom(int roomNumber) boolean findParticipantBreakoutRoom (String participantID) String Closes a breakout room with the supplied room number if it exists Locates and returns the breakoutRoomld for the breakout room hosting the participant with the (valid) supplied ID, otherwise returns null Returns a list of the breakout rooms managed by the virtual room Returns a list of all of the participants per breakout room managed by the virtual room, otherwise returns null listAllBreakoutRooms() String listParticipantsInAllBreakoutRooms() String Allocation strategies and codes for the allocateParticipants(..) method Code: C5 (Your program must handle this code) This strategy selects participants from the data list and allocates participants to the virtual rooms in a clusters of 5. C5 Allocations: Workshop1: {100, 200, 300, 400, 500 }, Workshop2: {600, 700, 800, 900, 999}, Workshop3: {}, Workshop4: {}, Workshop5: {} VirtualRoom Class The VirtualRoom class models a virtual room in the virtual meeting system. A virtual room creates and manages up to a certain number of breakout rooms. Attribute Type Purpose name String The name of the virtual room breakoutRoomLimit int A constant that specifies the maximum number of breakout rooms allowed for a virtual room breakoutRooms BreakoutRoom[ ] A list of breakout rooms managed by the virtual room The VirtualRoom class has the methods below. Method Signature Return Type Purpose VirtualRoom( String name) Constructor. Initialises the breakoutRoomLimit to 5 VirtualRoom( String name, int limit) getNumberOfBreakoutRooms() int Overloaded constructor. Initialises the breakoutRoomLimit to the supplied limit Returns the total number of breakout rooms managed by the virtual room Creates new Breakout Room objects that fill the list of breakout rooms createBreakoutRooms() void findBreakoutRoom(int roomNumber) BreakoutRoom Locates and returns the breakout room with the supplied room number, otherwise returns null closeBreakoutRoom(int roomNumber) boolean Closes a breakout room with the supplied room number if it exists openBreakoutRoom(int roomNumber) boolean Opens a breakout room with the supplied room number if it exists listBreakoutRooms() String Returns a list of the breakout rooms managed by the virtual room with the virtual room name heading the list on a separate line listParticipantsInBreakoutRoom(int roomNumber) String Returns a list of the participants in the breakout room with the supplied room number if found, otherwise returns null BreakoutRoom Class The BreakoutRoom class models a breakout room in the virtual meeting system. A breakout room hosts participants. It is created by a virtual room such that the breakout room's ID is based on the virtual room's name. Participants are added to the breakout room if it is open and if there is sufficient space to accommodate new participants. Duplicate participants (based on IDs) are not allowed. Attribute Type Purpose breakoutRoomID String breakoutRoomNumberCounter int breakoutRoomSize int Unique identifier for a breakout room in the virtual system formed by the combination of the virtual room name and a unique room number A class variable for producing unique integer values used in creating breakoutRoomID values A constant that specifies the maximum number (10) of participants allowed in a breakout room A list of participants who have been added to the breakout room Keeps track of the number of participants in the breakout room participants Participant[] numberOfParticipants int open boolean A flag for tracking whether the breakout room's state is open or closed The BreakoutRoom class has the methods below including accessors for the breakoutRoomID, numberOfParticipants and open variables. Method Signature Return Type Purpose BreakoutRoom (String name) Constructor addParticipant( String participantID) boolean findParticipant( String participantID) Participant Adds a new participant (no duplicates) with a valid ID to the (open) breakout room if the room is not filled and then returns true, otherwise returns false Locates and returns a participant based on a supplied (valid) ID if present in the (open) breakout room, otherwise returns null. Returns a list of the participants (ID) in the breakout room with the breakout room ID heading the list on a separate line Returns a String representation of the aggregated state of a BreakoutRoom Closes the breakout room, clears the participant list and resets any relevant state of the breakout room listParticipants() String toString() String closeBreakoutRoom(). void openBreakoutRoom() void Opens the breakout room and sets the state as open Additional notes: Example of toString() output for the first breakout room, associated with a virtual room called Seminar, hosting 4 participants and currently open: Seminar1 OPEN 4 Participant Class The Participant class models a participant in the virtual meeting system. Participants have the following state attribute. Attribute Type Purpose Predefined identifier for a participant in the virtual system. These must conform to an 8 digit format participantID String The Participant class has the methods below Method Signature Return Type Purpose Participant (String participantID) Constructor verifyID(String participantID) boolean Class method that validates that a non-null, participantID conforms to the required 8 digit format and returns true, otherwise false. getParticipantId() String Accessor for a participant's ID Returns a String representation of the state of a Participant formatted as follows: Participant: participantID toString(). String Overview: An object-oriented application is required for a virtual meeting system that manages participants and virtual meeting spaces. The application performs the following operations: 1. Load participant data from a data file 2. Create a new virtual room 3. Allocate participants to breakout rooms 4. Add a new participant to a breakout room 5. Display a list of all participants in a breakout room 6. Close a breakout room based on a room number 7. Open a breakout room based on a room number 8. Find a participant's breakout room number 9. Display a list of all breakout rooms managed by the system 10. Display a list of all breakout rooms managed by the system and the participants in each room The application consists of four domain classes: Virtual Meeting System, Virtual Room, BreakoutRoom and Participant. VirtualMeeting System Class The VirtualMeeting System class has the following methods. These are invoked by the Virtual Runner class. Method Signature Return Type Purpose loadParticipantData(String filename) void create VirtualRoom(String name) void allocateParticipants(String code ) void Read data from a file and loads the data into an array for allocation to breakout rooms Creates a virtual room with the supplied name, containing 5 breakout rooms Allocates participants to the breakout rooms of a virtual room using a strategy determined by the supplied code Adds a new participant to the breakout room with the supplied room number if it exists Returns a list of the participants in the breakout room with the supplied room number if found, otherwise returns null Opens a breakout room with the supplied room number if it exists addParticipant (String participantin, int roomNumber) boolean listParticipants(int roomNumber) String openBreakoutRoom(int roomNumber) boolean closeBreakoutRoom(int roomNumber) boolean findParticipantBreakoutRoom (String participantID) String Closes a breakout room with the supplied room number if it exists Locates and returns the breakoutRoomld for the breakout room hosting the participant with the (valid) supplied ID, otherwise returns null Returns a list of the breakout rooms managed by the virtual room Returns a list of all of the participants per breakout room managed by the virtual room, otherwise returns null listAllBreakoutRooms() String listParticipantsInAllBreakoutRooms() String Allocation strategies and codes for the allocateParticipants(..) method Code: C5 (Your program must handle this code) This strategy selects participants from the data list and allocates participants to the virtual rooms in a clusters of 5. C5 Allocations: Workshop1: {100, 200, 300, 400, 500 }, Workshop2: {600, 700, 800, 900, 999}, Workshop3: {}, Workshop4: {}, Workshop5: {} VirtualRoom Class The VirtualRoom class models a virtual room in the virtual meeting system. A virtual room creates and manages up to a certain number of breakout rooms. Attribute Type Purpose name String The name of the virtual room breakoutRoomLimit int A constant that specifies the maximum number of breakout rooms allowed for a virtual room breakoutRooms BreakoutRoom[ ] A list of breakout rooms managed by the virtual room The VirtualRoom class has the methods below. Method Signature Return Type Purpose VirtualRoom( String name) Constructor. Initialises the breakoutRoomLimit to 5 VirtualRoom( String name, int limit) getNumberOfBreakoutRooms() int Overloaded constructor. Initialises the breakoutRoomLimit to the supplied limit Returns the total number of breakout rooms managed by the virtual room Creates new Breakout Room objects that fill the list of breakout rooms createBreakoutRooms() void findBreakoutRoom(int roomNumber) BreakoutRoom Locates and returns the breakout room with the supplied room number, otherwise returns null closeBreakoutRoom(int roomNumber) boolean Closes a breakout room with the supplied room number if it exists openBreakoutRoom(int roomNumber) boolean Opens a breakout room with the supplied room number if it exists listBreakoutRooms() String Returns a list of the breakout rooms managed by the virtual room with the virtual room name heading the list on a separate line listParticipantsInBreakoutRoom(int roomNumber) String Returns a list of the participants in the breakout room with the supplied room number if found, otherwise returns null BreakoutRoom Class The BreakoutRoom class models a breakout room in the virtual meeting system. A breakout room hosts participants. It is created by a virtual room such that the breakout room's ID is based on the virtual room's name. Participants are added to the breakout room if it is open and if there is sufficient space to accommodate new participants. Duplicate participants (based on IDs) are not allowed. Attribute Type Purpose breakoutRoomID String breakoutRoomNumberCounter int breakoutRoomSize int Unique identifier for a breakout room in the virtual system formed by the combination of the virtual room name and a unique room number A class variable for producing unique integer values used in creating breakoutRoomID values A constant that specifies the maximum number (10) of participants allowed in a breakout room A list of participants who have been added to the breakout room Keeps track of the number of participants in the breakout room participants Participant[] numberOfParticipants int open boolean A flag for tracking whether the breakout room's state is open or closed The BreakoutRoom class has the methods below including accessors for the breakoutRoomID, numberOfParticipants and open variables. Method Signature Return Type Purpose BreakoutRoom (String name) Constructor addParticipant( String participantID) boolean findParticipant( String participantID) Participant Adds a new participant (no duplicates) with a valid ID to the (open) breakout room if the room is not filled and then returns true, otherwise returns false Locates and returns a participant based on a supplied (valid) ID if present in the (open) breakout room, otherwise returns null. Returns a list of the participants (ID) in the breakout room with the breakout room ID heading the list on a separate line Returns a String representation of the aggregated state of a BreakoutRoom Closes the breakout room, clears the participant list and resets any relevant state of the breakout room listParticipants() String toString() String closeBreakoutRoom(). void openBreakoutRoom() void Opens the breakout room and sets the state as open Additional notes: Example of toString() output for the first breakout room, associated with a virtual room called Seminar, hosting 4 participants and currently open: Seminar1 OPEN 4 Participant Class The Participant class models a participant in the virtual meeting system. Participants have the following state attribute. Attribute Type Purpose Predefined identifier for a participant in the virtual system. These must conform to an 8 digit format participantID String The Participant class has the methods below Method Signature Return Type Purpose Participant (String participantID) Constructor verifyID(String participantID) boolean Class method that validates that a non-null, participantID conforms to the required 8 digit format and returns true, otherwise false. getParticipantId() String Accessor for a participant's ID Returns a String representation of the state of a Participant formatted as follows: Participant: participantID toString(). String

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essential Data Protection For Estate Agencies In Singapore 2024

Authors: Yang Yen Thaw Yt

1st Edition

B0CQK79WD3, 979-8872095392

More Books

Students also viewed these Databases questions

Question

how many moles of gas are there in 5.7l of gas at stp

Answered: 1 week ago

Question

Distinguish between formal and informal reports.

Answered: 1 week ago