Objective
Develop a Python program to manage a photo album using object-oriented programming.
Instructions
- Create a class called
PhotoAlbumwith a private attributenum_pages(integer) and a public methodget_number_of_pages()that returns the number of pages. - The constructor creates an album with 16 pages by default, and it accepts an optional parameter to specify the number of pages.
- Create a class called
SuperPhotoAlbum, which inherits fromPhotoAlbum, whose constructor creates an album with 64 pages. - Create a class
AlbumTestthat creates a default album, an album with 24 pages and a large album, and displays the number of pages of each one.
16
24
64
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise