University of Arizona, Department of Computer Science

CSc 120 (Spring 2025): Assignment 10

Start Date: Mon Apr 14
Due Date: Short problems: 7:00pm, Thu Apr 17
OCA-8 Video (Battleship): 11:00 PM Sat Apr 19
Black-box tests: 7:00 PM, Tue Apr 22
Long problems: 7:00 PM, Tue Apr 22

The short problems cover various topics from the semester, specifically, binary search trees, linked lists, recursion, and queues. The long problem is complex and builds on the general programming skills that you have developed to this point in the semester.

General Requirements

  1. Your code should follow the style guidelines for the class.
  2. You should only use external libraries that have either been mentioned either in class or else in the assignment spec.

Short Problems (Due 7pm Thu Apr 17)

(20 points)

Submit your short problems to the folder PA-10-Shorts folder on Gradescope here: http://gradescope.com.

There are four problems, described below. Be sure to use the shorts template provided on the assignments page.

  1. preorder_to_bst

  2. remove_last()

  3. str2object()

  4. Queue()

Long Problem (Due 7pm Tue Apr 22)

In addition to writing a Python program as usual, this week you will also submit a text file containing a description of black-box test cases.

Black-box Tests (Due 7:00pm Tue Apr 22)

5 points

For the long problem (Battleship), submit exactly five black-box tests. Details of the requirements for these tests are given here.

These should be submitted as the file battleship-tests.txt at http://gradescope.com.

(75+5 = 80 points; this includes the 5 points for the black box tests)

  1. Battleship
    File: battleship.py.

For this problem, submit the file battleship.py and at http://gradescope.com