goals
play

Goals A project that will: Project 2 Have multiple threads - PDF document

Goals A project that will: Project 2 Have multiple threads Have a GUI Involve networking The Chat Room Be a lot of fun. Handles Windows People willing to enter the chat room must Your program should display 2


  1. Goals • A project that will: Project 2 – Have multiple threads – Have a GUI – Involve networking The Chat Room – Be a lot of fun. Handles Windows • People willing to enter the chat room must • Your program should display 2 types of have a handle windows: – Handle is a unique string identifying user – User List – list of handles of all people registered with the chat room. – Conversation Window – where conversations take place • May be multiple conversations up at any one time. Ground Rules Ground Rules 1. When program is started, user list window 4. If user accepts, conversation window should appear. should appear where user sees what he/she 2. Program must define a simple way to start a as well as the other party types. conversation with a user 3. User must be notified when someone wants to 5. A conversation can be terminated from the start a conversation. User may conversation window 1. Accept the call 6.There must be a graceful way to exit the 2. Deny the call 3. Ignore the call program.

  2. Ground Rules Specs • To invoke the chat client, use the command • Program must be able to manage user list – java CS3Chat myhandle window and all conversation windows, as well as placing / accepting calls. at the same – myhandle is the name chosen by the user. time • Note, all CS3 students will connect to the same name server. If myhandle is already used: – Hmm…perhaps each one running in its own thread? – myhandle is already in use • Bad commandline? – Usage: java CS3Chat myhandle • Questions so far? Design note 3 Parts to the chat system • Name Server • The GUI must be built by hand. – Allows users to register and find others registered. – Name server will be shared amongst all CS3 Sections • Please do not use a GUI Building tool (e.g. • Chat Server (interface) Forte, Jbuilder, or Visual J++) – Communicates with name server – Initiates chat sessions – Notifies of chat requests via a Listener. • Applications register a listener to get noifications. • Chat Application – Chat client – What you will be writing Classes that will be provided Classes that will be provided • NetworkChatServer • ChatException – Implements ChatServer – Exception thrown if chat goes wrong – Provides access to common name server. • ChatListener (interface) • You will have to write the ChatApplication, – Can register with the NetworkChatServer to receive chat events namely CS3Chat . • ChatSession – Object used to manage communication between 2 users. • Questions? – Uses Reader and Writer for I/O communication – Closing ChatSession will close Reader / Writer

  3. Register with the server Initiate a conversation Accept an invite to converse Questions? Deliverables Deliverables • Final Submission • Minimum submission – CSChat will – CSChat will: • Provide ability to initiate a conversation • Register a handle with the name server • To accept / deny a chat request • Display a user list • Maintain multiple conversation windows • Update list base on info received by name server – Due 11/13 – Due 11/6 – Note: you will be responsible for GUI and Interaction Design

  4. Grading • 85 points – program functionality • 15 points – GUI design • -20 points – bad implementation / design • -20 points – Style violations (including RCS)

Recommend


More recommend