Hi guys,

This week Ive been given a problem to:

Take a set list of English phrases and convert them to a set list of pirate phrases.

i.e. Hello would be entered by the user and Ahoy would be printed etc.

My idea is to create two arrays, One will be called English and will hold the list of English words i.e.

String [] English = { Hello, Friend, Enemy }

Then ill create a second array called Pirate i.e.

String [] Pirate = {Ahoy, Matey, Scallwag }

So the idea will be that the index of the two arrays will correspond to one another i.e. String English[0] = String Pirate[0].

My ingestion is, how do I get my code to print my new array?
Like I know ill have to search my English array, find the index and then print the same index from the pirate array but Im not sure how to go about it.

Any help would be great.
Thanks in advance.
Dave

Oh, The other part to this problem which I cant seem to understand is how to use IO redirection for the problem.

WE are given the list of phrases that we need to use and are told to use IO redirection to run it but again im clueless

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.