Question: ss D Question 9 20 pts For this question, we are going to use an idea known as parallel lists to store two different pieces
ss
D Question 9 20 pts For this question, we are going to use an idea known as "parallel lists" to store two different pieces of information. This isn't the best way to implement what I'm asking, but we haven't talked about the data structures that would be better yet! Create a class called SantasList that has two fields, both of which should be ArrayLists. The first list should contain strings that are the names of children (don't worry about creating a separation between first and last name). The second list should contain Boolean values, where true equates to nice and false equates to naughty. The class should *not* include getters and setters for the two lists. Instead, include and implement the following two functions: * Adds a child's name and whether they were naughty or nice to the list epostcond [adds a child's name and nice-ness to the list] private static void addChild(String name, Boolean isNice) and * Prints each child's name, along with either "naughty" or "nice", followed by a new 1 ine * epostcond [On each line prints a child's name and nice-ness until the whole list has been printed] private static void printList() Edit View Insert Format Tools Table 12pt " Paragraph ~ | B I Y A ~ Z~ ~ | : D |0words +Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
