CS602 – Data-Driven Development with Python Fall 2020 Programming Assignment 2 1

CS602 – Data-Driven Development with Python Fall 2020
Programming Assignment 2
1
Programming Assignment 2
Getting started
Complete the reading and practice assignments posted on the course schedule. Review class handouts and examples. This assignment requires knowledge of String methods and conditional (if-) statements. Before you learn about conditionals, you can still work on this problem, figuring out, for example, how to extract the different fields, once you’ve determined the type of reference.
Programming Project: Citations worth: 20 points
Parse a list of citation strings.
Google Scholar is an online search engine for scholarly literature. It works by locating books, articles, patents and other published works available online. By parsing the reference lists in these sources, it discovers new papers and calculates citation counts. In this assignment, you will work on implementing a part of this functionality, namely, parsing the text of references in APA 1 format (a widely used publication style) to separate the values of specific fields.
APA formatting style defines the ways in which different content sources (books, articles, websites, movies, etc.) are referenced when they are cited. In this assignment you will work with APA style for books, magazine articles and journal articles. A figure on the next page presents format specifications and examples. The specifications detail the order and format in which the source data is presented in APA style.
The program that you write must read a citation of a book, magazine article or a journal article in the APA style and output
– the category (book, magazine article or a journal article) of the referenced item,
– a list of source components, separated by field,
as shown in the interactions below.
The following three interactions demonstrate three different runs of the program. First, a book reference:
Please enter a reference
Finney, J. (1970). Time and again. New York, NY: Simon and Schuster
BOOK———————————
AUTHORS: Finney, J.
TITLE: Time and again.
YEAR: 1970
MONTH:
PUBLICATION TITLE:
VOLUME:
ISSUE:
PAGES:
PUBLISHER: Simon and Schuster
ADDRESS: New York, NY
————————————————– 1APA – American Psychological Association
CS602 – Data-Driven Development with Python Fall 2020
Programming Assignment 2
2
Citing a book in print Format:
AUTHORS (YEAR OF PUBLICATION). TITLE. PUBLISHER CITY, STATE: PUBLISHER Examples: Finney, J. (1970). Time and again. New York, NY: Simon and Schuster Case, L. P., Daristotle, L., Hayek, M. G., & Raash, M. F. (2011). Canine and feline nutrition: A resource for companion animal professionals. Maryland Heights, MO: Mosby Calfee, R. C., & Valencia, R. R. (1991). APA guide to preparing manuscripts for journal publication. Washington, DC: American Psychological Association
Citing a magazine article in print Format: (pp denotes a page number)
AUTHORS (YEAR, MONTH OF PUBLICATION). ARTICLE TITLE. MAGAZINE TITLE, VOLUME(ISSUE), PP – PP
or
AUTHORS (YEAR, MONTH OF PUBLICATION). ARTICLE TITLE. MAGAZINE TITLE, VOLUME(ISSUE), PP Examples: Tumulty, K. (2006, April). Should they stay or should they go? Time, 167(15), 3-40 Gross, A., & Murphy, E. (2010, January/February). Seal of disapproval. The Environmental Magazine, 21(1), 34-37 Barone, M. (2014, December). The experience factor. US News & World Report, 141(24), 26 Citing a journal article in print Format: (pp denotes a page number)
AUTHORS (PUBLICATION YEAR). ARTICLE TITLE. PERIODICAL TITLE, VOLUME(ISSUE), PP-PP
or
AUTHORS (PUBLICATION YEAR). ARTICLE TITLE. PERIODICAL TITLE, VOLUME(ISSUE), PP Examples:
Bailey, N.W. (2012). Evolutionary models of extended phenotypes. Trends in Ecology & Evolution, 27(3), 561-569 Pempek, T.A., Yermolayeva, Y.A., & Calvert, S.L. (2009). College students’ social networking experiences on Facebook. Journal of Applied Developmental Psychology, 3(2), 227-238
CS602 – Data-Driven Development with Python Fall 2020
Programming Assignment 2
3
The next interaction shows a magazine article.
Please enter a reference
Tumulty, K. (2006, April). Should they stay or should they go? Time, 167(15), 3-40
MAGAZINE ARTICLE———————————
AUTHORS: Tumulty, K.
TITLE: Should they stay or should they go?
YEAR: 2006
MONTH: April
PUBLICATION TITLE: Time
VOLUME: 167
ISSUE: 15
PAGES: 3-40
PUBLISHER:
ADDRESS: ————————————————– And finally, a journal article.
Please enter a reference
Pempek, T.A., Yermolayeva, Y.A., & Calvert, S.L. (2009). College students’ social networking experiences on Facebook. Journal of Applied Developmental Psychology, 3(2), 227-238
JOURNAL ARTICLE———————————
AUTHORS: Pempek, T.A., Yermolayeva, Y.A., & Calvert, S.L.
TITLE: College students’ social networking experiences on Facebook.
YEAR: 2009
MONTH:
PUBLICATION TITLE: Journal of Applied Developmental Psychology
VOLUME: 3
ISSUE: 2
PAGES: 227-238
PUBLISHER:
ADDRESS:
————————————————–
Important Simplifications: regarding the input that I will use to test your code:
– Only valid data will be entered as input.
– Each reference will use a single space as separator between words.
– The title will always consist of a single sentence will not have any parentheses, and will end with a period, an exclamation symbol or a question mark.
– Publisher name will not contain any commas.
Regarding the output:
– The output must list the category in the first line, and all fields, including those not specified in the reference, in the order shown.
– Field names should line up on the right side, as shown.
CS602 – Data-Driven Development with Python Fall 2020
Programming Assignment 2
4
Hints:
– Books are distinguished from journal and magazine articles by the absence of the second set of parentheses around the issue number.
– The easiest way to tell a magazine article is by noting that its publication date contains a month specification spelled with letters, whereas book and journal references only specify the year.
Note that the authors, date and title fields are common for all three categories and they appear in the same order in all three categories of references. Likewise, magazine and journal articles have the same structure starting from the title. For simplicity, structure your code to capture these commonalities and avoid repeating the code that performs the same function.
I will provide a file with sample references for you to test your program. You can find or create other APA style references to test your code further, but make sure you pick ones that conform to the notes about input I listed above.
Grading
The grading schema for this project is roughly as follows:
Your program should compile without syntax errors to receive any credit. If a part of your program is working, you will receive partial credit, but only if the program compiles without syntax errors.
• 1 point will be awarded for correctly handling the input
• 3 points for correct format and order of the fields in the output
• 5 points will be awarded for the correct determination of the category
• 2 points will be awarded for good programming style, as defined in handout 1.
• Correct parsing will take the rest of the points.
Your program should use only String processing functions and conditionals introduced in the course; using other, more advanced methods for string parsing will result in reduction of your grade.
Created by Tamara Babaian on September 8, 2020


Buy plagiarism free, original and professional custom paper online now at a cheaper price. Submit your order proudly with us

Essay Hope