Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Commits on Source (36)
Showing
with 267 additions and 0 deletions
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk-13.0.2">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="Common"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>P4a</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=15
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=15
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=15
package PersonalStructure;
public class ChainedList {
}
package PersonalStructure;
public class Cursor {
}
package PersonalStructure;
public class Link {
}
package StandardStructure;
import defaultpackage.Structure;
import java.util.ArrayList;
import java.util.Random;;
public class ArrayListC implements Structure
{
protected ArrayList<Integer> arrayList;
public ArrayListC(int nbValue)
{
Random rnd = new Random();
for(int i = 0; i <= nbValue; i++)
{
Add(rnd.nextInt());
}
}
@Override
public void Add(int value)
{
arrayList.add(value);
}
@Override
public void Remove(int index) throws Exception
{
try
{
arrayList.remove(index);
}
catch(IndexOutOfBoundsException e)
{
throw new Exception("L'index dfini ne se situe pas dans les bornes du tableau");
}
}
@Override
public int Select(int index) throws Exception
{
try
{
return arrayList.get(index);
}
catch(IndexOutOfBoundsException e)
{
throw new Exception("L'index dfini ne se situe pas dans les bornes du tableau");
}
}
}
package StandardStructure;
public class ArrayListWrapper {
}
package StandardStructure;
import java.util.LinkedList;
import java.util.Random;
import defaultpackage.Structure;
public class LinkedListC implements Structure
{
LinkedList<Integer> linkedList;
public LinkedListC(int nbValue)
{
Random rnd = new Random();
for(int i = 0; i <= nbValue; i++) {
Add(rnd.nextInt());
}
}
@Override
public void Add(int value) {
// TODO Auto-generated method stub
linkedList.add(value);
}
@Override
public void Remove(int index) throws Exception {
// TODO Auto-generated method stub
try
{
linkedList.remove(index);
}
catch(IndexOutOfBoundsException e)
{
throw new Exception("L'index dfini ne se situe pas dans les bornes du tableau");
}
}
@Override
public int Select(int index) throws Exception
{
// TODO Auto-generated method stub
try
{
return linkedList.get(index);
}
catch(IndexOutOfBoundsException e)
{
throw new Exception("L'index dfini ne se situe pas dans les bornes du tableau");
}
}
}
package StandardStructure;
public class LinkedListWrapper {
}
package StandardStructure;
import java.util.Random;
import defaultpackage.Structure;
public class Table implements Structure
{
Integer[] tab;
public Table(int nbValue)
{
Random rnd = new Random();
tab = new Integer[nbValue];
for(int i = 0; i <= nbValue; i++)
{
tab[i] = rnd.nextInt();
}
}
@Override
public void Add(int value) {
// TODO Auto-generated method stub
Integer[] temp = new Integer[tab.length + 1];
for(int i = 0; i < tab.length; i++) {
temp[i] = tab[i];
}
temp[temp.length] = value;
tab = temp;
}
@Override
public void Remove(int index) throws Exception
{
// TODO Auto-generated method stub
try
{
tab[index] = null;
}
catch(IndexOutOfBoundsException e)
{
throw new Exception("L'index dfini ne se situe pas dans les bornes du tableau");
}
}
@Override
public int Select(int index) throws Exception
{
// TODO Auto-generated method stub
try
{
return tab[index];
}
catch(IndexOutOfBoundsException e)
{
throw new Exception("L'index dfini ne se situe pas dans les bornes du tableau");
}
}
}
package StandardStructure;
public class TableWrapper {
}
package defaultpackage;
public interface Structure
{
boolean wantTab = false;
boolean wantArray = false;
boolean wantLinked = false;
boolean wantMaillon = false;
public static void GenerateTab(boolean wantTab, boolean wantArray, boolean wantLinked, boolean wantMaillon)
{
}
public void Add(int value);
public void Remove(int index) throws Exception;
public int Select(int index) throws Exception;
}
File added
File added
File added
File added
File added
File added
File added