CS 411 Fall 2025  >  Assignment 5 (A Problem, Part 2)


CS 411 Fall 2025
Assignment 5 (A Problem, Part 2)

Assignment 5 is due at 5 pm on Thursday, November 6. It is worth 85 points.

Procedures

This is, optionally, a group assignment. You may work in a group of two, if you wish. Each group only needs to turn in a single copy of the assignment. Under normal circumstances, each group member will receive the same grade on the assignment.

Turn in your answer to the exercise below on the UA Canvas site, under Assignment 5 for this class.

If you work in a group:

Exercises (A only, 85 pts total)

Exercise A — Dynamic Programming

Purpose

In this exercise, you will write a package that finds an optimal solution to a problem via dynamic programming.

Instructions

Redo Assignment 2 Exercise A (the bridge-building problem) with the following changes.

The interface to your code will be identical to that specified in Assignment 2: the same filenames, the same function names & signatures, and the same expected results.

Test Program

A test program will be available soon: bridges_test2.cpp. If you compile and run this program (unmodified!) with your code, then it will test whether your code works properly.

You may also do some of your testing with the test program from Assignment 2: bridges_test.cpp. If you have written your code properly, then the old test program should run very quickly—it should probably appear to run instantaneously. You may find the older program useful if you are working on correctness of slow code that is to be optimized later. But you will need to run your code with the later test program eventually.

Notes