Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Database : Write the ODL declaration of the class of books for which the attribu

ID: 3839763 • Letter: D

Question

Database :

Write the ODL declaration of the class of books for which the attributes (that all objects of this class will have) are described as below:
1-
title is an attribute of type string and it represents the title of the book.
2-
year is an attribute of type integer and it represents the year in which the book was first published.
3- length is an attribute of type integer and it represents the number of pages in the book
4- bindType is an attribute which tells whether the book was first published as
pa-perback or hardcover. Its type is an enumeration and the name of the enumeration is Binding Values of

5-enumeration attributes are chosen from a list of literals, pa-perback and hardcover.

Explanation / Answer

Below is the Declaration of books ODL (Object Definition Language).

Interface books {

attribute string title;

attribute integer year;

attribute integer length;

attribute enum BindType {pa-perback, hardcover …} bindType

}