Spring 2016, The College of Saint Rose

Lecture 2: Objectdraw Programming
Date: Thursday, January 21, 2016

Agenda

Due at the start of class, Tuesday, January 26.

Please submit answers to these questions either as a hard copy (typeset or handwritten are OK) or by email to terescoj AT strose.edu by the start of class. Please use a clear subject line when submitting by email (e.g., CSC 252 Lecture 2 Assignment , Joe Student). We will discuss these questions at the start of class, so no late submissions are accepted.

• Evaluate each of the expressions below given the following variable declarations. Some may evalulate to a boolean (true or false), others to a number of type int or double. (1 point each):
```int x = 7;
int y = -3;
int z = 1;
double a = 7.5;
```

a.
x - z > y

b.
x/2 + y

c.
x/2.0 + y

d.
a/2 + z

e.
a + x * y + z

f.
!(x > z) && (a + x + y + 12 < 32) && (a * a * a / 4 == 12)

g.
true || (x * y * z / a < 11)

• Our course has been granted access to a system called "Problets - Java Programming Tutors". Watch your email for the URL to get started. Several of the Problet topics would serve as a good review of your Java skills: those under Expression Evaluation (except Bit-wise), Selection Statements, and Loops.

For this assignment, this part of which is due at 11:59 PM, Friday, February 5 (though you are strongly encouraged to complete them sooner) choose one of the topics in which you feel you need some practice and run through the "Tutor" for that topic. When you finish, you will be given a code that verifies your successful completion. Email that code for 15 points for the first tutorial completed.

If you find these useful and would like more practice, you can earn 10 bonus points for each additional tutorial (up to 5 more) you complete by 11:59 PM, Friday, February 5.

Terminology

• programming language
• object oriented
• event-driven programs
• comment
• class body
• method
• method body
• coordinates
• object
• object construction
• parameters
• actual parameters
• pixel
• origin
• variable
• variable declaration
• instance variable
• assignment statement
• naming conventions

Examples