Course web page: Introduction to Computer Science for non-majors II James Tam Return to the course web page

CPSC 219: Mini-Assignment #5

Friday April 8 at 4 PM

New Concepts to be applied for the assignment

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:

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:

  1. 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.
  2. 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).
  3. 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).
  4. 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.
  5. 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].
  6. 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).
  7. 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