So far in this course, all of your programs have been written to be fully contained...

60.1K

Verified Solution

Question

Programming

So far in this course, all of your programs have been written tobe fully contained inside a single method named main. The mainmethod is where Java begins execution of your program. In thisassignment, you will coding other methods in addition to the mainmethod. These additional methods will perform specific functionsand, in most cases, return results. Write all your methods in aclass named Homework6Methods.java

  1. Write a public static method namedgetMaxOf2Ints that takes in 2 int arguments andreturns the Maximum of the 2 values
  2. Write a public static method namedgetMinOf2Ints that takes in 2 int arguments andreturns the Minimum of the 2 values
  3. Write apublic static method namedgetMaxOf3Ints that takes in 3 int arguments andreturns the Maximum of the 3 values
  4. Write a public static method namedgetMedianOf3Ints that takes in 3 int arguments andreturns the Median Value of the 3 values
  5. Write a public static method namedprintMinOf3Ints that takes in 3 int arguments oftype int and prints the minimum value of those 3ints Example: “The min is “ + minVal
  6. Write a public static method namedgetProdOfAllPositiveInts that takes in 1 intargument and returns the product of all the valuesbetween 1 and that number. If the argument is NON-positive return0
  7. Write a public static method namedgetProdOfAllNegativeInts that takes in 1 intargument and returns the product of all the valuesbetween -1 and that number. If the argument is NON-negative return0
  8. Write a public static method namedisProdOfAllNegativeIntsNegative that takes in 1int argument and returns true if the product ofall the values between -1 and that number is negative, and falseotherwise.
  9. Write a public static method namedgetCharAtIndex that takes in 2 arguments, a Strings, and an int index. The method should return thechar found at the index location of the string or if not foundreturn a ‘?’
  10. Write a public static method namedgetCountOfCharInString that takes in 2 arguments,a String s, and a char c. The method should returnan int representing the number of times the char was found withinthe string.
  11. Write a public static method namedgetStringReversed that takes in 1 argument of typeString and returns the String in reverseorder.
  12. Write a public static method namedgetStringTitleCased that takes in 1 argument oftype String and capitalizes the first letter of each word in theString, then returns the title cased string.Example: Input: “the dog ate my homework!” Returns: “The Dog Ate MyHomework!”

Answer & Explanation Solved by verified expert
4.4 Ratings (868 Votes)
Java codepublic class Main public static void mainString args SystemoutprintlnMax of two getMaxOf2Ints59 SystemoutprintlnMin of two getMinOf2Ints67 SystemoutprintlnMax of three getMaxOf3Ints100100200    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students