I apologise in advance if it becomes too long to read.The question I have to solve is :
"During his completely miserable life, pirate Abraham Blaufelt has been in search of the lost treasure of Atlantis. On a very fortunate day in the year of the Lord 1642 he enters an abandoned cathedral of a long gone sect in the ancient forests of Poland. Inside he finds a mysterious ancient parchment. The parchment reads:
Traveler, if you want to reach thine goal, trace the path through seas by making the broken, whole.
5,4 4,5 8,7
Add behind 6,3 3,2 9,6 4,3
Add in front 7,6
Add behind 9,8
Add in front 5,5 7,8 6,5 6,4
Abraham Blaufelt immediately knew what he was dealing with. A puzzel of which the result is a safe route to the treasure. This route was essential, the sea was crawling with monsters in those days. Since this most fortunate day, almost four hundred years ago, the european tectonic plate has shifted signifi- cantly. As a result all coordinates have to be shifted by (1, 0).
Write a program that solves this puzzle. This has to be done in the following way: Start with the coordinates on the first row, add the coordinates of the second row at the back, then add the coordinates of the third row in front etc. Make a new Coordinate and CoordinateRow class for this assignment. The latter class has methods to add a CoordinateRow in front or at the back and methods to add a single Coordinate at the front or at the back. The coordinates of the puzzle are
5,4 4,5 8,7=6,3 3,2 9,6 4,3=7,6=9,8=5,5 7,8 6,5 6,4
Every CoordinateRow is seperated from another by an '='. Every coordinate in a row is seperated by a space. The x and y values of a coordinate are seperated by a comma. After all data has been read, the program will print the treasure route on the standard output. The correct route as out put would be:
6,5
8,8
7,5
7,4
8,6
6,4
5,5
9,7
7,3
4,2
10,6
5,3
10,8
End of question."
I mean I do know that they want me to create classes but what I don't understand is how do i make methods that will add behind or in front of arrays.
I would highly appreciate your help.I am a beginner and never programmed some thing like this thats why asking for some help.
Thanks in advance.