Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Language: Java Goals The primary goal of this lab is to write, test and complete a system with multiple classes, where you have designed and
Language: Java
Goals The primary goal of this lab is to write, test and complete a system with multiple classes, where you have designed and implemented those classes. This is a continuation of lab3 and you should start with that code. This program will have a interactive behavior. This will reinforce the need for good design and creating and using new classes, where splitting one large class into more logical classes, as we discussed in class. The lab will build a rudimentary chat system to reinforce the concept of c objects. ation between 1. Design a larger Person class, into multiple classes 2. Add classes Address, Name and Contact classes to the multi class system. 3. Associate the new classes such as Address, Name and Contact with the Person. 4. Create a textual interface to enter all of the relevant data for all of the class attributes that are in each object 5. Create a set of constructors for each class that take a least 1 parameter and set the object value 6. Stores the data in the appropriate objects 7. Extend the chat room class from previous lab 8. Integrate multiple Person objects into the Chat room object 9. Carry out a conversation between multiple people by inputting data and posting it to the console of the Chat room object Specifications The class you extend will be the Person class. The Person class will connect to Chat room. The main extension of this lab is to add a lot of information about the person who chats, before they actually start a chat session. You can add the information through your interface, th objects with that data from the beginning. Or, you can instantiate and add it after. A key element of this lab is how your associate all of the classes together and where you instantiate the objects en instantiate You must decide the correct types for each, and minimally use the attributes and methods listed below. All behavior from Lab 3 will remain and you will extend the functionality Class Person First Name . Middle Initial e Last Name PUID o email . phoneNumber e streetAddress e streetAddress2 City e state zipCode e country . Message Question Class Name Class Address Class Contact Specifications of previous Lab 3 The class you create will be a Person class. The Person class will connect to Chat room. The Chat room object will allow multiple Person objects to communicate to each other. The class will contain the following list of data attributes. You must decide the correct types for each, and minimally use the attributes and methods listed below Class Person First Name . Middle Initial e Last Name PUID . Message Question You will need to code a get and set function for each attribute, so minimally 2 methods per each attribute. You can design more if you want. The required methods are below * public void sendMessage(String message) * public String receiveMessage0) e public void sendQuestion(String question) * public String receiveQuestionO Class Chat room . Current Person - the current person sending a message . CurrentMessage the current message being sent/answered Current Question - the current question being sent/answered You will first instantiate several persons into the Chat room object. Then, go through a continuous series of interactions (loop) where the you will ask what person, by Last Name, wants to send a message/question. Then the system wil ask what Person object to send the message/question to. Third, it will ask if you want to send a message or question. Finally, the text of question or message will be entered. once it is entered, the system will do 2 operations. Update that question or message into the memory of the person object to which it was intended. Second, display a message to the screen showing what message message and what is the content of the text. This will continue until the user exits with an "END command as the message has been sent from who to who, whether it is a question or Please begin the chat! Sender Name Matson ReceiverName: Smith Question or Message: question Text What time is lunch? Matson asked Smith, "What time is lunch?" Please begin the chat! Sender Name Smith ReceiverName: Matson Question or Message: message Text Lunch is at noon Smith said to Matson, "Lunch is at noon." Goals The primary goal of this lab is to write, test and complete a system with multiple classes, where you have designed and implemented those classes. This is a continuation of lab3 and you should start with that code. This program will have a interactive behavior. This will reinforce the need for good design and creating and using new classes, where splitting one large class into more logical classes, as we discussed in class. The lab will build a rudimentary chat system to reinforce the concept of c objects. ation between 1. Design a larger Person class, into multiple classes 2. Add classes Address, Name and Contact classes to the multi class system. 3. Associate the new classes such as Address, Name and Contact with the Person. 4. Create a textual interface to enter all of the relevant data for all of the class attributes that are in each object 5. Create a set of constructors for each class that take a least 1 parameter and set the object value 6. Stores the data in the appropriate objects 7. Extend the chat room class from previous lab 8. Integrate multiple Person objects into the Chat room object 9. Carry out a conversation between multiple people by inputting data and posting it to the console of the Chat room object Specifications The class you extend will be the Person class. The Person class will connect to Chat room. The main extension of this lab is to add a lot of information about the person who chats, before they actually start a chat session. You can add the information through your interface, th objects with that data from the beginning. Or, you can instantiate and add it after. A key element of this lab is how your associate all of the classes together and where you instantiate the objects en instantiate You must decide the correct types for each, and minimally use the attributes and methods listed below. All behavior from Lab 3 will remain and you will extend the functionality Class Person First Name . Middle Initial e Last Name PUID o email . phoneNumber e streetAddress e streetAddress2 City e state zipCode e country . Message Question Class Name Class Address Class Contact Specifications of previous Lab 3 The class you create will be a Person class. The Person class will connect to Chat room. The Chat room object will allow multiple Person objects to communicate to each other. The class will contain the following list of data attributes. You must decide the correct types for each, and minimally use the attributes and methods listed below Class Person First Name . Middle Initial e Last Name PUID . Message Question You will need to code a get and set function for each attribute, so minimally 2 methods per each attribute. You can design more if you want. The required methods are below * public void sendMessage(String message) * public String receiveMessage0) e public void sendQuestion(String question) * public String receiveQuestionO Class Chat room . Current Person - the current person sending a message . CurrentMessage the current message being sent/answered Current Question - the current question being sent/answered You will first instantiate several persons into the Chat room object. Then, go through a continuous series of interactions (loop) where the you will ask what person, by Last Name, wants to send a message/question. Then the system wil ask what Person object to send the message/question to. Third, it will ask if you want to send a message or question. Finally, the text of question or message will be entered. once it is entered, the system will do 2 operations. Update that question or message into the memory of the person object to which it was intended. Second, display a message to the screen showing what message message and what is the content of the text. This will continue until the user exits with an "END command as the message has been sent from who to who, whether it is a question or Please begin the chat! Sender Name Matson ReceiverName: Smith Question or Message: question Text What time is lunch? Matson asked Smith, "What time is lunch?" Please begin the chat! Sender Name Smith ReceiverName: Matson Question or Message: message Text Lunch is at noon Smith said to Matson, "Lunch is at noonStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started