CSISBOARDS Forum Index CSISBOARDS

 

Computer 6 JAVA

 
       CSISBOARDS Forum Index -> Computer Discussion
Author Message
Epitaph



Tue Jan 23, 2007 1:53 pm   Computer 6 JAVA  

BASIC RULES when program involves instantiation:

1. if there are 2 or more classes w/ in 1 program use the class name w/ a
main to compile and execute.

2. if the classes are to be created in diff. programs all the programs must
be contained in the same folder.

3. if there is no constructor merely type the subclass then ();
ex. new Staff() {

4. if you overload, you must specify diff. # of arguments
ex. of overloading = same name but diff arguments

NOTE: this is what we call polymorphism (several forms)

5. be consistent w/ the data type;
ex. double calBonus () {
double Bonus = (Salary*rate)+extra
return double

6. if there is an argument there must ba a parameter.

7. instead of setting variable we can pass the value to an argument.

8. classes will be automatically created accdg. to the # of classes in the
program but the source code will remain.
 
 
       CSISBOARDS Forum Index -> Computer Discussion
Page 1 of 1


This page is a free forum hosting archive page from a ForumWise free forum.
Powered by phpBB ©