CPSC 219: Mini-Assignment #5
Friday April 8 at 4 PM
New Concepts to be applied for the assignment
- Conditional and unconditional display and accessing of data in a linked
list
Overview
To get credit for this assignment you must work with the starting code provided in class
Node and the Driver
class. You cannot change the code in these classes and you cannot write your own
versions. The source code can be found in the course directory under:
/home/219/assignments/mini_assignment5/code.
In addition there is a third class that you must use, the
Manager class. You
cannot change the attributes or the two methods provided (the
constructor() and the
add() method) but you
will be required to implement the two versions of the
display() method:
- display():
steps through the list starting with the first node and displays the data
for each node (on its own line) up to and including the last node.
- displayOverCutOff():
similar to the previous method. However the data for a node will only be
displayed if it exceeds the cutoff which in this case is defined by the
named constant "CUT_OFF" in the Manager class.
To get credit your program should display all nodes in the list and then
display nodes which exceed the cut-off. (Implement the appropriate methods and
uncomment out the method calls in the Driver). For your convenience there is
already a blank line that will separate the calls to each display method.
Everyone starts off with a grade point of zero. Completely and correctly
implementing one of the two methods earns you 2 grade points. That is,
implementing one method will earn you a grade point of 2.0. Implementing both
methods will earn you a grade point of 4.0.
Using pre-written Java code (unless otherwise you can not assume
that you can use the library).
You cannot use methods other than the ones for output:
printf(), print(),
println() as well
as the random number generator method nextInt(). There's no need for input for this
assignment.
Sample output
There's a sample output file in the course directory under:
/home/219/assignments/mini_assignment5/output
Points to keep in mind:
- Due time: All assignments are due at 4 PM on the
due dates
listed on the course web page. Late assignments or components of
assignments will not be accepted for marking without approval for an
extension beforehand. What you have submitted in D2L as of the due date is
what will be marked.
- Extensions may be granted for reasonable cases by the course
instructor with the receipt of the appropriate documentation (e.g., a
doctor's note). Typical examples of reasonable cases for an extension
include: illness or a death in the family. Cases where extensions will not
be granted include situations that are typical of student life: having
multiple due dates, work commitments etc. Tutorial instructors (TA's) will
not be able to provide extension on their own and must receive permission
from the course instructor first. (Note: Forgetting to hand your assignment
or a component of your assignment in does not constitute a sufficient reason
for handing your assignment late).
- Method of submission: You are to submit your assignment using D2L
[help
link]. Make sure that you [check
the contents of your submitted files] (e.g., is the file okay or was it
corrupted, is it the correct version etc.). It's your responsibility to do
this! (Make sure that your submit your assignment with enough time before it
comes due for you to do a check).
- Identifying information: All assignments should include contact
information (full name and student ID number) at the very top of your
program in the class where the 'main()'
function/method resides.
- Collaboration:
Assignments must reflect individual work, group work
is not allowed in this class nor can you copy the work of others. For more
detailed information as to what constitutes academic misconduct (i.e.,
cheating) for this course please read the following [link].
- Execution: programs must run on the computer science network. If
you write you code in the lab and work remotely using a remote login program
such as Putty or SSH. If you choose to install Java on your own computer
then it is your responsibility to ensure that your program will run properly
here. It's not recommended that you use an IDE for writing your programs but
if you use one then make sure that you submit your program in the form of
individual text ".java" files (one for each
class that you define).
- Source code: in order to get any credit for your work you must
submit all relevant dot-java files for the assignment (e.g.,
Driver.java). If you only submit your byte code
files (e.g. Driver.class) then you will not be
awarded any credit.
D2L configuration for this course
- You can (and really should) submit work as many times as you wish before
the due date
- D2L will only retain whatever files that you submitted the last time
that you uploaded to D2L, previous files will not be retained (e.g. if you
submit files: A.java, B.java, C.jpg the first
time and then you submit A.java the second time
then D2L will only have one file stored: A.java.
That means that you should submit every file associated with the assignment
each time that you want to submit something regardless of how many of those
files were actually changed since the last submission.