Exercise 11.2.pdf - 5/19/2021...

This preview shows page 1 - 2 out of 2 pages.

5/19/20211/2Success!bloodarray[0] type Squirrel is good, goSplat() method run is true animates small splatterbloodarray[1] type Frankenstein is good, goSplat() method run is true animates medium splatterbloodarray[2] type PitBull is good, goSplat() method run is true animates large splatterOutput:Animate small BloodSplatterAnimate medium BloodSplatterAnimate large BloodSplatterReturn to ExercisesYour Code ( with color highlights added ):bloodarray[0] = newSquirrel();bloodarray[1] = newFrankenstein();bloodarray[2] = newPitBull();for(int i=0;i<bloodarray.length;i++)bloodarray[i].goSplat();The Instructions:Exercise 11.2:Interfaces and ObjectsCreate an object of typeSquirreland assign it to bloodarray at index/subscript0Create an object of typeFrankensteinand assign it to bloodarray at index/subscript1Create an object of typePitBulland assign it to bloodarray at index/subscript2

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 2 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
NoProfessor
Tags
Object Oriented Programming, Subroutine, Pitbull

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture