package calendar;
import java.util.Calendar;
private int m_guests;
public static final int NO_FIELDS = 8;
public static final int IDX_GUESTS = 7;
return m_guests;
}
m_guests = guests;
return true;
}
public SocialEvent(
int id, String title, Calendar start_date,
Calendar end_date, String description, int repetition,
int guests) throws Exception {
super(id, title, start_date, end_date, description, repetition);
m_guests = guests;
m_type = Event.SOCIAL_EVENT;
}
super();
}
@Override
String csv = super.ToCSV() + ","+m_guests;
return csv;
}
public static void main (String [] args)
throws Exception{
Calendar cal1 = Calendar.getInstance();
Calendar cal2 = Calendar.getInstance();
cal2.add(Calendar.HOUR, 2);
SocialEvent e = new SocialEvent();
SocialEvent f = new SocialEvent(Data.AllocateEventId(), "E", cal1,
cal2, "Test",
NOT_REPEATING, 0);
e.SetDescription("Changed 1");
cal2.add(Calendar.HOUR, 4);
e.SetEnd_date(cal2);
e.SetId(999);
e.SetRepetition(2);
e.SetTitle("CHANGE TITLE");
e.SetGuests(2);
System.out.println(f.GetDescription());
System.out.println(f.GetEnd_date());
System.out.println(f.GetId());
System.out.println(f.GetRepetition());
System.out.println(f.GetStart_date());
System.out.println(f.GetTitle());
System.out.println(f.GetGuests());
}
}