While explaining cyclic process with the help of P-V diagrams, the teacher told us the difference between a cyclic process and a reversible process. He said that in cyclic process, the system goes back to its initial conditions, but may not retrace the path in the P-V diagram, while in case of a reversible process, it is of utmost necessity that the system retraces the graph to go back to the original conditions.
For example, this is a cyclic process but not a reversible process as it does not retrace the graph, or in other words, it does not keep the surroundings unchanged when it returns to the original conditions.

This is a reversible process, where the graph is retraced:

A classmate of mine started arguing with the teacher that in order to plot a graph of a thermodynamic process, each step of each of the processes constituting the total change, should be reversible, whether or not the process is as a whole reversible. As per him, if we consider this diagram:

then the total process is not reversible but cyclic, but each of the steps (viz. $a$ to $b$, $b$ to $c$, $c$ to $d$, and $d$ to $a$) are reversible. As per him, it is an absolutely necessary condition that each step must be reversible so as to plot the graph, otherwise one shall not be able to measure the state functions.
The teacher said that he had never heard of something like this.
Can anyone explain who is right: the teacher or my classmate? It seems that my classmate is wrong, simply because if each step is reversible, then the whole process would become a reversible process. I haven't studied thermodynamics to a great depth, so I don't know who is correct.