Answered step by step
Verified Expert Solution
Question
1 Approved Answer
write Junit tests, please. using JUnit 4 Instructions: Please review the requirements given below carefully and complete your work. You should compress all source files
write Junit tests, please.
using JUnit 4
Instructions: Please review the requirements given below carefully and complete your work. You should compress all source files (including main to test your work) into a zip file and submit it through Canvas. The grading scheme is provided on Canvas. You are free to use any looping construct of your choice Make sure that you display appropriate messages that are intuitive and clear Use Java's random number generator method (limit it to integers only) Do NOT write the entire logic of the program inside main(). Create separate methods that perform all the work and then invoke it from main() Write Junit Tests for Exercise 1 and 4 only. Note: Use of Arrays is not allowed! 1. 2. 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. A. 1 2 3 4 5 2 3 4 5 3 4 5 4 5 5 4 5 3 4 5 2 3 4 5 1 2 3 4 5 * * * * * * * ********* * * * * * * * * * * * * * * * * * * * Example Menu: A. Pattern 1 B. Pattern 2 C. Pattern 3 E. Exit Note: You MUST NOT hardcode the patterns and you have to use loops (or nested loops) to print the patterns of given size. Be sure to print the empty spaces appropriately to make the pattern look like the ones shown above. Instructions: Please review the requirements given below carefully and complete your work. You should compress all source files (including main to test your work) into a zip file and submit it through Canvas. The grading scheme is provided on Canvas. You are free to use any looping construct of your choice Make sure that you display appropriate messages that are intuitive and clear Use Java's random number generator method (limit it to integers only) Do NOT write the entire logic of the program inside main(). Create separate methods that perform all the work and then invoke it from main() Write Junit Tests for Exercise 1 and 4 only. Note: Use of Arrays is not allowed! 1. 2. 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. A. 1 2 3 4 5 2 3 4 5 3 4 5 4 5 5 4 5 3 4 5 2 3 4 5 1 2 3 4 5 * * * * * * * ********* * * * * * * * * * * * * * * * * * * * Example Menu: A. Pattern 1 B. Pattern 2 C. Pattern 3 E. Exit Note: You MUST NOT hardcode the patterns and you have to use loops (or nested loops) to print the patterns of given size. Be sure to print the empty spaces appropriately to make the pattern look like the ones shown aboveStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started