Question: Using code from the last question, create a new stormtrooper object with name='FN-287', designation='Scarif' and legion='501st'. Use the constructor. Echo the id of this new


Using code from the last question, create a new stormtrooper object with name='FN-287', designation='Scarif' and legion='501st'. Use the constructor. Echo the id of this new object. Answer: [ Select ] new Stormtrooper('FN-287', 'Scarif', '501st'); \$trooper = new Stormtrooper('FN-287', 'Scarif', '501st'); \$trooper = Stormtrooper('FN-287', 'Scarif', '501st'); \$trooper = new Stormtrooper('Scarif', '501st'); Question 26 Using code from the last question, create a new stormtrooper object with name='FN-287', designation='Scarif' and legion='501st'. Use the constructor. Echo the id of this new object. Answer: [ Select ] echo "\$trooper-> $ id"; echo "\$trooper->legion"; echo "\$trooper->id"; echo "\$trooper.\$id
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
