P Dunn's Super CS1 Site

CS1 at Oswego

Hypertexknowlogy

Frequently Asked Questions

 
P Dunn's Super CS1 Site  
 
 
 
Class Notes

Monday November 27 , 2000
 
Synopsis
Today exam # 3 for December 4 th was discussed as well as what will be covered on the final.   Also more things were discussed about the lab and when the site should be done.   Superficial Signatures were gone over as well.

Definition     The SUPERFICIAL SIGNATURE of a Java program fragment is the fragment with...

  • All literals (constant) replaced by their type in angular brackets < >.
  • All objects referenced by variables replaced by the type of the object in angular brackets < >.

  Example
int x = 5;
double y = 3.5;
double p = x * y;
IO.println ( ``The product is'' + p);  

The superficial signature of above is...
int x = < int >;
double y = < double >;
double p = < int > * < double >;
IO.println (< String > + < double >);  

Example
Circle c = new Circle (10);
Square s = new Square (10.0);
double aa = (c.area () + s.area () / 2.0);  

The superficial signature
Circle c = new Circle (< int >);
Square s = new Square (< double >);
double aa = (< Circle > .area () + < Square > .area () / < double >);  

Some hints were offered on implementing more interesting stuff in the Dictionary class too.