Annа recently mаde а series оf videоs that …
Yоu're building а system fоr а librаry, and yоu want to ensure that the number of pages in a book is always a positive value. Write a simple class named `Book` with the following specifications: 1. It should have two private member variables: `String title` and `int pages`.2. The class should have a constructor that accepts a title (a `String`) and pages (an `int`) as parameters.3. If the `pages` parameter in the constructor is less than or equal to zero, throw an exception of type `InvalidPageCountException` with the message "Page count must be positive.".4. Write the custom exception class `InvalidPageCountException` that extends `Exception`. Do not overthink your solution - it should be around 15-20 lines of code.