Skip to content

Glavin001/CSCI3465-Assignment3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Develop the "fridge magnet" client/server application.

screenshot

Download

Please see the Releases for precompiled builds.

Grading

See assignment at http://cs.smu.ca/~jdeveaux/csci/3465/2014/assign3.html

Features

Full Details

Develop one (or more) versions of the "fridge magnet" client/server application. Your fridge (server) contains letters placed randomly on the door. Your kids (clients) will approach the fridge and be allowed to move some of the letters. Multiple kids can move letters on the fridge (although not necessarily the same letter) simultaneously When one kid moves a letter, all of the other kids will see that letter move, in real time When a kid leaves the fridge, the fridge doesn't fall to pieces (graceful connection termination)

This assignment is meant to be written in a client/server style as a variation of the Observer pattern as demonstrated in the ChatClient/ChatServer programs.

At the very least, you must implement this application using Sockets to establish the client/server connection. Bonus marks will be awarded for including a version where the client and server communicate with each other using RMI or SocketChannels

Provide DETAILED INSTRUCTIONS on how to get the client and server to communicate to each other:

  • On the same machine
  • On separate machines

Be sure to include your name in the corner of your frame!

Notes: Your assignments will be marked based on the effectiveness of your solution, as well as the way your make use of classes and interfaces in your solution.

Documentation

JavaDoc

See http://glavin001.github.io/CSCI3465-Assignment3/Assignment3/doc/

Usage Instructions

Server CLI (Fridge)

java -jar FridgeServer.jar <port>
Optional Arguments
  • port - Default is 6666.
Basic Example Usage

Open and execute the FridgeServer.jar file or run the following command:

java -jar FridgeServer.jar
Advanced Example Usage
java -jar FridgeServer.jar 6666

Client CLI (Kid)

java -jar KidClient.jar <hostname> <port>
Optional Arguments

Note that both arguments must be used or they will not be applied.

  • hostname - Default is "localhost".
  • port - Default is 6666.
Basic Example Usage

Open and execute the KidClient.jar file or run the following command:

java -jar KidClient.jar
Advanced Example Usage
java -jar KidClient.jar localhost 6666

Same Machine

Using defaults: Hostname = "localhost", Port = 6666

  1. Start the Fridge (Server) .jar executible.

  2. Start the Kid (Client) .jar executible.

  3. Repeat step 2 for as many clients as desired.

Separate Machines

The important change is that you now must specify a different IP address (and possibly port number) for your Client (Kid) to lookup the Server (Fridge).

  1. Start the Fridge (Server) .jar executible. Take note of the Server's IP address. See How to Find Your Local and External IP Address.

  2. Start the Kid (Client) .jar executible with the command-line arguments for the hostname (Server's IP) and port used when starting the server above.

  3. Repeat step 2 for as many clients as desired.