int k, j=2, m=3; for (k=0; k<=m; k++) System.out.println("k= "+ k); j += 3*k; System.out.println("j= "+ j);
* ?? *** ???? *****
public class Calculation { public static void main(String[] args) { // create two Sphere objects ________________ ball = ________________________(4.0,"ball"); ________________ orange = ________________________(4.0,"orange"); // compute volume of the ball ________________ ballVol = ________________________; // print a description of the orange ___________________________________________________; } //method main } //class Calculation public class Sphere { ____________ double radius; // radius of sphere ____________ ____________ type; // what the sphere is // Constructor: assign values to the two instance variables of the Sphere ____________ ____________(____________ r, ____________ t) { ____________________________________________________________________ | | | | | | |____________________________________________________________________| } //constructor // instance method getVolume for calculating volume of the Sphere ____________________________________________________________________ | | | | | | | | |____________________________________________________________________| // define a toString method for showing the type and radius of the Sphere ____________________________________________________________________ | | | | | | | | |____________________________________________________________________| } //class Sphere