@@ -128,7 +128,7 @@ public static double surfaceAreaTriangle(final double baseLength, final double h
128128 if (height <= 0 ) {
129129 throw new IllegalArgumentException (POSITIVE_HEIGHT );
130130 }
131- return base * height / 2 ;
131+ return baseLength * height / 2 ;
132132 }
133133
134134 /**
@@ -138,8 +138,8 @@ public static double surfaceAreaTriangle(final double baseLength, final double h
138138 * @param height height of a parallelogram
139139 * @return area of given parallelogram
140140 */
141- public static double surfaceAreaParallelogram (final double base , final double height ) {
142- if (base <= 0 ) {
141+ public static double surfaceAreaParallelogram (final double baseLength , final double height ) {
142+ if (baseLength <= 0 ) {
143143 throw new IllegalArgumentException (POSITIVE_BASE );
144144 }
145145 if (height <= 0 ) {
@@ -156,17 +156,17 @@ public static double surfaceAreaParallelogram(final double base, final double he
156156 * @param height height of trapezium
157157 * @return area of given trapezium
158158 */
159- public static double surfaceAreaTrapezium (final double base1 , final double base2 , final double height ) {
160- if (base1 <= 0 ) {
159+ public static double surfaceAreaTrapezium (final double baseLength1 , final double baseLength2 , final double height ) {
160+ if (baseLength1 <= 0 ) {
161161 throw new IllegalArgumentException (POSITIVE_BASE + 1 );
162162 }
163- if (base2 <= 0 ) {
163+ if (baseLength2 <= 0 ) {
164164 throw new IllegalArgumentException (POSITIVE_BASE + 2 );
165165 }
166166 if (height <= 0 ) {
167167 throw new IllegalArgumentException (POSITIVE_HEIGHT );
168168 }
169- return (base1 + base2 ) * height / 2 ;
169+ return (baseLength1 + baseLength2 ) * height / 2 ;
170170 }
171171
172172 /**
0 commit comments