A university is building a system to help students choose courses toward a degree. Each course has a unique code such as “MA523” or “CS38251”. Create a decision service that splits a set of courses into “allowed” and “not allowed” lists using pattern-based rules like these:
- If the Degree Code is “MA Single” and the Course Code matches the pattern
MA52#orMA62#(where#is any single character), add the course to the allowed list. - If the Degree Code is not “CS%” and the Course Code matches the pattern
CS%288%orCS%289%(where%is any run of characters), add the course to the not-allowed list.
Send your solutions to DecisionManagementCommunity@gmail.com, or open a pull request to add yours here.