Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Background to the assignment: -Each \"message\" is called \"FX_Inbound_MessageID

ID: 664553 • Letter: B

Question

Background to the assignment:

-Each "message" is called "FX_Inbound_MessageID.msg" (ex:FX_Inbound_UD19086824.msg).

-Each direcctory is named after the date as DDMMYYYY. (ex: /data1/Inbound/07072015)

-Each message has a subject and datatype that is changed depending on which one is hashed and which isn't.

The part I'm stuck at: The below code works as it is. I'm trying to change the script (pasted below) to have the following psedu code implemented: What I know needs to happen is there needs to be an array of dates (simmilar to the array of messageIDs) that are looped through. Certain dates (or directories) only have certain messages within them, but the script can only run once. So, when ran, the script will go into a directory (based on the first date), if it finds a message from the array of messages, it corrects it, then moves on (from directory to directory) until all messages have been corrected.

while !allMessagesFound
foreach dateDirectory
if messageFile found
correct envelope

Please write the code clearly and correctly(in Bash Script Formatting) for full points. Thank you.

Explanation / Answer

public class DoWhileExample {

  public static void main(String[] args) {

  /*

* Do while loop executes statment until certain condition become false.

* Syntax of do while loop is

*

* do

* <loop body>

* while(<condition>);

*

* where <condition> is a boolean expression.

*

* Please not that the condition is evaluated after executing the loop body.

* So loop will be executed at least once even if the condition is false.

*/

  int i =0;  

  do

  {

  System.out.println("i is : " + i);

i++;

  }while(i < 5);

  }

}