01: package method.param;
02:
03: /**
04: * Description of the Class
05: *
06: *@author Chris Seguin
07: */
08: public class TestRenameParamSample {
09: private int paramName;
10:
11: /**
12: * Constructor for the TestRenameParamSample object
13: *
14: *@param paramName Description of Parameter
15: */
16: public TestRenameParamSample(int paramName) {
17: this .paramName = paramName;
18: }
19:
20: /**
21: * Description of the Method
22: *
23: *@return Description of the Returned Value
24: */
25: public boolean paramName() {
26: System.out.println("This is a bad name for a method");
27: return true;
28: }
29:
30: /**
31: * Description of the Method
32: *
33: *@param height Description of Parameter
34: *@return Description of the Returned Value
35: */
36: public boolean useParam(String height) {
37: System.out.println("Everything worked: "
38: + height.substring(0, 2));
39: return true;
40: }
41:
42: /**
43: * Description of the Method
44: *
45: *@param paramName Description of Parameter
46: *@param radius Description of Parameter
47: *@return Description of the Returned Value
48: */
49: public double function(double paramName, double radius) {
50:
51: class NestedClass {
52: private double paramName;
53:
54: /**
55: * Constructor for the NestedClass object
56: *
57: *@param init Description of Parameter
58: */
59: public NestedClass(double init) {
60: paramName = init;
61: }
62:
63: /**
64: * Description of the Method
65: *
66: *@return Description of the Returned Value
67: */
68: public double square() {
69: return paramName * paramName;
70: }
71: }
72:
73: NestedClass nc = new NestedClass(paramName);
74: return radius * nc.square() + paramName;
75: }
76: }
|