Question: Java BagList ADT. Write an example class by writing / completing all the methods in the photo. Use an ArrayList to hold raffle entry objects.
Java BagList ADT. Write an example class by writing / completing all the methods in the photo. Use an ArrayList

1. A constructor taking a single String parameter denoting the pathname to a file with which to seed the raffle with a number of entries. It DOES NOT throw any type of exception. public Raffle(String filePathName) The contents of the file are last name, first name and id, all of one line and separated by whitespace. A second no argument constructor that creates an empty raffle. 2. An addEntry method that adds a single Entry object to the raffle. Duplicate entries are not permitted (see item 5 below). public boolean addEntry(Entry entry) 3. A combine method that adds all the Entry objects in one raffle to this raffle. Duplicate entries (see below) are not permitted and should be ignored. public void combine(Raffle other) 4. An pickWinners method that returns a List of winning entries. Winning entries are chosen at random and removed from the Raffle collection. public List
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
