ART MOMENT:
![]() |
Waterloo Bridge
With student id, museum tickets cost only $8 |
By the beginning of today's class you should
HAVE READ:
KNOW:
BE ABLE TO:
DAILY QUESTION:
In the following code, the initial value of x is
unreadable. However, you know that after the set of statements that x is an
even number. What possible initial value(s) did x have?
int x; x = SOME_UNREADABLE_VALUE; if (x < 10) if (x < 5) if (x < 1) x = 1; else if (x > 3) x = 4; else if (x < 12) x = 9; else x = 8; else x = 7; else x = 11; |
ah... the benefits of indentation! and proper formatting.
Sample Exam question(s)
1. You have been called in as the expert consultant to review the initial software design for the information maintained by an employee database of a nation-wide car rental company for the following problem:
An employee has a social security number, age, birthday, and ID that consists of two capital letters followed by 5 digits (i.e., AZ17623). The two letters that start the employee ID must be one of the fifty state abbrevations (i.e., MA, NY, or CA).
Given the following initial design, make three recommended changes (and provide your explanation). You will be graded on the decisions you recommend in addition to the reasoning behind them.