-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a full version of the cs101F2019_practical10.
- Loading branch information
Showing
1 changed file
with
340 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,340 @@ | ||
\documentclass[11pt]{article} | ||
|
||
% NOTE: The "Edit" sections are changed for each assignment | ||
|
||
% Edit these commands for each assignment | ||
|
||
\newcommand{\assignmentduedate}{December 9} | ||
\newcommand{\assignmentassignedate}{December 6} | ||
\newcommand{\assignmentnumber}{Nine} | ||
|
||
\newcommand{\labyear}{2019} | ||
\newcommand{\labday}{Friday} | ||
\newcommand{\labdueday}{Monday} | ||
\newcommand{\labtime}{9:00 am} | ||
|
||
\newcommand{\assigneddate}{Assigned: \labday, \assignmentassignedate, \labyear{} at \labtime{}} | ||
\newcommand{\duedate}{Due: \labdueday, \assignmentduedate, \labyear{} at \labtime{}} | ||
|
||
% Edit these commands to give the name to the main program | ||
|
||
\newcommand{\mainprogram}{\lstinline{WordCount}} | ||
\newcommand{\mainprogramsource}{\lstinline{src/main/java/practicalnine/count/WordCount.java}} | ||
|
||
% Edit these commands to give the main program's output details | ||
|
||
\newcommand{\mainprogramoutput}{four} | ||
|
||
% Edit this commands to describe key deliverables | ||
|
||
\newcommand{\reflection}{\lstinline{writing/reflection.md}} | ||
|
||
% Commands to describe key development tasks | ||
|
||
% --> Running gatorgrader.sh | ||
\newcommand{\gatorgraderstart}{\command{gradle grade}} | ||
\newcommand{\gatorgradercheck}{\command{gradle grade}} | ||
|
||
% --> Compiling and running and testing program with gradle | ||
\newcommand{\gradlebuild}{\command{gradle build}} | ||
\newcommand{\gradletest}{\command{gradle test}} | ||
\newcommand{\gradlerun}{\command{gradle run}} | ||
|
||
% Commands to describe key git tasks | ||
|
||
% NOTE: Could be improved, problems due to nesting | ||
|
||
\newcommand{\gitcommitfile}[1]{\command{git commit #1}} | ||
\newcommand{\gitaddfile}[1]{\command{git add #1}} | ||
|
||
\newcommand{\gitadd}{\command{git add}} | ||
\newcommand{\gitcommit}{\command{git commit}} | ||
\newcommand{\gitpush}{\command{git push}} | ||
\newcommand{\gitpull}{\command{git pull}} | ||
|
||
\newcommand{\gitcommitmainprogram}{\command{git commit src/main/java/practicalseven/list/DoublyLinkedList.java -m "Your | ||
descriptive commit message"}} | ||
|
||
% Use this when displaying a new command | ||
|
||
\newcommand{\command}[1]{``\lstinline{#1}''} | ||
\newcommand{\program}[1]{\lstinline{#1}} | ||
\newcommand{\url}[1]{\lstinline{#1}} | ||
\newcommand{\channel}[1]{\lstinline{#1}} | ||
\newcommand{\option}[1]{``{#1}''} | ||
\newcommand{\step}[1]{``{#1}''} | ||
\usepackage{pifont} | ||
\newcommand{\checkmark}{\ding{51}} | ||
\newcommand{\naughtmark}{\ding{55}} | ||
\usepackage{listings} | ||
\lstset{ | ||
basicstyle=\small\ttfamily, | ||
columns=flexible, | ||
breaklines=true | ||
} | ||
\usepackage{fancyhdr} | ||
\usepackage[margin=1in]{geometry} | ||
\usepackage{fancyhdr} | ||
\pagestyle{fancy} | ||
\fancyhf{} | ||
\rhead{Computer Science 101} | ||
\lhead{Practical Assignment \assignmentnumber{}} | ||
\rfoot{Page \thepage} | ||
\lfoot{\duedate} | ||
\usepackage{titlesec} | ||
\titlespacing\section{0pt}{6pt plus 4pt minus 2pt}{4pt plus 2pt minus 2pt} | ||
\newcommand{\labtitle}[1] | ||
{ | ||
\begin{center} | ||
\begin{center} | ||
\bf | ||
CMPSC 101\\Data Abstraction\\ | ||
Fall 2019\\ | ||
\medskip | ||
\end{center} | ||
\bf | ||
#1 | ||
\end{center} | ||
} | ||
\begin{document} | ||
\thispagestyle{empty} | ||
\labtitle{Practical \assignmentnumber{} \\ \assigneddate{} \\ \duedate{}} | ||
\section*{Objectives} | ||
This assignment invites you to study the source code of a program that is | ||
inspired by one outlined in Chapter 10 of the textbook. Specifically, you will | ||
study the source code and output of the \mainprogram{} program that combines the | ||
use of the \program{Tree} and \program{HashMap} data structures. You will add | ||
comments to the source code that clearly explain how the provided program works. | ||
Interested students are also invited to add advanced features to this program | ||
that, for instance, display the word with the maximum appearance count or | ||
support the analysis of multiple input files. | ||
\section*{Suggestions for Success} | ||
\begin{itemize} | ||
\setlength{\itemsep}{0pt} | ||
\item {\bf Follow each step carefully}. Slowly read each sentence in the | ||
assignment sheet, making sure that you precisely follow each instruction. Take | ||
notes about each step that you attempt, recording your questions and ideas and | ||
the challenges that you faced. If you are stuck, then please tell a technical | ||
leader or instructor what assignment step you recently completed. | ||
\item {\bf Regularly ask and answer questions}. Please log into Slack at the | ||
start of a laboratory or practical session and then join the appropriate | ||
channel. If you have a question about one of the steps in an assignment, then | ||
you can post it to the designated channel. Or, you can ask a student sitting | ||
next to you or talk with a technical leader or the course instructor. | ||
\item {\bf Store your files in GitHub}. Starting with this laboratory | ||
assignment, you will be responsible for storing all of your files (e.g., Java | ||
source code and Markdown-based writing) in a Git repository using GitHub | ||
Classroom. Please verify that you have saved your source code in your Git | ||
repository by using \command{git status} to ensure that everything is updated. | ||
You can see if your assignment submission meets the established correctness | ||
requirements by using the provided checking tools on your local computer and | ||
in checking the commits in GitHub. | ||
\item {\bf Keep all of your files}. Don't delete your programs, output files, | ||
and written reports after you submit them through GitHub; you will need them | ||
again when you study for the quizzes and examinations and work on the other | ||
laboratory, practical, and final project assignments. | ||
\item {\bf Explore teamwork and technologies}. While certain aspects of the | ||
laboratory assignments will be challenging for you, each part is designed to | ||
give you the opportunity to learn both fundamental concepts in the field of | ||
computer science and explore advanced technologies that are commonly employed | ||
at a wide variety of companies. To explore and develop new ideas, you should | ||
regularly communicate with your team and/or the student technical leaders. | ||
\item {\bf Hone your technical writing skills}. Computer science assignments | ||
require to you write source code documentation and detailed notes of your | ||
experiences when completing each task. Take extra care to ensure that your | ||
writing is interesting and both grammatically and technically correct, | ||
remembering that computer scientists must effectively communicate and | ||
collaborate with their team members and the technical leaders and course | ||
instructor. | ||
\item {\bf Review the Honor Code on the syllabus}. While you may discuss your | ||
assignments with others, copying source code or writing is a violation of | ||
Allegheny College's Honor Code. | ||
\end{itemize} | ||
\vspace*{-.2in} | ||
\section*{Reading Assignment} | ||
If you have not done so already, please read all of the relevant ``GitHub | ||
Guides'', available at \url{https://guides.github.com/}, that explain how to use | ||
many of the features that GitHub provides. In particular, please make sure that | ||
you have read guides such as ``Mastering Markdown'' and ``Documenting Your | ||
Projects on GitHub''; each of them will help you to understand how to use both | ||
GitHub and GitHub Classroom. To do well on this assignment, you should also read | ||
Chapters 8 and 10 in the textbook, paying particularly close attention to the | ||
material about the \program{Tree} and \program{HashMap} data structures. Please | ||
see the instructor with questions about these reading assignments. | ||
\section*{Accessing the Practical Assignment on GitHub} | ||
To access the laboratory assignment, you should go into the | ||
\channel{\#announcements} channel in our Slack team and find the announcement | ||
that provides a link for it. Copy this link and paste it into a web browser. | ||
Now, you should accept the assignment and see that GitHub Classroom created a | ||
new GitHub repository for you to access the assignment's starting materials and | ||
to store the completed version of your assignment. Specifically, to access your | ||
new GitHub repository for this assignment, please click the green ``Accept'' | ||
button and then click the link that is prefaced with the label ``Your assignment | ||
has been created here''. If you accepted the assignment and correctly followed | ||
these steps, you should have created a GitHub repository with a name like | ||
``Allegheny-Computer-Science-101-Fall-2019/computer-science-101-fall-2019-practical-9-gkapfham''. | ||
% Unless you provide the instructor with documentation of the extenuating | ||
% circumstances that you are facing, not accepting the assignment means that you | ||
% automatically receive a failing grade for it. | ||
Before you move to the next step of this assignment, please make sure that you | ||
read all of the content on the web site for your new GitHub repository, paying | ||
close attention to the technical details about the commands that you will type | ||
and the output that your program must produce. Now you are ready to download the | ||
starting materials to your laboratory computer. Click the ``Clone or download'' | ||
button and, after ensuring that you have selected ``Clone with SSH'', please | ||
copy this command to your clipboard. To enter into your course directory you | ||
should now type \command{cd cs101F2019}. By typing \command{git clone} in your | ||
terminal and then pasting in the string that you copied from the GitHub site you | ||
will download all of the code for this assignment. For instance, if the course | ||
instructor ran the \command{git clone} command in the terminal, it would look | ||
like: | ||
\begin{lstlisting} | ||
git clone [email protected]:Allegheny-Computer-Science-101-F2019/computer-science-101-fall-2019-practical-9-gkapfham.git | ||
\end{lstlisting} | ||
After this command finishes, you can use \command{cd} to change into the new | ||
directory. If you want to \step{go back} one directory from your current | ||
location, then you can type the command \command{cd ..}. Please continue to use | ||
the \command{cd} and \command{ls} commands to explore the files that you | ||
automatically downloaded from GitHub. What files and directories do you see? | ||
What do you think is their purpose? Spend some time exploring, sharing your | ||
discoveries with a neighbor and a \mbox{teaching assistant}. | ||
Specifically, each student should ensure that they can understand how the | ||
methods in this class are related. | ||
\section*{Combining the Tree and HashMap Data Structures} | ||
This practical assignment invites you to study and understand the | ||
implementation of \mainprogram{} that can produces the output given in the | ||
GitHub repository. Specifically, the \mainprogramsource{} provides an | ||
implementation of the program that we effectively combines \program{Tree} and | ||
\program{HashMap} data structures. For this assignment, you are invited to | ||
study, understand, and comment this program's source code. Please make sure | ||
that you can write comments that explain how this program uses the combination | ||
of a \program{Tree} and a \program{HashMap} to output word counts for the | ||
paragraph in a provided file. You should also add the required source code so | ||
that the program produces the expected output. Don't forget to run the program | ||
and paste its output at the bottom of the file! You should also observe that | ||
the code uses the \program{java.util.TreeMap} --- how would the program's | ||
output change if you replace that with a \program{java.util.HashMap} instead? | ||
You should also be able to explain how the program performs input parsing and | ||
sorting of the populated \program{TreeMap}. Finally, make sure that you can | ||
explain this program output, noting how it illustrates the use of a | ||
\program{HashMap}. Please see the course instructor with your questions about | ||
this program! | ||
\begin{verbatim} | ||
(key, value) pairs sorted by value and key: | ||
[already=1, append=1, associates=1, be=1, combining=1, create=1, either=1, | ||
example=1, function=1, it=1, mapped=1, mapping=1, may=1, method=1, msg=1, | ||
multiple=1, non=1, not=1, otherwise=1, remapping=1, removes=1, replaces=1, | ||
result=1, results=1, specified=1, string=1, this=1, use=1, values=1, when=1, | ||
for=2, given=2, if=2, key=2, of=2, to=2, associated=3, is=3, null=3, or=3, a=4, | ||
value=4, with=4, the=6] | ||
\end{verbatim} | ||
\section*{Checking the Correctness of Your Program} | ||
As verified by the Checkstyle tool, the source code for the \mainprogram{} and | ||
all of the other Java files must adhere to all of the requirements in the Google | ||
Java Style Guide available at | ||
\url{https://google.github.io/styleguide/javaguide.html}. Instead of requiring | ||
you to manually check that your deliverables adhere to these industry-accepted | ||
standards, GatorGrader and Gradle make it easy for you to automatically check if | ||
your submission meets the correctness requirements. | ||
After the course instructor enables \step{continuous integration} with a system | ||
called Travis CI, when you use the \gitpush{} command to transfer your source | ||
code to your GitHub repository, Travis CI will initialize a \step{build} of your | ||
assignment, checking to see if it meets all of the requirements. If both your | ||
source code and documentation meet all of the established requirements, then you | ||
will see a green \checkmark{} in the listing of commits in GitHub after awhile. | ||
If your submission does not meet the requirements, a red \naughtmark{} will | ||
appear instead. The instructor will reduce a student's grade for this assignment | ||
if the red \naughtmark{} appears on the last commit in GitHub immediately before | ||
the assignment's due date. Yet, if the green \checkmark{} appears on the last | ||
commit in your GitHub repository, then you satisfied all of the main checks, | ||
thereby allowing the course instructor to evaluate other aspects of your source | ||
code and writing, as further described in the \step{Evaluation} section. | ||
\section*{Summary of the Required Deliverables} | ||
\noindent Students do not need to submit printed source code or technical | ||
writing for any assignment in this course. Instead, this assignment invites you | ||
to submit, using GitHub, the following deliverables. | ||
\vspace*{-.1in} | ||
\begin{enumerate} | ||
\setlength{\itemsep}{0in} | ||
\item A properly documented and correct version of the \mainprogram{}. The | ||
comments in this source code should clearly explain how it uses both the | ||
\program{Tree} and \program{HashMap} to accomplish its task. | ||
\end{enumerate} | ||
\vspace*{-.2in} | ||
\section*{Evaluation of Your Practical Assignment} | ||
Using a report that the instructor shares with you through the commit log in | ||
GitHub, you will privately received a grade on this assignment and feedback on | ||
your submitted deliverables. Your grade for the assignment will be a function of | ||
the whether or not it was submitted in a timely fashion and if your program | ||
received a green \checkmark{} indicating that it met all of the requirements. | ||
Other factors will also influence your final grade on the assignment. In | ||
addition to studying the efficiency and effectiveness of your Java source code, | ||
the instructor will also evaluate the accuracy of the technical writing in your | ||
source code's comments. If your submission receives a red \naughtmark{}, the | ||
instructor will reduce your grade for the assignment while still considering the | ||
regularity with which you committed to your GitHub repository and the overall | ||
quality of your partially completed work. Please see the instructor if you have | ||
questions about the evaluation of this practical assignment. | ||
% \section*{Adhering to the Honor Code} | ||
% In adherence to the Honor Code, students should complete this assignment on an | ||
% individual basis. While it is appropriate for students in this class to have | ||
% high-level conversations about the assignment, it is necessary to distinguish | ||
% carefully between the student who discusses the principles underlying a problem | ||
% with others and the student who produces assignments that are identical to, or | ||
% merely variations on, someone else's work. Deliverables (e.g., Java source code | ||
% or Markdown-based technical writing) that are nearly identical to the work of | ||
% others will be taken as evidence of violating the \mbox{Honor Code}. Please see | ||
% the course instructor if you have questions about this policy. | ||
\end{document} |