Results 1 to 5 of 5
  1. #1
    soc86 is offline Member
    Join Date
    Oct 2008
    Posts
    39
    Rep Power
    0

    Default Pleae give advise on Typography

    I have just finnish my assginments for java and have been advise apart of my grading will be on Typography, is there any advise or common styles that I should addopt?

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,585
    Rep Power
    25

    Default

    Typography is the art and techniques of arranging type, type design, and modifying type glyphs.
    How does that relate to writing a java program?

  3. #3
    xcallmejudasx's Avatar
    xcallmejudasx is offline Senior Member
    Join Date
    Oct 2008
    Location
    Houston, TX & Flint, MI
    Posts
    609
    Rep Power
    7

    Default

    Typography? Is that like unoffcial coding rules and symantics?
    Like a class always begins with a capital, final variables are MADE_LIKE_THIS? If that's what you mean then heres a few.

    ClassName classVariable = new ClassName(); //classes are uppercase for each word, variables are lower/upper
    final Double PI = 3.14; //final variables are all caps

    use meaningful names for things. foo and bar are only accepted when testing and should be changed once the idea works.
    Always initialize variables. (int x = 0, String name = ""). It's just a good habit to develop.

    Top-down or Bottom-up programming make your code more readable. Don't throw everything into the main method.
    Heres a general outline

    Java Code:
    import java.util.whatever
    
    ClassName
    
    variable declarations
    
    constructor(or main)
          some code for main/constructor
          method call
    some method
          code for that method
    some other method
          you get the idea
    accessor methods(get and set methods) should generally be defined like
    Java Code:
    String getName()
          return name;
    String setAge(int age)
           this.age = age;
    You should be able to tell what your method will return just by looking at the name.

  4. #4
    Jordan is offline Member
    Join Date
    Nov 2008
    Posts
    2
    Rep Power
    0

    Default

    Do you mean layout (ie how you structure your code/program)?

  5. #5
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,585
    Rep Power
    25

    Default

    Don't forget to comment the methods and any unusual, complex computations.

Similar Threads

  1. give interview tips....
    By thirumurugan.sethu in forum New To Java
    Replies: 4
    Last Post: 10-03-2008, 11:45 AM
  2. advise on designing an ejb application
    By bobD in forum New To Java
    Replies: 0
    Last Post: 09-03-2008, 09:04 AM
  3. Replies: 0
    Last Post: 01-19-2008, 09:04 AM
  4. give me a advise
    By sireesha in forum New To Java
    Replies: 3
    Last Post: 12-11-2007, 01:38 AM
  5. Replies: 1
    Last Post: 06-15-2007, 04:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •