Question: Need help with JAVA assignment! Exercise 1B [10%] Add a method to the class Exercisel that returns void, is called printEvenUpTo and receives an int
Need help with JAVA assignment! ![Need help with JAVA assignment! Exercise 1B [10\%] Add a method to](https://s3.amazonaws.com/si.experts.images/answers/2024/08/66b9d232ae1fd_00266b9d23211ec3.jpg)
Exercise 1B [10\%] Add a method to the class Exercisel that returns void, is called printEvenUpTo and receives an int as a parameter. The method should print all even numbers up to and including the int provided as parameter starting from zero. If a negative number is provided do not print anything. Create a variable of type Exercisel in the main() method of MainExercisel and call printEvenUpTo () with a positive int value of your choosing. Exercise 1C [20\%] Add a method to the class Exercisel that returns a String, is called getABCStartingFrom, and receives a char as parameter. The String returned by the method should contain the Latin alphabet starting from and including the letter received as a parameter until z. 1 The returned String may contain either upper case or lower case letters and your method should behave the same regardless of whether the parameter is upper case or lower case. If the parameter is a character that is not contained in the alphabet (e.g. numerical or a symbol) return an empty (") String. Tips: For this exercise it is helpful to refer to the ASCII codes of the alphabet and your code will be faster if you use StringBuilder. The wrapper class Character has some methods that are helpful when dealing with the case of the char
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
