iLab4 Pt2 Solution

iLab4 Pt2 Solution - count = count 1 endwhile return answer...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 Solutions for Week 4 iLab, Part 2 CLASS DIAGRAM: ExponentCalculator ------------------------------ + Double base + Double exponent ----------------------------- + Double Calculate() PSEUDOCODE of Calculate(): Begin Calculate() Declare variables: Integer count Double answer count=1 answer=1 while count <= exponent answer = answer * base
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: count = count + 1 endwhile return answer End PSEUDOCODE of button_click method: Begin button_click() Declare variables: ExponentCalculator as objCalc Double finalAnswer Get objCalc.base, objCalc.exponent from text boxes finalAnswer = objCalc.Calculate() Display finalAnswer, msg to label End...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online