Sol-Assignment08 - Types of all variables: -The number of...

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

View Full Document Right Arrow Icon
Solution Dung Nguyen Assignment: 08 Due Date: October 21, 2009 Analysis Inputs: - Type of pyramid. There are two types of pyramid: have blank space or not - Number of lines - Set of characters Output : Print a pyramid of characters. These characters are printed from the highest row to the lowest row in order of them in the input string. When the last character is printed, the next character will be the first character. For example, the number of rows is 5 and the set of characters are abc. Pyramid without blank spaces: a bca bcabc abcabca bcabcabca Pyramid with blank spaces: a b a c a b c a b c a b c a b Constrains: - The set of characters doesn’t include blank space. - The number of rows is positive Design:
Background image of page 1

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

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

Unformatted text preview: Types of all variables: -The number of rows of pyramid: int -The set of printed characters: String -Type of pyramid: int Classes: Driver Properties: none Methods : -main method: get the inputs and use pyramid class to draw pyramid Pyramid Properties: -type: int -characterSet: String -numberOfRow: int Methods: -Get/set methods for each properties -Draw(): draw the pyramid In the draw method, each row is draw iteratively. In each row, print the characters and blank space. The width of each row is 2*numberOfRow -1. Grade: Analysis and Design: 7 points for each Implementation: 16 points Compile without error: 3 points Comment: 2 Minus: No hard copy or soft copy: -5 No staple: -2...
View Full Document

This note was uploaded on 02/21/2010 for the course CIS 3022 taught by Professor Dobbins during the Spring '08 term at University of Florida.

Page1 / 2

Sol-Assignment08 - Types of all variables: -The number of...

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