-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReorder.java
40 lines (35 loc) · 1.35 KB
/
Reorder.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// CS 0445 Spring 2015
// Assignment 1 Reorder interface
// Carefully read the specifications for the methods below and
// implement them in your MultiDS class. As with the PrimQ
// interface, don't worry as much about efficiency here as you do
// about correctness.
/*
* Luke Kraus
* CS 0445
* John Ramerirez
* Tues/Thurs. 9:30-10:45
* Recitation- Thurs: 11-11:50
*
* This was also given to us and is used in the MultiDS
* */
public interface Reorder
{
// Logically reverse the data in the Reorder object so that the item
// that was logically first will now be logically last and vice
// versa. The physical implementation of this can be done in
// many different ways, depending upon how you actually implemented
// your physical MultiDS class
public void reverse();
// Remove the logical last item of the DS and put it at the
// front. As with reverse(), this can be done physically in
// different ways depending on the underlying implementation.
public void shiftRight();
// Remove the logical first item of the DS and put it at the
// end. As above, this can be done in different ways.
public void shiftLeft();
public void shuffle();
// Reorganize the items in the object in a pseudo-random way. The exact
// way is up to you but it should utilize a Random object (see Random in
// the Java API)
}