Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CHECK THE FOLLOWING PROGRAM AND CODE A J AVA BASED CLASS WHICH RUNS IN TERMINAL , paste the java code into the answer Specifically, you'll
CHECK THE FOLLOWING PROGRAM AND CODE A JAVA BASED CLASS WHICH RUNS IN TERMINAL , paste the java code into the answer
Specifically, you'll be creating a program that can be used to connect two computers (or terminals on the same computer) to allow for both extended text chatting, as well as (potentially) file transfers. Requirements The assignment is out of five, and has seven possible basic components to implement: 1. Basic text chatting Person A writes something; Person B sees that something At the socket level, you may wish to encapsulate this, or prepend some small bit of text (to distinguish it from file transfers or commands, below) Either party may send multiple messages, and may quit It's up to you how you expect them to 'quit' 2. Having usernames to identify who's talking o This doesn't imply authentication or accounts or anything like that; just choose a name once, and always prepend it to chats 3. More than two participants concurrently o Person A writes something; Persons B and C see that something o i.e. a chat room If you choose this one, I'd highly advise also choosing the 'usernames' option Encryption/Decryption o Person A writes something; Person B sees that something; an eavesdropper mid-stream wouldn't understand it Feel free to simply connect openssl o 'Strength' of encryption isn't a factor. It's fine to hardcode passwords/keys, if used It's acceptable to do trivial transformations e.g. simplying XOR'ing every byte, or running text through base64 encoding The only requirement is to make it unreadable at a casual glance 5. File transfer 0 One person can send a file to another during the conversation 0 It's up to you how the user initiates it; how the file is identified; whether the receiver gets the appropriate filename, or has to guess at one, or if received files all have the same name o e.g. one user might type / send somefile.txt and perhaps the user simply gets download.dat 6. Text replacements of some sort o I'm just looking for anything that manipulates the data on a low level. e.g. replacing /me with asterisks and the username, or emoticons, etc. The task is in doing it at all; not in the scope of what it accomplishes 7. More than two concurrent conversations on the same server execution. i.e. chat rooms o Note that #3 was about having multiple participants in the same conversation So #3 might see A chatting with B chatting with C chatting with D, but this would see A chatting with B; C chatting independently with D Specifically, you'll be creating a program that can be used to connect two computers (or terminals on the same computer) to allow for both extended text chatting, as well as (potentially) file transfers. Requirements The assignment is out of five, and has seven possible basic components to implement: 1. Basic text chatting Person A writes something; Person B sees that something At the socket level, you may wish to encapsulate this, or prepend some small bit of text (to distinguish it from file transfers or commands, below) Either party may send multiple messages, and may quit It's up to you how you expect them to 'quit' 2. Having usernames to identify who's talking o This doesn't imply authentication or accounts or anything like that; just choose a name once, and always prepend it to chats 3. More than two participants concurrently o Person A writes something; Persons B and C see that something o i.e. a chat room If you choose this one, I'd highly advise also choosing the 'usernames' option Encryption/Decryption o Person A writes something; Person B sees that something; an eavesdropper mid-stream wouldn't understand it Feel free to simply connect openssl o 'Strength' of encryption isn't a factor. It's fine to hardcode passwords/keys, if used It's acceptable to do trivial transformations e.g. simplying XOR'ing every byte, or running text through base64 encoding The only requirement is to make it unreadable at a casual glance 5. File transfer 0 One person can send a file to another during the conversation 0 It's up to you how the user initiates it; how the file is identified; whether the receiver gets the appropriate filename, or has to guess at one, or if received files all have the same name o e.g. one user might type / send somefile.txt and perhaps the user simply gets download.dat 6. Text replacements of some sort o I'm just looking for anything that manipulates the data on a low level. e.g. replacing /me with asterisks and the username, or emoticons, etc. The task is in doing it at all; not in the scope of what it accomplishes 7. More than two concurrent conversations on the same server execution. i.e. chat rooms o Note that #3 was about having multiple participants in the same conversation So #3 might see A chatting with B chatting with C chatting with D, but this would see A chatting with B; C chatting independently with D
Step 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