Question: Hey Guys, I'm taking Intro to Programming as an elective - I have NO idea how to do this HW problem. Any help would be
Hey Guys, I'm taking Intro to Programming as an elective - I have NO idea how to do this HW problem. Any help would be appreciated
(Use 3 functions from your psuedocode/flow sheet)

Implement your algorithms with three methods for this phase. The methods should behave as described in phase 1. The forward method should wrap around when it reaches the last number, the backward method should stop when it reaches the first number.
Add the MIN_NUMBER and MAX_NUMBER constants at the top of your class, you will also need to add a global variable at the top of your class:
final static int MIN_NUMBER = 1; final static int MAX_NUMBER = 8; static int image_number = 1;
The forward() and backward() methods MUST use an input parameter and output a return value, they DO NOT use the above global variable image_number directly, but they should use the constants . The methods are very simple, when the current image number is 3 forward changes it to a 4 and returns it. When the current image number is 6 backward() changes it to a 5 and returns it. The method createFileName() will take a number as input, and returns a String containing a file name like "pictureX.gif". The method createRandomName() has no input, and returns a String containing a file name like "pictureX.gif".
Implement the following methods
public static int forward ( int current_number ) { // return the new image number } public static int backward ( int current_number ) { // return the new image number } // use the constants MIN_NUMBER, MAX_NUMBER, do not use hard coded 1 or 8 public static String createFileName ( int current_number ) { // return a filename like pictureX.gif } public static String createRandomName ( ) { // return a filename like pictureX.gif // using a RANDOM number between MIN_NUMBER and MAX_NUMBER } public static void showMenu ( ) { // write a loop // Display a menu, with options 1 .. N for each method above, and an exit option // get user input and call the correct method using a SWITCH // print out the NEW image number everytime the value changes } public static void main ( String [] args) { // call showMenu } The menu should have options for calling forward(), backward(), createFileName () and createRandomName ( ). Be sure to use a parameter when calling the functions, then use the return value to update the global image number. At this point, your program will show the menu, call the methods and print onto the console the new image number everytime it changes.
Flow Chart START) FORWARD ALGORITHM PSEUDO CODE It include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
