Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help with JAVA coding assignment please! Exercise 1C [20%] Add a method to the class Exercisel that returns a String, is called getABCStartingFrom, and

Need help with JAVA coding assignment please!image text in transcribed

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. For example the Java program segment Exercisel el = new Exercisel(); System. out. println(el.getABCStartingFrom( 't')); should print (either in lower or upper case) tuvwxyz and the Java program segment Exercisel el = new Exercisel () ; System. out. println(el.getABCStartingFrom(' !')); should not print anything. Use the variable of type Exercisel you created before in the main ( ) method of MainExercise1 and call getABCStartingFrom () with a Latin letter of your choosing

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions

Question

=+(3.14) Q((HOA) U (HenB)) = P(HOA) +P (H'nB) for A, B E 70.

Answered: 1 week ago