Object Oriented Programming (Course 1)
Multiple Objects
  Start your All-Access Pass to unlock this challenge
Buy Access Login

Challenge 1 / 1

Imagine you have two Ship objects:

$ship1 = new Ship();
$ship1->weaponPower = 10;

$ship2 = new Ship();
$ship2->weaponPower = 5;

Suddenly, you want to boost ship1's weapon power. So you write:

$ship1->weaponPower = 15;

After this last line, what is the weaponPower of $ship2?

Skip challenges and go to theNext Chapter

Turn Challenges Off?

All further challenges will be skipped automatically.
You can re-enable challenges at any time on this page or from your account page.