Fundamentals of Computer Science II (CSC-152 2000F)


Class 10: Lab: Conditionals

Back to Reuse Through Inheritance and Polymorphism. On to Lab: Loops.

Held Monday, September 11, 2000

Summary

Today we return to our considerations of programming Java by investigating conditional operations in Java, particularly the if and cond operations.

Notes

Overview


Polymorphism, Continued

Boolean Values

Control Structures with Booleans

Simple Conditionals

Formatting Nested Ifs

if (test1) {
  stuff1
}
else if (test2) {
  stuff2
}
else if (test3) {
  stuff3
}
else if (testn) {
  stuffn
}
else {
  default-stuff
}

Other Conditionals

Conditionals Lab

Do sections J4.2 and J4.4 of lab J4: conditionals.

What are some other ways we might use conditionals with the Point class?

What are some other ways in which you might expect to use conditionals?


History

Wednesday, 23 August 2000

Thursday, 24 August 2000

Monday, 11 September 2000

Back to Reuse Through Inheritance and Polymorphism. On to Lab: Loops.


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.cs.grinnell.edu/~rebelsky/Courses/CS152/2000F/Outlines/outline.10.html

Source text last modified Wed Oct 25 10:05:37 2000.

This page generated on Fri Oct 27 08:19:49 2000 by Siteweaver. Validate this page's HTML.

Contact our webmaster at rebelsky@grinnell.edu