Question: import java.until.*; import java.io.*; public class MenuBased{ public static void main(string []args{ Scanner sc = new Scanner(System.in); while(ture) { System.out.println(A); System.out.println(B); System.out.println(C); System.out.println(E); String ch

import java.until.*;
import java.io.*;
public class MenuBased{
public static void main(string []args{
Scanner sc = new Scanner(System.in);
while(ture)
{
System.out.println("A");
System.out.println("B");
System.out.println("C");
System.out.println("E");
String ch = sc.next();
if(ch == "A")
{
}
else if (ch == "B")
{
}
else if (ch == "C")
{
}
else if (ch == "E")
{
}
}
}
if the provide number rise to 6, stars should rise to 6
java
use JUnit 4 test
thank you
Create a menu-based program to generate the given patterns. A menu-based program is a program that provides the user a Menu and user has an option to select the item from the menu. The program will not stop till user chooses to exit the program with option E. Program should only accept A, B, C and E as valid options. User will also provide a number that will be used as size to draw the chosen pattern. Patterns with size 5 are shown below. that will be used as 1 2 3 4 5 2 3 4 5 3 4 5 4 5 4 5 3 4 5 2 3 4 5 1 2 3 4 5 ********* * * * * * * * * * * *
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
