Question: each program needs an algorithim and lab program with code in JAVA COMP 167 - Lab 2 User defined methods Program 1: Write a program

 each program needs an algorithim and lab program with code in each program needs an algorithim and lab program with code in JAVA

COMP 167 - Lab 2 User defined methods Program 1: Write a program to verify whether a string is palindrome or not Example: 121 is a palindrome, 123454321 is a palindrome, 13478 is not a palindrome. Algorithm: Program 2: Variation of Program 1: Verify whether a string is palindrome. Write a user defined method reverse for the logic of reversing string. String methods you can use: equalso, chatA0, length Algorithm: Program 3: Write a user defined method to calculate factorial of a number. Factorial: Factorial of a number x - x*x-1*x-2.1 Factorial of 3 = 3*2*1=6 Factorial of 7 -7*6*5*4*3*2*1 = 5040 Algorithm

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!