codex-lv2-may-2025

Level Navigation: 0 1 2 3 Current Level: 4 5


Lesson: Practice Challenge

🎯 Objective

Apply your skills by creating custom POJOs and performing read/update operations on books, pets, and sprites.


Instructions

  1. Complete all 3 exercises below by creating your own POJOs.
  2. For each object, read properties, update one, and print the final state.
  3. Write comments to explain each step.

✅ Exercise 1: Custom Book

Create a book POJO with "title", "author", and "pages". Print the title and author, update pages, and print all properties.

// TODO: Create your custom book POJO here
// TODO: Print title and author
// TODO: Update pages
// TODO: Print all properties

✅ Exercise 2: Custom Pet

Create a pet POJO with "name", "species", and "age". Print species, update age, and print name and updated age.

// TODO: Create your custom pet POJO here
// TODO: Print species
// TODO: Update age
// TODO: Print name and updated age

✅ Exercise 3: Custom Sprite

Create a sprite POJO with "name", "x", and "y". Print current position, update x and y, then print new position.

// TODO: Create your custom sprite POJO here
// TODO: Print current position
// TODO: Update x and y
// TODO: Print new position

✅ ACP

git add script.js
git commit -m "Step 4 completed - Practice Challenge Exercises"
git push

✅ Summary

You practiced:




Level Navigation: 0 1 2 3 Current Level: 4 5