What would be the sample class design of Outlook like meeting scheduler?
This should help you to schedule a meeting with the rest of the invitees and book a room as we do in offices.
Few things I omit purposely,i.e checking meeting room availability, person availability at looking his/her calendar.
Here is my approach to this. I would love to know what improvements can be there and mistakes have done in the process.
class Person{
String name;
Email emailId;
}
class Organizer{
Person organizer; //using composite here
public void Organizer(Person p){
this.organizer = p;
}
private boolean scheduleMeeting(){
Meeting m = Meeting.getInstance();
sendInvites(m);
}
private void sendInvites(Meeting m){
for(Person p : m.inviteesList){
send(p.emailId, m);
}
}
}
class Meeting{
private String agenda;
private String bodyMessage;
private String location;
private TimeFrame time;
private ArrayList<Parent> inviteesList;
private Meeting(){}
public static Meeting getInstance(){
Meeting meet = new Meeting();
agenda = addLocation();
bodyMessage = addBody();
location = addLocation();
time = addTime();
addInvitees();
return meet;
}
}
class TimeFrame{
Time startTime;
Time endTime;
}
Edit - Update on the above https://codeshare.io/5e4vNx
Any help on this would be appreciated.