// EventObj (base class for Meeting)
import java.util.*;
import java.text.*;

public class EventObj
  {
  public String name;
  public Date start;
  public Date end;
  public EventObj (String id, String st, String en) {
   // parse is broken in some jdk's so use Date.parse instead
   SimpleDateFormat df = new SimpleDateFormat("d M Y h:m"); 
   name=id;
   // broken in some jdks
   start=df.parse(st, new ParsePosition(0));
   // start=new Date(Date.parse(st));
   // broken in some jdks
   end=df.parse(en, new ParsePosition(0));
   //end=new Date(Date.parse(en));
   }
// test for conflict
 public boolean conflict(Date s, Date e) {
  if (start.equals(s) || end.equals(e)) return true;
  if (s.after(start) && s.before(end)) return true;
  if (e.after(start) && e.before(end)) return true;
  return false;
  }
 }