8. Build and Test Plan

8.1. Build Plan

Implementing GUI

GUI is developed using Symantec Visual Cafe DataBase Edition.

Login/password

both are TextFields, and echo character of password field is '*'. When user login, send a GET_USER_INFO request to the server.

Meeting Scheduler

Calendar object is Symantec tools from AWT addition of component library.

Calendar.getCurrent() will return selected date from GUI.

start and end time is implemented by numerical spinner, by which you can set range and increments of the spinner. If "pm" field is choosed, number of hours is incremented by 12.

12am/12pm is dealt seperately.

Selected participants list will return requirement meeting participant. Add/remove button is handled through JAVA1.1 Event Listener machenism.

Same implementatation for equipment selection

For room selection, roomsize is input from textfield. Room name is selected from List object.

For memo page, it just uses simple TextField and TextArea.

When user tries to propose a meeting, the client will first convert user input for starttime and endtime inot two Date objects. And verify whether starttime is before endtime. If "set duration" is checked, make sure duration is shorted than the time interval between start and end time.

If, required, get list of participant, room requirement, equipment requiement , wrap it into request object, send a PROPOSE_MEETING to server.

User DialogBox object to display Server feed back

Personal Event Manager

Initally get all event list for current store it in a local data structure.

Calendar object is also using built in Symantec tools. whenever a date is chosen, the program fires an event, the event list for that date will be displayed in the list.

If there is new meeting schedule, local event list will also be updated.

Implementing Client-Server Communication

Communication between client and server is done by object serialization. After client-server setup for InputStream and OutputStream, they also have to set up ObjectInputStream and ObjectOutputStream on top of that. Client send RequestObj to Server and receives ResponseObj from server.

All Object types used for communication are implementing Serializable Interface

import java.util.*;

public class RequestObj implements java.io.Serializable {

public final static int GET_USER_INFO=1;

public final static int ADD_EVENT=2;

public final static int DELETE_EVENT=3;

public final static int PROPOSE_MEETING=4;

public final static int GET_ALL_USER=5;

public final static int GET_ALL_EQUIPTYPE=6;

public final static int GET_ALL_ROOM=7;

public int method ;

public UserInfo uInfo ;

public java.util.Date startTime;

public java.util.Date endTime;

public Event evt ;

public MeetingReq mReq ;

public RequestObj() {

super();

}

}

public final static int SUCCESS=1;

public final static int INVALID_REQUEST=2;

public final static int INVALID_USERNAME=3;

public final static int INVALID_PASSWORD=4;

public final static int EVENT_CONFLICT=5;

public final static int TIME_CONFLICT=6;

public final static int LOCATION_CONFLICT=7;

public final static int EQUIPMENT_CONFLICT=8;

public final static int UNKNOWN_ERROR=9;

int retCode ;

String msg ;

Vector evtList ;

Vector allUsers;

Vector allTypes;

Vector allRooms;

/**

* ResponseObj constructor comment.

*/

public ResponseObj() {

super();

}

}

 

 

Implementing Server Request Decoder

This module is in charge of protocol decoding. It receives the ResponseObj object from the communication module, decode the information contained in that object and calls the specific method within the scheduling module to deal with the request.

Implementing Server Scheduling Algorithm

  1. Put all participants names into vector Members
  2. If a fixed time slot is specified, then put that time slot into vector TimeSlots
  3. Else, use the time range and value of the duration for the meeting to search for all possible time slots with the given time range, and put them into vector TimeSlots

  4. If a specific room name is given, then put the name into vector Rooms
  5. Else, use the given size requirement to search in the database for all possible room names and put then into vector Rooms.

  6. For each required equipment type, search in the database for all proper equipment and put them into a vector EquipGoup. Put all EquipGroup into a vector Equipment.
  7. For each time slot in TimeSlots, check if all the following criteria satisfies:

  1. If all users in Members are free for this time slot
  2. If any room in Rooms is free for this time slot
  3. If there exists one equipment in each equipment group in Equipment that is free for this time slot

  1. If 5 is true, update the database to add the scheduled event, and return success

Else, indicate conflict in the return code and send back response.

8.2. Test Plan

8.2.1. Component Test: Client Side

Login View

Personal Event Manager View

Calendar and Time

Event Display List

Add/Delete Button

Propose Meeting Button

Meeting Scheduler View

Date and Time Input

Participant Selection

Room Selection

Equipment Selection

Memo

8.2.2. Component Test: Server Side

Server Application

public final static int GET_USER_INFO=1;

public final static int ADD_EVENT=2;

public final static int DELETE_EVENT=3;

public final static int PROPOSE_MEETING=4;

public final static int GET_ALL_USER=5;

public final static int GET_ALL_EQUIPTYPE=6;

public final static int GET_ALL_ROOM=7;

public final static int GET_USER_INFO=1;

public final static int ADD_EVENT=2;

public final static int DELETE_EVENT=3;

public final static int PROPOSE_MEETING=4;

public final static int GET_ALL_USER=5;

public final static int GET_ALL_EQUIPTYPE=6;

public final static int GET_ALL_ROOM=7;

public final static int GET_USER_INFO=1;

public final static int ADD_EVENT=2;

public final static int DELETE_EVENT=3;

public final static int PROPOSE_MEETING=4;

public final static int GET_ALL_USER=5;

public final static int GET_ALL_EQUIPTYPE=6;

public final static int GET_ALL_ROOM=7;

Database

8.2.3. System Integration Test

Test Cases of System Integration

Login

Personal Event Manager

Meeting Scheduler