Frasier Fir

CS 139 Algorithm Development
PA1: Big Tree Hunting

Due: Thursday, Sep 20th at 11:59 PM

  • -10% on Friday, Sep 21st
  • -20% on Sunday, Sep 23rd
  • -35% on Monday, Sep 24th
  • -50% on Tuesday, Sep 25th
  • Not accepted afterwards

 

Objectives - At the conclusion of this assignment students will have demonstrated that they can:

Background

"American Forests’ National Big Tree Program is a conservation movement to locate, appreciate and protect the biggest tree species in the United States. More than 750 champions are crowned each year and documented in our annual publication — the National Register of Big Trees.

For more than 70 years, the goal of the National Big Tree Program has remained: to preserve and promote the iconic stature of these living monarchs and to educate people about the key role that these remarkable trees and forests play in sustaining a healthy environment."  (from the American Forests Big Tree Registry site: http://www.americanforests.org/our-programs/bigtree/ )

How are the "winners" crowned? Each nominated tree is given a score based on its girth, height and canopy spread. A formula is applied which gives each tree a points value:
    Total Points = Trunk Circumference (in inches) + Height (in feet) + ¼ Average Crown Spread (in feet)

The average crown spread is calculated by taking the largest spread and the narrowest spread and dividing that total by 2. Here is a link to a US Forest Service web site with an example: http://www.fs.usda.gov/Internet/FSE_DOCUMENTS/stelprdb5202838.pdf

In this application we are going to help the "Big Tree Hunters" by buiding a Java application that will calculate the Total Points value of a candidate "big tree", which can be used in the nomination process.

Some big trees in Harrisonburg, Virginia:

http://bigtree.cnre.vt.edu/bigtree_detail.cfm?AutofieldforPrimaryKey=1468
http://bigtree.cnre.vt.edu/bigtree_detail.cfm?AutofieldforPrimaryKey=623 (A National Champion)

Requirements

You will write a single Java program, PA1.java, that must:

Big Tree Report:

    Common Name: the common name of the tree
Scientific Name: the scientific name of the tree Circumference: the circumference of the tree (in inches) Height: the height of the tree (in feet) Average Crown: the average crown spread of the tree (truncated to the nearest whole foot) Total points: the points for the tree (truncated to the nearest whole point)

NOTES:

  1. The parenthetical instructions describe the output values and are not to be output.
  2. The three blank lines are significant and must be included.
  3. The colons must line up vertically.
  4. Each of the 10 lines of output must be terminated with a single newline "\n" character.
Your program should use appropriate data types for the values being input and calculated, and appropriate and meaningful names for all variables and constants.

Deliverables

  1. Combine your Java program (PA1.java) with PA1_Test.java (provided on Blackboard) into a zip file. Do not include any .class files. Submit the zip file via Web-CAT (http://webcat.cs.jmu.edu).

  2. Submit your one page Programming Assignment Reflection via Blackboard. See link for a template to use.

Honor Code

This assignment should be viewed as a take home exam. Your work on the assignment and your submission must conform to the JMU Honor Code. Authorized help is limited to the lab handouts, the TAs for any CS139 or CS239 section, and the Professor for your section. Copying work from another student or the Internet is an honor code violation, which will result in a zero on the assignment and possibly further sanctions.