Biyernes, Pebrero 8, 2019

Recursion - Activity 14

Area Menu
C. Circle
R. Rectangle
S. Square
T. Triangle
X. eXit
Select CRSTX only

methods:
main - calls area method
area - displays the selection, accepts CRSTX input, impelements recursion
circle - calls method input for the radius, compute and display the area of the circle
rectangle - calls method input for the length and width, compute and display the area of the rectangle
square - calls method input for the side, compute and display the area of the square
triangle - calls method input for the base and height, compute and display the area of the triangle
input - validates the input value of radius, length, width, side, base, and height where the allowed value is any positive number, implements recursion for invalid value

Walang komento:

Mag-post ng isang Komento

Activity #17 - One-Dimensional Array

Place all codes under the method main. 1. Input 5 numbers and satisfy the ff:     a) sum of all input numbers     b) count of odd and ev...