Lecture #15

R E V I E W       T O P I C S

HyperText Markup Language (HTML)

An Introduction to Programming: Coding Decision Trees

Strings and String Manipulation

Numerical Computation & Study of Functions

  • New Classes for Numbers
        public IntField(int size);
        public void setInt(int number);
        public int getInt();
        public DoubleField(int size);
        public void setDouble(double num);
        public Double getDouble();
    
  • Iteration by Button Pushing
  • The while Loop
  • Example: Redesign of Diamond Program
  • Arrays
    • Have Multiple Elements or Cells
    • Use Subscript or Index to Identify Element
      • Subscripts are usually integers in brackets
    • Often Use Arrays in a Loop
  • Array Creation and Use
  • Setting it Up an Array
    double weights[];
    weights = new double[50];
    double weights[] = new double[50];
  • Subscript Range Errors
  • Example: Simple Statistics Program Design
    • Get Data Into Array
    • Display Data
    • Compute
    • Display
  • Algorithms for Extrema
  • Algorithm for Mean