Computer Science 202
Introduction to Programming

Fall 2012, The College of Saint Rose

Programming Project 2: Hot and Cold
Due: 11:59 AM, Wednesday, October 31, 2012

For this programming project, you will demonstrate your skills writing conditionals and loops by developing a Visual Logic flowchart then a Java program that keeps track of some temperature information.

Ground Rules

You must work individually on this program. While you may ask for help from your instructor or from the tutors in the Academic Support Center, that help will be more limited than for regular lab assignments. Additionally, any help you receive must be clearly documented in the comment at the top of your program (i.e., who helped you and exactly what that help was).

Program Requirements

You will be developing both a Visual Logic flowchart and a Java program. Your flowchart must be saved as HotAndCold.vls and your Java program must be in a file named HotAndCold.java. When you are ready to develop your Java program, follow the usual procedures to create a BlueJ project that includes a class with this name.

Read these requirements carefully and follow them precisely. Part of your grade will depend on you formatting prompts and printouts as described.

Visual Logic-specific Requirements

Java-specific Requirements

Style and Documentation Reminders

Before you submit your Java program, make sure it conforms to our guidelines for style and documentation.

In particular, you should have a comment at the top of your class that describes your program and has your name, the course number and section (02 for 11:15, E1 for 4:10). You should have comments throughout your programs describing your variables and any non-obvious Java statements or groups of statements.

All identifiers (class names and variable names) should be meaningful and conform to Java's naming conventions.

Your code should be nicely formatted, with new lines after any { or }, and indented as done in class examples.

Bonus Opportunity

For a few bonus points, you may extend your Java program to keep track of the coldest and warmest days, reporting the appropriate extreme temperatures along with the day or days on which it occurred.

Submitting Your Work

Before 11:59 AM, Wednesday, October 31, 2012, submit your Visual Logic flowchart and Java program to Blackboard for grading. Please upload your Visual Logic file (HotAndCold.vls) and your Java source file (HotAndCold.java - upload the one with the .java file extension, not the .class, .ctxt, package.bluej or README files).

Grading

This assignment is worth 50 points, which are distributed as follows:

> FeatureValueScore
Flowchart variable initializations 1
Flowchart main loop (continue reading until temperature is out of range) 3
Flowchart input prompt, including label with day number 3
Flowchart computes and reports total number of cold/warm days 4
Flowchart computes and reports average temp for cold/warm days 5
Flowchart special output when no cold/warm days 2
Java variable initializations 1
Java main loop (continue reading until temperature is out of range) 3
Java input prompt, including label with day number 3
Java computes and reports total number of cold/warm days 4
Java computes and reports average temp for cold/warm days 5
Java special output when no cold/warm days 2
Java defining and using required named constants 2
Using correct filenames 1
Comments (in Java only) 5
Naming conventions (in both) 4
Formatting (in Java only) 2
Bonus up to 3
Total 50