PascalTriangle -...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: //******************************************************************** // PascalTriangle.java Author: Lewis/Loftus // // Solution to Programming Project 11.9 // // Determines and prints the Nth line of Pascal's Triangle //******************************************************************** / import java.util.Scanner; i public class PascalTriangle { private int rowNumber; private int rowCount; private int newRow; //----------------------------------------------------------------- // Creates an new PascalTriangle //----------------------------------------------------------------- public PascalTriangle() { rowNumber = 1; } //----------------------------------------------------------------- // Creates a new PascalTriangle with the row number n //----------------------------------------------------------------- public PascalTriangle(int n) { setRow(n); } //----------------------------------------------------------------- // Sets the row of the triangle to n. If n is less than 1, sets // row to 1...
View Full Document

This note was uploaded on 05/17/2011 for the course COP 3530 taught by Professor Davis during the Spring '08 term at University of Florida.

Page1 / 2

PascalTriangle -...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online