{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

In Class Practice 1 - COP 3330 Object-Oriented Programming...

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

View Full Document Right Arrow Icon
COP 3330: In Class Practice #1 Page 1 © Dr. Mark Llewellyn COP 3330: Object-Oriented Programming Summer 2011 In Class Practice #1 Department of Electrical Engineering and Computer Science Computer Science Division University of Central Florida Instructor : Dr. Mark Llewellyn [email protected] HEC 236, 407-823-2790 http://www.cs.ucf.edu/courses/cop3330/sum2011
Background image of page 1

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

View Full Document Right Arrow Icon
COP 3330: In Class Practice #1 Page 2 © Dr. Mark Llewellyn In Class Practice #1 Let’s convert the UML class diagram shown below into an implemented Java class and use that class to illustrate the differences between class variables/methods and instance variables/methods. Rectangle numberOfRectangles: int = 0 – length: int − width: int + Rectangle(x, y: int) + getLength(): int + getWidth (): int + area(): int + changeSizes(x, y: int): void Underlining a variable or a method in a UML diagram indicates that the variable or method is a class method. This is also the standard format for specifying a default value for a variable in UML.
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.

{[ snackBarMessage ]}