Question
A)Character counter. Write a method that uses recursion to count the number of times a specific character (one passed as an argument) occurs in an
A)Character counter. Write a method that uses recursion to count the number of times a specific character (one passed as an argument) occurs in an array of characters (another argument to the method). Test the method from a main program.
B) ecursive multiplication. Write a recursive function that accepts two arguments into the parameters x and y. The function should return the value of x times y. Remember multiplication can be performed as repeated addition as in the following example: 7?4=4+4+4+4+4+4+4
C) Write a Java program that reads a salesmans ID number and amount sold. Output the ID, followed by the string GETS AWARD if amount sold is at least $50,000, DOING OK if amount sold is between $25,000 and $50,000 and NEEDS PEP TALK if amount sold is $25,000 or less.
Please try to answer all the questions.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started