Command line arguments get their name because they are included in the command to run a Java byte code using JDK as run from the DOS prompt. We will discuss how to do this after the midterm. BlueJ prompts you for the command line arguments everytime you run a main program.
 
To read from an input file, do the following:
 
Go over Day4 Examples StaffMember in
Day4.zip or
Day4.txt.
Go over Day4 Example Celest in
Day4.zip or
Day4.txt.
A class B inherits a class A when all the instance variables in A
can also be used in class B. This is accomplished in Java by this
class declaration:
Use the line
A method can be overridden in a derived class by supplying a method
definition with name and signiture identical to those of the overridden
in the base class. To invoke the overridden method of the base class, use
super.methodname(arg1, arg2, arg3, ...);
An interface is a set of specifications for the names and signatures of
the methods that the programmer must supply bodies if he or she wishes
to implement the interface. The most important type of interface that
a Java programmer implements is a Listener interface. The listener
specified the names and signatures of the event handlers that must be implemented
(for example actionPerformed(Event e)). The user supplies the code that
tells what the event handler does.
Here are the steps for creating a frame based user interface like the Temperature1
and Temperature2 examples.
Here is the inheritance hierarchy for the StaffMember Example:
Here is the inheritance hierarchy for the Celest Example:
public class A extends B
Class A Class B
Base Class Derived Class
Class Subclass
Superclass Class
Parent Class Child Class
super(arg1, arg2, arg3, ...);
to invoke the consructor in the parent class.
Go over Day4 Example Interface in
Day4.txt.
Go over Day3 Example Temperature2 in
Day3.txt.
Go over Day1 Example Controls in
Day1.txt.
import javax.swing;
import java.awt.*;
import java.awt.event.*;