public class OneliayNoRepeatslist public static int START_POSITION 1; public static int DEFAULT_SIZE = 50; private int countotEntries; //can be less than entry.length. private String[] entry: 7 + * Creates an empty Hist with a given capacity. public OnewayNoRepeatsList(int maximuwumberOfEntries) entry new String[maximumkumber Of Entries); countOfEntries e; public Oneway Nokepeatstise() entry = new String(DEFAULT SIZE): countOfEntries = "; or replace these the statements with this CEFALT SITE) 1 public boolean isFull) return countOfEntries se entry.length; > public boolean isEmpty) return countotries we .) Precondition at the full + Postconds tem was hot on the itu been added to the last public void additem(string item) 11 (lisonlist)) 11 (countorentzentry length) System out.println("Attert to add to full list Systet.exit(); le anticourtofintries] = TEM norint sen: I Normal 1 No Spac.. Paragraph otherwise, null is returned. / public String getEntryAt(int position) String result = null; 11 ((i > Found=true; else 1 > return found > public int getMaxinununberofEntries() return entry.length public int geterorenties) sont les 2 u vodi rointi Pal import java.util.Scanner; public class ListDemo [ public static final int MAX SIZE - 3; //Assumed > 0 public static void main(String[] args) OneWayNoRepeatslist toDoList - new OneWayNoRepeatslist(MAX_SIZE); System.out.println( "Enter items for the list, when prompted."); boolean moreEntries - true: String next = null; Scanner keyboard - new Scanner(System.in); while (moreEntries & ItoDoList.isFull) { System.out.printin("Enter an item: "); next- keyboard.nextLine(): toDoList.addItem(next): if (toDoList.isFullo) System.out.println("List is now full."); } else { System.out.print("More items for the list?): String ans keyboard.nextLine: ** (ans.trino.equalsignorecase("no")) moreEntries falses says no more System.out.println(The list contains:") in position toolist. START_POSITION: next + tobotist.getEntryAt{position); (next le null null indicates end of list System.out.printintnext); DOS 10 Toolist.getEntryAt(position): public class OneliayNoRepeatslist public static int START_POSITION 1; public static int DEFAULT_SIZE = 50; private int countotEntries; //can be less than entry.length. private String[] entry: 7 + * Creates an empty Hist with a given capacity. public OnewayNoRepeatsList(int maximuwumberOfEntries) entry new String[maximumkumber Of Entries); countOfEntries e; public Oneway Nokepeatstise() entry = new String(DEFAULT SIZE): countOfEntries = "; or replace these the statements with this CEFALT SITE) 1 public boolean isFull) return countOfEntries se entry.length; > public boolean isEmpty) return countotries we .) Precondition at the full + Postconds tem was hot on the itu been added to the last public void additem(string item) 11 (lisonlist)) 11 (countorentzentry length) System out.println("Attert to add to full list Systet.exit(); le anticourtofintries] = TEM norint sen: I Normal 1 No Spac.. Paragraph otherwise, null is returned. / public String getEntryAt(int position) String result = null; 11 ((i > Found=true; else 1 > return found > public int getMaxinununberofEntries() return entry.length public int geterorenties) sont les 2 u vodi rointi Pal import java.util.Scanner; public class ListDemo [ public static final int MAX SIZE - 3; //Assumed > 0 public static void main(String[] args) OneWayNoRepeatslist toDoList - new OneWayNoRepeatslist(MAX_SIZE); System.out.println( "Enter items for the list, when prompted."); boolean moreEntries - true: String next = null; Scanner keyboard - new Scanner(System.in); while (moreEntries & ItoDoList.isFull) { System.out.printin("Enter an item: "); next- keyboard.nextLine(): toDoList.addItem(next): if (toDoList.isFullo) System.out.println("List is now full."); } else { System.out.print("More items for the list?): String ans keyboard.nextLine: ** (ans.trino.equalsignorecase("no")) moreEntries falses says no more System.out.println(The list contains:") in position toolist. START_POSITION: next + tobotist.getEntryAt{position); (next le null null indicates end of list System.out.printintnext); DOS 10 Toolist.getEntryAt(position)