CS 351: Design of Large Programs -------------------------------- Assignment # 6, Due Date 12/11/01 ---------------------------------- The goal of this assignment is to gain familiarity with Java's Swing, I/O and networking classes by using them to design a File server and a client that requests its services. Study the simple server and client programs distributed in class. Then run them. (ssh to another machine and run the server program on that machine. Then start the client program on your machine.) Then modify the two programs to accomplish the following: 1. Client asks user for name and password. The password should not appear on the sreen as it is typed. These are then communicated to the server and will be used for authentication. (Make up your own rules here -- for example, if user name begins with 'j' and password begins with 'X0', the user is authentic.) 2. Once authenticated, the user should be prompted to either: (i) create a new file or (ii) read from an existing file or (iii) edit an existing file In cases (ii) or (iii), the user should be prompted for the name of the file. This information should then be conveyed to the server. The following "exceptions" are now possible: (a) A file that has been requested for read or edit does not exist. (b) The file that has been requested for a read exists but is read-protected. (c) The file that has been requested for editing exixts but is either read-protected or write-protected. In each case, the user should be so informed and should be given another two chances. 3. Once the user completes viewing/editing the file, the user presses one of the following buttons: SAVE and CONTINUE or SAVE and QUIT or CONTINUE or QUIT. In the first case, the edited or created file is saved and the user is again prompted for the options in 2. In the second case, the edited or created file is saved and both server and client programs terminate after closing open files and sockets. In the third case, the edited or created file is not saved and the program continues with step 2. In the fourth case, client and server programs terminate after . . .