Create the following Java classes:
- LetterE -
for letter E objects that look like this:
****
*
****
*
****
- LetterH - for letter H objects that look like this:
* *
* *
****
* *
* *
- LetterO -
for letter O objects that look like this:
****
* *
* *
****
- LetterP - for letter P objects that look like this:
****
* *
****
*
*
- LetterS -
for letter S objects that look like this:
****
*
****
*
****
- LetterT - for letter T objects that look like this:
*****
*
*
*
Each of these classes should have a toString() method
that returns a String.
The string returned should consist of asterisks, newlines, and
spaces (as necessary).
Each of these classes should also have a two-parameter
constructor indicating the height and the width of the letter
( height first, then width ).
The height of a letter should be at least 5,
and the width of a letter should be at least 4;
if a parameter is supplied to the constructor that is below the minimum,
set the dimension to the corresponding minimum.
For the letters E, H, P, and S,
if the height is even, the middle horizontal line
should be above the median.
For example, if the height is 6 and the width is 5,
print these letters as follows:
***** * * ***** *****
* * * * * *
***** ***** ***** *****
* * * * *
* * * * *
***** * * * *****
For the letter T, if the width is even,
the middle vertical line should be to the right of the median.
For example, if the width is 6 and the height is 5,
print the T as follows:
******
*
*
*
*