Question
using java For each part, code a static method as described and test it by calling it from main and printing the result (all of
using java
For each part, code a static method as described and test it by calling it from main and printing the result (all of the methods should be static in order to be accessible from main) a. Write a method named calc which takes two int arguments (x and y), then calculates the following formula and returns the result. Use the Scanner to input the integers from the user and the output should be rounded to two decimal places: {^2}^(-2)/2 b. Write a method named wordCap which takes a string argument and returns its capitalized form. For example wordCap (hElLo) returns Hello. c. Write a method named findKeyWord which takes two inputs, a string (str) and a key word (kw), and returns true if it finds kw in str *Challenge: Add a third parameter, a flag, which if it's true, the searching should be case insensitive.
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