/* Assertions Motivation: Analogy: Why study physics to build a bridge? Need to understand physical world we are working in order to build something that won't fall apart. ---- CSE: math & logic is what drives our world. It is how we understand the "virtual world" Helpful for: - Program verification - Assertions This will also be a Midterm question! */ public class Assert1 { public static void mystery(int x, int y) { int z = 0; // Point A while (x >= y) { // Point B x = x - y; // Point C z++; // Point D } // Point E System.out.println(z + " " + x); } } /* Fill in the table below with the words ALWAYS, NEVER or SOMETIMES. +---------------------+---------------------+---------------------+ Point A | sometimes | sometimes | always | +---------------------+---------------------+---------------------+ Point B | never | sometimes | sometimes | +---------------------+---------------------+---------------------+ Point C | sometimes | sometimes | sometimes | +---------------------+---------------------+---------------------+ Point D | sometimes | sometimes | never | +---------------------+---------------------+---------------------+ Point E | always | never | sometimes | +---------------------+---------------------+---------------------+ */