The purpose of the app to be built is managing information about movies. The app deals with
just one object type, Movie
, and with two enumerations, as depicted in the following
class diagram. In the subsequent parts of the tutorial, you will extend this simple app by adding
actors and directors as further model classes, and the associations between them.
First make a list of all the constraints that have been expressed in this model. Then code the app by following the guidance of this tutorial (and the Validation Tutorial.
Compared to the practice project of our validation tutorial, two attributes have been added:
the optional single-valued enumeration attribute rating
, and the multi-valued
enumeration attribute genres
.
You have to take care of
defining the enumeration datatypes
MovieRatingEL
and GenreEL
with the help of the meta-class
Enumeration
;
defining the single-valued enumeration attribute
Movie::rating
together with a check and a setter;
defining the multi-valued enumeration attributes
Movie::genres
together with a check and a setter;
extending the methods Movie.update
, and Movie.prototype.toString
such that they take care of the added enumeration attributes.
in the model code of your app, while In the user interface ("view") code you have to take care of
adding new table columns in listMovies.html
and suitable form controls (such
as selection lists, radio button
groups or checkbox groups) in
createMovie.html
and upateMovie.html
;
creating output for the new attributes in the method
...view.listMovies.setupUserInterface()
;
allowing input for the new attributes in the methods
...view.createMovie.setupUserInterface()
and
...view.upateMovie.setupUserInterface()
.
Also in this assignment, and in all further assignment, you have to make sure that your pages comply with the XML syntax of HTML5 (by means of XHTML5 validation), and that your JavaScript code complies with our Coding Guidelines and is checked with JSLint (http://www.jslint.com).