Sol-Assignment10 - Solution Assignment: Due Date: Dung...

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

View Full Document Right Arrow Icon
Solution Dung Nguyen Assignment: 10 Due Date: November 04, 2009 Class diagrams Day - name : String - number : int <<Constructors>> + Day() + Day(name: String, number : int) <<Get Methods>> + getName() : String + getNumber() : int <<Set methods>> + setName( name : String) + setNumber( number : int) <<Print>> + printDay() + printInfo() <<Convert to String>> + toString() : String Assignment10program: Goal: From row 1 to 4, the program print the square of i at position i of i th row. The printed result as following: 1 4 9 16 Code Walkthrough: method(4) return number = 4; method(4, 0) return number = 4, row = 0 helper(4, 0, 0); println(); Year - months: ArrayList<Month> - number: int <<Constructors>> + Year() + Year(number : int) + Year(months : ArrayList<Month>, number : int) <<Initialization Method>> + initializeMonths() <<Check year>> + isLeapYear(year : int) : boolean <<Print>> + printCalendar()
Background image of page 1

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

View Full DocumentRight Arrow Icon
method(4, 1) return number = 4, row = 1; helper(4, 1, 0); println(); method(4, 2) return
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the 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 / 3

Sol-Assignment10 - Solution Assignment: Due Date: Dung...

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

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