Question: Consider a course registration system, at a certain time before the start of the semester, the course is open for registration. A student may register
Consider a course registration system, at a certain time before the start of the semester, the course is open for registration. A student may register for that course if there are seats available. If the course is full, students who try to register will be put on a wait queue, to be added in a first-first come manner if spots open up. Two weeks after the start of the semester, registration will be closed, which means no one can drop or add course. Note that course can be canceled at any time.
(a) draw a state diagram for a simple course registration. On each iteration, write the events trigger the transition.
(b) Show how your diagram would be implemented using the state design patterns(which include the singleton pattern) by writing the outline of aa classes and method headers that are essential for the pattern? Also, outline the implementation of each state method to show the transition bounded by that method - the transition event condition may be written out in pseudo code (no need to construct event objects)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
