I need help creating a procedure in my calendar app. I am trying to create a procedure that can change the color of a day based on what type of event it is.
But the procedure should
Contain and uses one or more parameters that have an effect on the functionality of the procedure.
Implement an algorithm that includes sequencing, selection, and iteration.
The event can be anything its just I need the procedure to have parameters.
Sequence– the order we want the computer to execute the instructions we provide as programmers. For example, do this first, then do this, then do that, and so forth. (if then statement)
Selection– selecting which path of an algorithm to execute depending on some criteria. For example, if you passed a class in school, then we execute the operations that clap and cheer and play a song. But if you didn’t pass the class, then maybe we would say, “Better luck next time, hang in there!” (do result)
Iteration– looping or repeating. Many times, we want to be able to repeat a set of operations a specific number of times or until some condition occurs. (loop)
the original said type of event, it should have been just an event. The code works i have other code where the user can change the colors and stuff of the events and weekends, but i dont know how to work around the constraints