Skip to main content

Recap—Simple Class Definition

Let's recap what we've done.

  • We defined a Film class with four properties in the Caché dictionary.

  • We used several of the Caché data types (%StringOpens in a new tab, %IntegerOpens in a new tab, and %BooleanOpens in a new tab.)

  • We used the Required attribute to ensure that every Film has a Title.

  • We defined an initial (or default) value for the TicketsSold and PlayingNow properties.

  • We used the MAXLEN parameter to specify a length limit for the Description property.

  • We specified that indices should be maintained for Title and TicketsSold, so that specific films can be retrieved quickly based on their values for these properties.

FeedbackOpens in a new tab