Your textbook describes the Object Client-Server Framework (OCSF). Code and test cases are available at the textbook website: http://www.site.uottawa.ca/school/research/lloseng/supportMaterial/source/ .
First install the code corresponding to Phase 1 of the SimpleChat program and the OCSF framework from the website. Zip files for both the source and compiled class files are available along with the Javadoc documentation for all the source code.
In this part of the project, you will
On the book's website, you will find a set of test cases for Phase 1 of the SimpleChat program. Execute all the tests to understand and test the functionality of the system. Note that the page numbers may not match because of the difference in edition and the result of customizing the textbook for this class.
Write some additional test cases that execute the system. Use ideas from equivalence class analysis, boundary value testing, and code coverage to create test cases that aren't already included in the website. The test cases don't need to be written using JUnit. Just describe the test inputs, test outputs, and rationale for each test case. Feel free to use the format given in the book's test cases, noting that you need to add the rationale for each test case. Type your test cases in a document called TP1.pdf (only PDF documents will be accepted).
Without modifying the framework classes, do exercises E49, E50, and E51 given on pages 104-106 of the Lethbridge/Laganiere part of your textbook. Document your code with appropriate comments.
On the book's website, you will find a set of test cases for Phase 2 of the SimpleChat program. Execute all the tests to understand and verify the functionality of the system. (Again, note that the page numbers may not match.)
Write some additional test cases that execute the system. Use ideas from equivalence class analysis, boundary value testing, and code coverage to create test cases that aren't already included in the website. The test cases don't need to be written using JUnit. Just describe the test inputs, test outputs, and rationale for each test case. Feel free to use the format given in the book's test cases, noting that you need to add the rationale for each test case. Type your test cases in a document called TP2.pdf (only PDF documents will be accepted).
Now add a blocking feature to the chat application. Let's call this phase 2x (extension of phase 2). Sometimes a user wants to prevent messages received by a given client appearing on his or her screen. This might be because the client's user is being deliberately annoying, or because the client's user is sending lots of public messages that are useful to other users but are not useful to the current user. Again, all code must be properly documented.
Issues considered: The following paragraphs discuss the issue before presenting the list of requirements for phase 2x.
Issue 1: | Can the user block more than one other user at a time? |
Decision: | Yes; however, he or she will have to issue a sequence of block commands, one for each user to block. |
Issue 2: | The user needs some way of finding out if he or she has any blocking in progress, otherwise the user might forget that he or she had earlier established blocking. |
Decision: | Add a command called #whoiblock that will list those clients I am blocking. |
Issue 3: | It would be useful for a user to know if anyone is blocking messages that come from him or her. |
Decision: | Add a command called #whoblocksme that will do this. |
Issue 4: | Should the server be able to block messages. |
Option 4.1: | Do not allow the server to block messages. |
Advantage: | This would be simpler. |
Option 4.2: | The server should be able to block ordinary messages from clients, but not administrative messages (ones starting with #, etc). |
Advantage: | This would prevent a malicious user from overwhelming the server's display. |
Decision: | Choose option 4.2. |
Issue 5: | Does it make sense to block messages from myself? |
Decision: | No. |
Issue 6: | Can a user block messages from the server? |
Decision: | Yes. |
Issue 7: | How does a user unblock messages? |
Decision: | The #unblock command with no arguments will cancel all blocking that a user has set up. The #unblock command with an argument will cancel blocking for messages from that user only. |
Issue 8: | Any user could circumvent blocking by logging in using a different login id. |
Option 8.1: | Stop allowing users to create their own login IDs. |
Advantages: | Would solve this problem. |
Disadvantages: | Would make this system less useful in a chat environment. |
Option 8.2: | Status quo. Live with this problem |
Decision: | Choose option 8.2. |
Issue 9: | Should it be possible to block users who are not even logged on; and should a block persist even if the blocked user logs off and logs on again? |
Decision: | Yes to both questions, because otherwise a user could circumvent the blocking by logging off and on. |
Issue 10: | Should a block persist even if the blocking user logs off and logs on again? |
Decision: | No. For simplicity, we require a user to re-establish any blocks that he or she desires. |
Functional requirements: Based on the above discussion of issues, here are the functional requirements for phase 2x.
Messages from <user> will be blocked.
You cannot block the sending of messages to yourself.
User <user> does not exist.Assume that the server has a list of valid user ids
Messages from <user> were already blocked.
Messages from <user> will now be displayed.
Messages from <user> were not blocked.
Messages from <user> will now be displayed.
No blocking is in effect.
Messages from <user> are blocked.
No blocking is in effect.
Messages to <user> are being blocked.
Write some test cases that execute the above features. Use ideas from equivalence class analysis, boundary value testing, and code coverage to create test cases that aren't already included in the website. The test cases don't need to be written using JUnit. Just describe the test inputs, test outputs, and rationale for each test case. Feel free to use the format given in the book's test cases, noting that you need to add the rationale for each test case. Type your test cases in a document called TP2x.pdf (only PDF documents will be accepted).
Type this up based on the instructions given here describing the entire group project.
GitHub repository set up for this course by Dr. Ghosh must be used, and a commit log submitted. Please refer to the general project description for more information.
There are two types of things to turn in --- team artifacts and individual artifacts.
Team artifacts are to be submitted through RamCT, once for each team. One and only one team member must do the submission. Please check to see that the files have actually been submitted, not just uploaded.