Chapter 8
From APIs to Programs

   8.1 The Making of a Program
   8.2 Assigning Meaning to Programs
   8.3 General Rules
   8.4 Code Comments
   8.5 Assignment #9: Simple Programming

8.1 The Making of a Program

class trivial{ 
  public static void main(String[] args){} 
} 

8.2 Assigning Meaning to Programs

class helloWorld{ 
  public static void main(String[] args){ 
      System.out.println("Hello World!"); 
} } 
The instruction ‘System.out.println("string")’ is among the simplest available for outputing text.

8.3 General Rules

8.4 Code Comments

Exercises

8.5 Assignment #9: Simple Programming

Due: Fr, Apr 25, midnight

Write a program which outputs the following code.

     Ring around the rosie, 
     Pocket full of posie, 
     Ashes, ashes, 
     We all fall down. 
 
     Round the ring of roses, 
     Pots full of posies, 
     The one who stoops last, 
     Shall tell whom she loves best. 
Assume ‘lab9’ for the submit program, and the name roses.java for the file containing the program..

Note: Files that fail to compile, and execute when applicable, will not be examined. They will be awarded a grade of 0 points.