This competency assessment assesses the following Outcome(s):
N300M2-2: Apply da
This competency assessment assesses the following Outcome(s):
N300M2-2: Apply data collections, including arrays, lists and key-value pairs, in each language.
GEL-1.02: Demonstrate college-level communication through the composition of original materials in Standard English.
Purpose
In Part 1, you will write programs using Java, Python, and R to use common data collections in each language. For Java, you will use the ArrayList, for Python you will use lists within lists, or sublists, and in R you will create a vector and matrix. Each will print out the contents of the data collection used.
For Part 2, you will write programs using Java, Python, and R to use common data collections in each language. For Java, you will use enumerations, for Python you will use sets and dictionaries, and in R you will create lists and data frames. Each will print out the contents of the data collection used.
Part 3 requires you to compose a report covering data collections for each language. The target audience for the report should be programmers who need an understanding of data collections and how they work for each language. It also fulfills the university-mandated communication requirement for the course.
Instructions
Part 1: Introduction to Data Collections
You must have Java, Eclipse, Python, PyCharm, R, and RStudio installed to perform this part of the assessment. The free editions should have been installed earlier in the course.
Complete the following:
For each of the following actions, use the appropriate language to complete a solution.
Please copy the numbered action into your Microsoft Word document.
For items 1–4 below, provide the actual code files and a screenshot of the execution of
each. Be sure to respond to item 5.
Start a next action on a new page.
For each language and using the values:
locomotive1=steam
locomotive2=diesel
locomotive3=electric
locomotive4=coal
locomotive5=wood
common=combined engines
Write a Java program, using ArrayList, and input the above data. Then loop through the values and print them all.
Write a Python program that uses sublists with the above data. Then loop though the list and print the values.
Write an R program that uses a Vector, input the values above and print the results.
Using R, create a matrix with six rows using the above data. Label the column header with “Train Type”.
Explain which data collection was the easiest to code and which was the most difficult. Pick one of each and explain why.
Place your screenshots and responses in a Microsoft Word document. Be sure to include the .R files with your code for the R portions.
Part 2: Advanced Data Collections
You must have Java, Eclipse, Python, PyCharm, R, and RStudio installed to perform this part of the assessment.
Complete the following:
For each of the following actions, use the appropriate language to complete a solution.
Please copy the numbered action into your Microsoft Word document.
For items 1–5 below, provide the actual code files and a screenshot of the execution of
each.
Start a next action on a new page.
Using Java, create an enumeration, called Packet, consisting of SOURCE_IP, DESTINATION_IP, PROTOCOL, and INFO. Use the values() method to loop through the enumeration. In that loop print each value and index using the ordinal() method.
As part of the mastery requirements for this Competency Assessment, complete the following boldfaced item:
Using the requirements for Step 1 above, write code in Java, that adds another value to the enumeration. The value and index are printed using ordinal(). The output is meaningful to the data.
Using Java and the same enumeration specifics above, create a program that compares the ordinal place for five values. Use the following:
p1 = Packet.INFO;
p2 = Packet.DESTINATION_IP;
p3 = Packet.PROTOCOL;
p4 = Packet.SOURCE_IP;
p5 = Packet.INFO;
Using the compareTo() method, check if p1 comes before or after p3. Then compare p1 to p5 to see if they are equal.
Using Python, create a set with the following specifics:
mySet = set({100,200,300,400,500})
Using ,mySet, print the set. Then add the following to the set: 150, 250, 350, 400. Print again and compare the output.
You should see the value of the set because 400 still appears once since duplicates are not allowed.
Remove 150, 250, and 350 from the set and print again.
Using Python, create a dictionary for the following: SOURCE_IP: 209.99.66.22
DEST_IP: 192.168.0.12
PROTOCOL: UDP
INFO: LEN=1068
Loop through the dictionary and print the key:value pairs.
As part of the mastery requirements for this Competency Assessment, complete the following boldfaced item:
Using the requirements for Step 4 above, write code, that adds dictionary value of TIME: 0.34153434562
Using R, create a data frame using the following: SOURCE_IP: 209.99.66.22, 209.99.66.100, 192.168.1.3
DEST_IP: 192.168.0.12, 209.99.66.222, 192.168.0.44
PROTOCOL: UDP, ICMP, TCP
INFO: LEN=1068, Destination Unreachable, Len=128
Then subset the SOURCE_IP as a list.
Subset the SOURCE_IP and DEST_IP as a matrix.
Finally, filter the PROTOCOL row to see if UDP is in it.
Print the output of each.
As part of the mastery requirements for this Competency Assessment, complete the following boldfaced item:
Using the requirements for Step 5 above, write code, in R, that subsets SOURCE_IP, DEST_IP, and PROTOCOL as a matrix.
Place your screenshots and responses in a Microsoft Word document. Be sure to include the .java files with your code for the Java portions.
Part 3: Data Collections Report
Based on the knowledge you have achieved thus far in this class, compose an informative report, in Microsoft Word, covering the various data collection types that you have covered for R, Python, and Java. Your paper should follow APA guidelines and be 3–5 pages in length, not including the required title and reference pages. Provide technical details since this report will be for programmers who will need to know the specific technical aspects of each language. In the report, summarize the concepts you have covered thus far in class. Include the different data collections by explaining their purpose and provide examples where necessary. Your report must include title and reference pages. You must have at least three references. Make sure to follow the most current APA guidelines.
Report Parameters/Expectations:
Include a title page and reference page.
Written work is provided in Standard English.
At least 3 pages in length, not counting the title slide and reference page.
Includes a highly developed viewpoint, purpose and exceptional written content.
Writing demonstrates superior organization, is well ordered, logical, and unified.
Free of written grammar, punctuation, and spelling errors.
No evidence of plagiarism.
At least 3 outside references on the topic of data concepts in addition to the text.
Make sure that the reference page is in the latest APA edition style.
Your submission for this part should meet any stated specifications listed above.
Place your screenshots and responses in a Microsoft® Word® document. Be sure to include the .py files with your code for the Python portio