Skip to main content

Practice · 1 of 4

Finish the Book class

CHALLENGE
Difficulty: beginner+25 XP

Complete the nested Book class: the constructor must set both fields (use parameters t and p), and add int getPages() returning pages. getTitle already works — follow its pattern.

Back to lesson: Practice: Class workshop