CS 106A Study Guide - Final Guide: Semicolon, Binary Search Algorithm, Parsing

156 views55 pages

Document Summary

Gobject: origin upper left of object a. i. Glabel nameoflabel = new glabel ( text , x, y); Glabel label = new glabel ( hello, world , x, y); d. Origin is left baseline (left: colors, geometric objects j. Size of graphics window getwidth() getheight() returns width/height of graphics window: receiver of these objects is. Graphicsprogram itself so we don"t specify separate object as receiver. Set location of label last (so that it takes into account font) Take into account that getheigth() takes height of line while getascent() gets height of letters. Expressions: remember that int division will have different results than double division, operations, priority. 2==2 || (3==3 && 4<3) true || false true true: type casting = treat one type as another for one operation o. i. Put type before variable to change it o. ii. Int types cut off the decimal, no rounding o. iii.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Documents