printing an "E" out of asterisks via strings
the users inputs the height/width for an "E" that's gonna be drawn out of asterisks. the height must be at least 5 asterisks and the width must be at least 4. Should a value less than than 4 for the width or 5 for the height be entered, they default to 4/5 respectively. Should the height be an even #, the "E" must look like this: (middle line above the median)
*****
*
*****
*
*
*****
otherwise, it will look like this:
****
*
****
*
****
It should have a toString() method that returns the E as a string. Here is what I have so far for the code
public class LetterE
{
private int width;
private int height;
public void letterE( int aWidth, int aHeight )
{
if (aWidth =< 4 && aHeight >=5)
{
width = 4;
height = aHeight;
}
if (aWidth >= 4 && aHeight =< 5)
{
width = aWidth;
height = 5;
}
if (aWidth >= 4 && aHeight >= 5)
{
width = aWidth;
height = aHeight;
}
public String toString()
{
???
}
public void print()
{
???
}
}
can anyone help me out w/ what the "???" are supposed to be?