Question: I need help making a flow chart for this Java Program. Here's the code: package fProjectTravel; import java.util.*; import java.util.Queue; import java.util.LinkedList; public class fProjectTravel

I need help making a flow chart for this Java Program.

Here's the code:

package fProjectTravel;

import java.util.*;

import java.util.Queue;

import java.util.LinkedList;

public class fProjectTravel

{

public static void main (String [] args)

{

String [] trips;

trips = new String [5];

trips [0] = "Trip 1: ";

trips [1] = "Trip 2: ";

trips [2] = "Trip 3: ";

trips [3] = "Trip 4: ";

trips [4] = "Trip 5: ";

Queue customer = new LinkedList <> ();

Queue dates = new LinkedList <> ();

//names of customers

customer.add("CUSTOMER: Perez, Christian ");

customer.add("CUSTOMER: Maraj, Onika ");

customer.add("CUSTOMER: Zolanski, Roman");

customer.add("CUSTOMER: Zolanski, Martha ");

customer.add("CUSTOMER: Yang, Christina ");

customer.add("CUSTOMER: Knowles, Beyonc ");

customer.add("CUSTOMER: Fierce, Sasha ");

//holiday dates

dates.add(" DATE: Spring Break ");

dates.add(" DATE: Summer Break ");

dates.add(" DATE: Thanksgiving ");

dates.add(" DATE: Christmas ");

dates.add(" DATE: New Years Day ");

//stack for locations

Stack location = new Stack ();

location.push("LOCATION: New York ");

location.push("LOCATION: Los Angeles ");

location.push("LOCATION: Paris ");

location.push("LOCATION: London ");

location.push("LOCATION: Tokyo ");

location.push(" LOCATION: Moscow ");

location.push(" LOCATION: Dubai );

location.push( LOCATION: Cancun ");

location.push(" LOCATION: Toronto ");

location.push(" LOCATION: Rio De Janeiro ");

//outputs, interactive with user

System.out.println(trips [0] + customer.peek() + dates.peek() + location.peek());

location.pop();

customer.remove();

dates.remove();

System.out.println(trips [1] + customer.peek() + dates.peek() + location.peek());

location.pop();

customer.remove();

dates.remove();

System.out.println(trips [2] + customer.peek() + dates.peek() + location.peek());

location.pop();

customer.remove();

dates.remove();

System.out.println(trips [3] + customer.peek() + dates.peek() + location.peek());

location.pop();

customer.remove();

dates.remove();

System.out.println(trips [4] + customer.peek() + dates.peek() + location.peek());

}

}

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!