Write code for the following Java methods. Test your code. Take screenshots. Submit your screenshots with your code files. 1). Write a Java method that receives an integer number, converts, and returns its corresponding ASCII character ('a' to 'z' or 'A' to 'Z'). If the integer is out of range, the method should display an error message; 2). Write a Java method that receives three integer numbers, and returns the largest integer; 3). Write a Java method which receives a positive integer number, and displays all prime numbers from 1 to the integer number it receives. You should research on the Internet regarding what a prime number is. If the integer is negative (or zero?), the method should display an error message; 4). Write a Java method that receives a positive integer number, and finds out if the integer number corresponds to a leap year. You should research on the Internet regarding what a leap year is. If the integer is negative, the method should display an error message; 5). Test all methods above by calling them in the main method and passing them suitable test values.
Write code for the following Java methods. Test your code. Take screenshots. Submit your
screenshots with your code files.
1). Write a Java method that receives an integer number, converts, and returns its
corresponding ASCII character ('a' to 'z' or 'A' to 'Z'). If the integer is out of range, the method
should display an error message;
2). Write a Java method that receives three integer numbers, and returns the largest integer;
3). Write a Java method which receives a positive integer number, and displays all prime
numbers from 1 to the integer number it receives. You should research on the Internet regarding
what a prime number is. If the integer is negative (or zero?), the method should display an error
message;
4). Write a Java method that receives a positive integer number, and finds out if the integer
number corresponds to a leap year. You should research on the Internet regarding what a leap
year is. If the integer is negative, the method should display an error message;
5). Test all methods above by calling them in the main method and passing them suitable test
values.
Step by step
Solved in 4 steps with 3 images