name = $newName; $this->street = $newStreet; $this->city = $newCity; $this->state = $newState; $this->zip = $newZip; } public function display(){ echo "
\n";
echo "Name: " . $this->name . "
\n";
echo "Street: " . $this->street . "
\n";
echo "City: " . $this->city . "
\n";
echo "State: " . $this->state . "
\n";
echo "Zip: " . $this->zip . "
\n";
echo "
Create an object and display it.
display(); ?>Change the object contents and display them.
setName("Jane Doe"); echo "New name is: " . $anAddress->getName() . "
\n"; $anAddress->setCity("Los Angeles"); echo "New city is: " . $anAddress->getCity() . "
\n"; $anAddress->setState("CA"); echo "New state is: " . $anAddress->getState() . "
\n"; $anAddress->display(); ?>