renewed but DVDS cannot, and DVDS have a shorter loan perio oks. The library may expand in future to include other kinds of e you are designing classes for the library. Which of the designs s most appropriate? praryltem parent class that stores common information such as due date, child classes Book and DVD. ok class and a DVD class that are unrelated, and a Libraryltem class that es an instance of Book or DVD in an instance attribute
renewed but DVDS cannot, and DVDS have a shorter loan perio oks. The library may expand in future to include other kinds of e you are designing classes for the library. Which of the designs s most appropriate? praryltem parent class that stores common information such as due date, child classes Book and DVD. ok class and a DVD class that are unrelated, and a Libraryltem class that es an instance of Book or DVD in an instance attribute
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 6PE
Related questions
Question
![A library contains books and DVDS, which can be checked out and
returned. A warning is sent to borrowers who have overdue items. Books
can be renewed but DVDS cannot, and DVDS have a shorter loan period
than books. The library may expand in future to include other kinds of
items.
Suppose you are designing classes for the library. Which of the designs
below is most appropriate?
O A Libraryltem parent class that stores common information such as due date,
and child classes Book and DVD.
O A Book class and a DVD class that are unrelated, and a Libraryltem class that
stores an instance of Book or DVD in an instance attribute
O A Book class and a DVD class that have no relationship
O A Libraryltem class whose attributes can be initialized differently depending on](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F293ec77a-bb0f-4498-a317-90c98547c742%2F3f05631e-10f5-4969-87ae-2b4763212741%2Fjeegnh_processed.png&w=3840&q=75)
Transcribed Image Text:A library contains books and DVDS, which can be checked out and
returned. A warning is sent to borrowers who have overdue items. Books
can be renewed but DVDS cannot, and DVDS have a shorter loan period
than books. The library may expand in future to include other kinds of
items.
Suppose you are designing classes for the library. Which of the designs
below is most appropriate?
O A Libraryltem parent class that stores common information such as due date,
and child classes Book and DVD.
O A Book class and a DVD class that are unrelated, and a Libraryltem class that
stores an instance of Book or DVD in an instance attribute
O A Book class and a DVD class that have no relationship
O A Libraryltem class whose attributes can be initialized differently depending on
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,