/* * Created: *** put the date here *** * * Author: *** put your name here *** * * Program to compute Hailstone series. */ import java.util.Scanner; public class Lab5 { public static void main(String[] args) { // Fill in the body } // Given a Scanner in, this method (repeatedly, if necessary) // prompts the user to enter a positive integer, inputs the // integer, and if it is positive returns it. Otherwise, is // keeps asking the user for a positve integer. private static int getStartingValue(Scanner in) { // Fill in the body // Do not declare the Scanner variable in this method. // You must use the value this method receives in the // argument (in). } // Given a positive starting value x, this method generates the // corresponding Hailstone series and returns the length of the // series (i.e., how many steps it takes before the series hits 1). private static int computeLength(int x) { // Fill in the body } // Given a positive starting value x, this method generates the // corresponding Hailstone series and returns the maximum value // in the series (i.e., the largest value it generates before // the series hits 1). private static int computeMax(int x) { // Fill in the body } // Given the starting value, the length, and the max value in a // Hailstone series, this method outputs them with appropriate // messages. private static void outputResults(int start, int length, int max) { // Fill in the body } }