From: Jérôme Benoit Date: Fri, 9 Feb 2018 09:32:56 +0000 (+0100) Subject: Include everything in the same class. X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=aac9e71b77c7081fc2689fa2bb55c932739f3776;p=TP_POO.git Include everything in the same class. Signed-off-by: Jérôme Benoit --- diff --git a/Listes/Liste.java b/Listes/Liste.java index 6dd1c5f..711b983 100644 --- a/Listes/Liste.java +++ b/Listes/Liste.java @@ -1,38 +1,39 @@ -class IntNode { - private int data; - private IntNode next; +public class Liste { - IntNode(int value) { - setData(value); - setNext(null); - } + private class IntNode { + private int data; + private IntNode next; - IntNode(int value, IntNode nextNode) { - setData(value); - setNext(nextNode); - } + IntNode(int value) { + setData(value); + setNext(null); + } - public int getData() { - return data; - } + IntNode(int value, IntNode nextNode) { + setData(value); + setNext(nextNode); + } - public void setData(int value) { - data = value; - } + private int getData() { + return data; + } - public IntNode getNext() { - return next; - } + private void setData(int value) { + data = value; + } - public void setNext(IntNode nextNode) { - next = nextNode; - } + private IntNode getNext() { + return next; + } -} + private void setNext(IntNode nextNode) { + next = nextNode; + } + + } -class Liste { private IntNode headNode; private int list_counter;