Exam 2 review - Slides 3/29 COP 3330 Topics • Exam Review Exam#2 • Don't forget the second exam is next time(Wednesday March 31 st Language

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: Slides 3/29 COP 3330 Topics • Exam Review Exam #2 • Don't forget, the second exam is next time (Wednesday, March 31 st ) Language Basics • Variables- Primitives ◗ boolean, byte, char, short, int, long, float, double- Objects • Control structures- if / else if / else, for, while, do-while, switch Language Basics • Literals- boolean literals (true, false)- byte, short, int, long literals- float, double literals- char literals- String literals Language Basics • Expressions- Arithmetic Expressions ◗ +, -, *, /, %- Assignment ◗ =, +=, -=, *=, /=, %=- Comparison ◗ ==, !=, <, >, <=, >=- Logical Expressions ◗ &&, ||, ! Strings • String literals • String concatenation (+) • String comparison (compareTo method) Arrays • One dimensional arrays • Multidimensional arrays • length field Comments and Whitespace • Line comment (//) • Block comment (/* */) • Indent properly! Code is unreadable otherwise! • Leave blank lines where appropriate Whitespace Example public class Polar { private double r; private double theta; public static final double MAX_MAGNITUDE = Double.MAX_VALUE; public Polar(double newr, double newtheta){ r = newr; theta = newtheta; } public Polar rotate(double angle) { Polar rval = new Polar(r, theta); rval.theta += angle; return rval; } } Whitespace Example...
View Full Document

This note was uploaded on 04/01/2010 for the course COP 3330 taught by Professor Staff during the Spring '08 term at University of Central Florida.

Page1 / 28

Exam 2 review - Slides 3/29 COP 3330 Topics • Exam Review Exam#2 • Don't forget the second exam is next time(Wednesday March 31 st Language

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

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