Computer Science & Software Engineering |
CSCI 135 |
10 7 14 1 6 40 20 2 5 32 18 3 6 23 15 4 2 50 24 5 2 18 6 5 3 -1 -1 5 4 80 30 6 1 33 17 6 3 29 17 8 3 75 30 8 6 9 4 9 1 -1 -1 10 6 42 21 2 0 49 20 |
The pink shaded area is the optimal 4 ft^2 lease. |
Here is a much bigger square mile forest, some example runs, and a graph of the square mile forest:% java LoggingLease 4 10x7.txt Forest trees : 12 Forest bear dens : 2 Best southwest : (6, 1) Best northeast : (8, 3) Best tree volume : 183.16278 ft^3 % java LoggingLease 9 10x7.txt Forest trees : 12 Forest bear dens : 2 Best southwest : (2, 4) Best northeast : (5, 7) Best tree volume : 187.75277999999997 ft^3 % java LoggingLease 18 10x7.txt Forest trees : 12 Forest bear dens : 2 Best southwest : (6, 2) Best northeast : (10, 6) Best tree volume : 202.43472 ft^3 % java LoggingLease 25 10x7.txt Forest trees : 12 Forest bear dens : 2 No lease possible! % java LoggingLease 2 10x7.txt Forest trees : 12 Forest bear dens : 2 Best southwest : (4, 4) Best northeast : (5, 5) Best tree volume : 155.0733 ft^3
% java LoggingLease 10000 square_mile.txt Forest trees : 100 Forest bear dens : 10 Best southwest : (2591, 2185) Best northeast : (2691, 2285) Best tree volume : 573.8091599999999 ft^3 % java LoggingLease 100000 square_mile.txt Forest trees : 100 Forest bear dens : 10 Best southwest : (2375, 1969) Best northeast : (2691, 2285) Best tree volume : 819.70614 ft^3 % java LoggingLease 7767368 square_mile.txt Forest trees : 100 Forest bear dens : 10 Best southwest : (2494, 0) Best northeast : (5280, 2786) Best tree volume : 3610.5308399999994 ft^3 |
|
Grade Item | Logging Lease | Points Earned |
---|---|---|
Program Compiles | 2 | |
Program Runs | 2 | |
Header Comment | 2 | |
Uses Methods | 4 | Test Cases Written for Each Method | 4 | Test Cases Written for Overall Code | 4 | Program Finds Highest Value Lease Section | 4 | Program Avoids Bear Dens | 4 | Passes All Instructor Tests | 4 |
Page last updated: August 15, 2018