[Instructions] [Search] [Current] [Changes] [Syllabus] [Handouts] [Outlines] [Labs] [Assignments] [Examples] [Bailey Docs] [SamR Docs] [Tutorial] [API]
Held: Monday, February 2, 1998
SimpleGUI). I hope to
have them graded for tomorrow.
SimpleInput. In particular,
it doesn't realize that it's at the end of the file when it's also
at the end of a line with input data.
readLine() after reading the last
thing you expect on a line.
out.print("Enter the imaginary part: ");
ipart = in.readDouble();
in.readLine();
setValue(double x, double y)
and setValue(double theta, double r).
switch statementif statements, such a solution is neither readable nor
efficient.
switch statement
(like the case statement in Pascal).
switch (integer-valued-expression) {
case value1:
stuff-to-do;
break;
case value2:
stuff-to-do;
break;
...
default:
stuff-to-do;
break;
}
break, execution will continue into
the next case.
byte, short, int,
long, or char valued expressions.
break has other uses, which you'll see later.
Refer to the lab handout.
On to Error Handling
Back to Interfaces and More
Outlines:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Current position in syllabus
[Instructions] [Search] [Current] [Changes] [Syllabus] [Handouts] [Outlines] [Labs] [Assignments] [Examples] [Bailey Docs] [SamR Docs] [Tutorial] [API]
Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.
This page may be found at http://www.math.grin.edu/~rebelsky/Courses/CS152/98S/home/rebelsky/public_html/Courses/CS152/98S/Outlines/outline.09.html
Source text last modified Tue Jan 12 11:52:18 1999.
This page generated on Mon Jan 25 09:48:53 1999 by SiteWeaver. Validate this page.
Contact our webmaster at rebelsky@math.grin.edu