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.
Press Submit to check your solution.
Back to lesson: Practice: Class workshop