repositories
/
TP_POO.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TP2: Add code skeleton for the Compactable interface.
[TP_POO.git]
/
Piles
/
Pile.java
diff --git
a/Piles/Pile.java
b/Piles/Pile.java
index 565432498d47f40d52ead6fe175e57bb81fcb85a..e2cc0c470486d69833d790c5e157b867f128fed9 100644
(file)
--- a/
Piles/Pile.java
+++ b/
Piles/Pile.java
@@
-8,32
+8,32
@@
public class Pile {
private int stack_head_index;
/**
private int stack_head_index;
/**
- *
[setSize description]
- * @param int size
[description]
+ *
set the size of the internal array
+ * @param int size
the size of the array
*/
private void setSize(int size) {
array_size = size;
}
/**
*/
private void setSize(int size) {
array_size = size;
}
/**
- *
[getSize description]
- * @return
[description]
+ *
get the size of the internal array
+ * @return
the integer size of the internal array
*/
private int getSize() {
return array_size;
}
/**
*/
private int getSize() {
return array_size;
}
/**
- *
[setHeadIndex description]
- * @param int index
[description]
+ *
set the stack head index
+ * @param int index
the stack head index
*/
private void setHeadIndex(int index) {
stack_head_index = index;
}
/**
*/
private void setHeadIndex(int index) {
stack_head_index = index;
}
/**
- *
[getHeadIndex description]
- * @return
[description]
+ *
get the stack head current index
+ * @return
the integer stack head index
*/
private int getHeadIndex() {
return stack_head_index;
*/
private int getHeadIndex() {
return stack_head_index;
@@
-95,7
+95,7
@@
public class Pile {
* [afficher description]
*/
public void afficher() {
* [afficher description]
*/
public void afficher() {
- for (int i = 0; i < get
Size
(); i++) {
+ for (int i = 0; i < get
HeadIndex
(); i++) {
System.out.println("element " + i + " " + int_array[i]);
}
}
System.out.println("element " + i + " " + int_array[i]);
}
}