<jupyter_start><jupyter_text>Lab Five---For this lab we're going to be messing around with our Linear Data Types!Our Goals are:- Creating an Array- Creating an ArrayList- Creating an LinkedList- Creating an Queue- Creating an Stack Please show the ability to:- Create these data types- Populate the data types- Print out the Linear Data Types<jupyter_code>// Importing all of my objects
import java.util.Arrays;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Queue;
import java.util.PriorityQueue;
import java.util.Stack;
// Create an Array, Populate it, and Print it out
String[] dwarves = {"Happy", "Sleepy", "Sneezy", "Grumpy", "Bashful", "Dopey", "Doc"};
System.out.println(Arrays.toString(dwarves));
// Create an ArrayList, Populate it, and Print it out
ArrayList<String> dwarves = new ArrayList<String>();
dwarves.add("Happy");
dwarves.add("Sleepy");
dwarves.add("Sneezy");
dwarves.add("Grumpy");
dwarves.add("Bashful");
dwarves.add("Dopey");
dwarves.add("Doc");

System.out.println(dwarves);
// Create an LinkedList, Populate it, and Print it out
LinkedList<String> dwarves = new LinkedList<String>();
dwarves.add("Happy");
dwarves.add("Sleepy");
dwarves.add("Sneezy");
dwarves.add("Grumpy");
dwarves.add("Bashful");
dwarves.add("Dopey");
dwarves.add("Doc");

System.out.println(dwarves);
// Create an Queue, Populate it, and Print it out
Queue<String> dwarves = new LinkedList<String>();
dwarves.add("Happy");
dwarves.add("Sleepy");
dwarves.add("Sneezy");
dwarves.add("Grumpy");
dwarves.add("Bashful");
dwarves.add("Dopey");
dwarves.add("Doc");

System.out.println(dwarves);

Queue<String> dwarves = new PriorityQueue<String>();
dwarves.add("Happy");
dwarves.add("Sleepy");
dwarves.add("Sneezy");
dwarves.add("Grumpy");
dwarves.add("Bashful");
dwarves.add("Dopey");
dwarves.add("Doc");

System.out.println(dwarves);
// Create an Stack, Populate it, and Print it out
Stack<String> dwarves = new Stack<String>();
dwarves.push("Happy");
dwarves.push("Sleepy");
dwarves.push("Sneezy");
dwarves.push("Grumpy");
dwarves.push("Bashful");
dwarves.push("Dopey");
dwarves.push("Doc");

System.out.println(dwarves);<jupyter_output>[Happy, Sleepy, Sneezy, Grumpy, Bashful, Dopey, Doc]
{'fraction_non_alphanumeric': 0.17217942908926145, 'fraction_numerical': 0.0, 'mean_word_length': 6.640138408304498, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '122651', 'license': 'MIT', 'n_tokens_mistral': 825, 'n_tokens_neox': 787, 'n_words': 189, 'path': 'JupyterNotebooks/Labs/Lab 5 Solution.ipynb', 'repo_name': 'Julia-Mangan/CMPT-220L-903-21S', 'size': '2207'}