
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Instructions for completing homework assignment csce 1040 hw 4, which involves writing a recursive solution for the robbers problem. The function should take an integer input for the number of robbers and output a proposal. Details on how to turn in the assignment and grading criteria.
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Summary: Write a recursive solution to the robbers homework (you saw this one coming). This program should have a main method that calls robbers( ). robbers( ) must be a recursive function. The function should take as input an integer n from 1 to 20 for the number of robbers – this may or may not be the only parameter to robbers( ). The output of the program should be the proposal by n. For example, given n = 2, the program should output 100 0. You may do the output in main to make your robbers function shorter (this may also require a loop in main, which is fine). Your class name (and file name) should be your last name. A recursive solution could call itself to find the full solution with fewer robbers, or could call itself to find the number of bonds that a less senior robber is getting (for a given number of robbers). Turn-In: Please e-mail your source code (lastname.java) to [email protected] with the subject CSCI 1040 Homework 4 – your_last_name. I may miss your assignment if you turn it in with a different subject. Please try to have a final version ready before turning in – it is harder to keep up with several versions of your program. Grading: The author of the solution that uses the fewest number of characters of source code will receive 5 points on the last exam, a UNT towel, and a congratulatory handshake. I would recommend getting a working version, and then trying to compress it. if you can read this you don’t need glasses