You are on page 1of 4

Solutions Manual to accompany Introduction to Java

Programming 9th edition

To download the complete and accurate content document, go to:


https://testbankbell.com/download/solutions-manual-to-accompany-introduction-to-jav
a-programming-9th-edition/
Solutions Manual to accompany Introduction to Java Programming 9th edition

Student Name: __________________


Class and Section __________________
Total Points (20 pts) __________________
Due: December 1, 2010 before the class

Project: consecutive four equal numbers


CSCI 1301 Introduction to Programming Principles
Armstrong Atlantic State University

Problem Description:
Write the following function that tests whether a two-
dimensional list has four consecutive numbers of the same
value, either horizontally, vertically, or diagonally.

public static boolean isConsecutiveFour(int[][] values)

Write a test program that prompts the user to enter the


number of rows and columns of a two-dimensional list and
then the values in the list and displays True if the list
contains four consecutive numbers with the same value.
Otherwise, display False. Here are some examples of the
true cases:
0 1 0 3 1 6 1 0 1 0 3 1 6 1 0 1 0 3 1 6 1 0 1 0 3 1 6 1
0 1 6 8 6 0 1 0 1 6 8 6 0 1 0 1 6 8 6 0 1 0 1 6 8 6 0 1
5 6 2 1 8 2 9 5 5 2 1 8 2 9 5 6 2 1 6 2 9 9 6 2 1 8 2 9
6 5 6 1 1 9 1 6 5 6 1 1 9 1 6 5 6 6 1 9 1 6 9 6 1 1 9 1
1 3 6 1 4 0 7 1 5 6 1 4 0 7 1 3 6 1 4 0 7 1 3 9 1 4 0 7
3 3 3 3 4 0 7 3 5 3 3 4 0 7 3 6 3 3 4 0 7 3 3 3 9 4 0 7

Analysis:
(Describe the problem including input and output in your own words.)

Design:
(Describe the major steps for solving the problem.)

Visit TestBankBell.com to get complete for all chapters


Coding: (Copy and Paste Source Code here. Format your code using Courier 10pts)
Submit to LiveLab

Testing: (Describe how you test this program)

Submit the following items:

1. Print this Word file and Submit to me before the class on the due day

2. Compile, Run, and Submit to LiveLab (you must submit the program regardless
whether it complete or incomplete, correct or incorrect)

2
Solutions Manual to accompany Introduction to Java Programming 9th edition

Solution Code:

Visit TestBankBell.com to get complete for all chapters

You might also like