Java, Java, Java 3E

Chapter 6: Control Structures

Ch 6 Lab: Fire Extinguisher

Click here for Lab writeup writeup.html

Brief Description

Suppose you determine that the fire extinguisher in your kitchen loses X percent of its foam every day. How long before it drops below a certain threshold (Y percent), at which point it is no longer serviceable? This lab solves this problem with a conditional loop. It uses a simple applet interface, including TextArea and TextField components. This lab requires students to take more of a role in designing their solution. It asks that they prepare a design document -- including UML diagrams and pseudocode descriptions of the key algorithms involved -- before beginning to code.

Objectives

The objectives of this lab are: Here's a demo program:

Fire Extinguisher Tester