Eshley
Eshley
JCHJava Community | Help. Code. Learn.
Created by Eshley on 1/25/2025 in #java-help
Java College Project
Hey everyone, I'm about to start working on a Java project about a task and event scheduling system in a calendar based on urgency. For a task, I'll have the following fields: taskId taskFrequency taskName taskDescription taskLastDate taskDuration For an event: eventId eventName eventDescription eventDate eventStartHour eventEndHour The system will intelligently and efficiently allocate tasks and events into a calendar (likely using the Google Calendar API). Events must be scheduled on their defined date and within their start and end times, but task scheduling is dynamic. I’m considering using two algorithms for scheduling: greedy and backtracking: The greedy algorithm will perform an initial scheduling of tasks based on their urgency, trying to fill the available time slots in the calendar. Backtracking will come into play if the calendar runs out of space or encounters unresolvable conflicts. It will check the possibility of modifying the schedule for previously allocated tasks to make room for a more urgent task. Now for the question: What data structure should I use to implement the algorithm? For a task, I have both priority and a latest possible completion date. This suggests I need an initial sorting based on dates, followed by priority. Additionally, when adding a new task, it could impact the entire calendar. For example, there might be tasks like studying for an exam, requiring 10 hours that could be split across several days .
5 replies