PPT Slide
J.17
Instance Creation with New
Body sun = new Body( );
sun.idNum = Body.nextID++;
sun.NameFor = "Sol ";
sun.orbits = null;
Body earth = new Body( );
earth.idNum = Body.nextID++;
earth.nameFor = "Earth";
earth.orbits = sun;
"Earth"
"Sol"
Previous slide
Next slide
Back to first slide
View graphic version