In a new class called ArrayofCircles We are going to practice populating an array of objects Declare
Fantastic news! We've Found the answer you've been seeking!
Question:
In a new class called ArrayofCircles
We are going to practice populating an array of objects
Declare Circle Cir[] as an array and assign it to 500 new circles.
- Practice initializing each circle individually using the following code:
cir[117]=new Circle (57.2);
3. Make the above code a comment.
4. Practice populating all 500 circles in a loop.
For (int j=0; j<500;j++)
{
cir[j]=new Circle(10);
}
5. Add your documentation
Which of these methods will be easiest for 500 circles? Why? Type your answer in a comment at the bottom of your program.
Related Book For
Posted Date: