#C13698. Program Call Flow Based on User Role
Program Call Flow Based on User Role
Program Call Flow Based on User Role
This problem requires you to determine the program call flow sequence based on a given user role. The valid roles are Customer
, LogisticsManager
, and CustomerServiceRep
. For a given input role, if it is valid, output the corresponding sequence of function calls; otherwise, output an empty sequence.
The call sequences are defined as follows:
$$\begin{aligned} \text{Customer}: &\quad [\text{login},\text{view_recommendations},\text{track_order_status},\text{logout}]\\ \text{LogisticsManager}: &\quad [\text{login}, \text{update_order_status}, \text{logout}]\\ \text{CustomerServiceRep}: &\quad [\text{login}, \text{assist_customers}, \text{logout}] \end{aligned}$$
inputFormat
A single line from stdin containing a string that represents the user role.
outputFormat
A single line to stdout containing the corresponding call flow sequence with function names separated by a single space. If the role is invalid, output an empty line.## sample
Customer
login view_recommendations track_order_status logout
</p>