Question: Question 2: Modify the program from lab 1 so that it prompts the user for a 5-digit positive integer with any number of digits up

 Question 2: Modify the program from lab 1 so that it

prompts the user for a 5-digit positive integer with any number of

Question 2: Modify the program from lab 1 so that it prompts the user for a 5-digit positive integer with any number of digits up to 9. The program should then display their integer as a big banner. PART A: Modify the below test class StarDisplayTest so that it can prompt the user to enter a 5-digit positive integer, and pass the integer as a parameter to the method displayStar (int number) defined in the class StarDisplay. (Note: Do not worry about invalid inputs.) import java.Util.Scanner public class StarDisplayTest f public static void main (String args[]) int a; StarDisplay s = new StarDisplay( ); //prompt the user to enter a 5-digit positive integer //and initialize the above variable a: s.displayStar (a) PART B: Modify the code below, complete the method displayStar (int number) to extract 5 digits and call displayStarHelper (int i) to display them as a big banner (Hint: you can extract these digits using the / and % operation) PART C: Complete a method displayStarHelper (int i) so that it can display a digit passed as the parameter. (Hint: You can use IF statement to display the digit as a banner.) For example if the user enters 52612 the program should display

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!