Chapter 4 Progress Checks

 

1.    Make a program that will calculate and output the volume of a cylinder of radius 11 and height 15.

 

2.    Create a program that will calculate the quadratic formula where the user inputs a, b, and c.

 

3.    Create a program that makes change based on a puchase price and the amount that the user tendered.

 

4.    Quiz (handout in class)

 

5. Physics simulation (handout in class)

 

6. The following is invalid. Why?

public void myMethod(int one)

{

return (one + one);

     }

 

7. Which of the following methods are class methods?

 

public static void one(){...}

private int two() {...}

private static int three() {...}

public float four() {...}

 

8. Which of the follosing constructors are invalid?

public int ClassA (int one){...}

public ClassB(int one, int two){...}

void ClassC( ) {...}

 

9. Are there any conflicts in the following three constructors for ClassX to be valid?

public ClassX(int X) {...}

public ClassX (float X) {...}

public ClassS(int Y) {...}