\section{The Class Clock}
This class models a clock which maintains a date.
\begin{vdm_al}
class Clock
types
public Date = seq of char;
instance variables
date : Date := "";
operations
public SetDate : Date ==> ()
SetDate(d) ==
date := d;
pure public GetDate : () ==> Date
GetDate() ==
return date;
end Clock
\end{vdm_al}
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet am 2026-11-24)
¤
*© Formatika GbR, Deutschland