View Single Post
Old 07-09-2009, 05:19 AM   #6 (permalink)
Deliverance
C++ Beginner
 
Join Date: Jul 2005
Location: Ottawa
Posts: 87
Deliverance is on a distinguished road
Just to add to this:

1) Follow the naming conventions. Only class definitions begin with capital letters. the rest of the variables are accepted to use camel case.

Here's a sample of what you should do to split your stuff up. I'll be very surprised if you can't figure out what the issues are at this point.

Remember

- everything must be in between a class definition (its opening and closing braces).
- a package declaration, if present, must be the first thing that appears in a java file.
- a java file must be named to match the top level (or first public class) being defined

Code:
public class DVD { 

   private ? indentedVariable;
   private ? indentedVariableNumberTwo;
...
}

Code:
/* This is a big hint that dvdExt is not a meaningful name. no one knows what the heck a dvdExt will do or why it extends a DVD with a name like that. */
public class AMeaningfulClassDescription extends DVD { 

   private ? indentedVariable;
   private ? indentedVariableNumberTwo;

   public void indentedMethod {
   }
}
Code:
/* Again, think here. what is an Inventory3. why the 3? */
public class Inventory3 {
  /* a bunch of indented stuff goes here*/
}
Code:
/* Again, think here. what is an Inventory4. why the 4? */
public class Inventory4 {
  /* a bunch of indented stuff goes here*/
}
Deliverance is offline   Reply With Quote