Showing posts with label tips. Show all posts
Showing posts with label tips. Show all posts

Sunday, October 19, 2014

Tips for Taking the AP CS Exam - Handwriting

I found this image on the AP CS website. You should follow these tips when writing homework and quizzes. 

In this example, the student does the following well:
  1. The letters are written large enough so that the grader can easily read the words. The College Board recommends that a good character size is between a quarter and a half inch or so. 
  2. The lines of code are indented according to convention. This part is crucial!

Wednesday, September 24, 2014

Thursday, September 4, 2014

A Comment about Curly Brackets { }

The lines of code inside a method start with a { and end with a }. By default Eclipse puts the starting curly bracket on the same line as the method name. And it puts the ending curly bracket directly underneath the "p" in public. See the example below

This is a great habit because you can easily find its matching starting curly bracket. Sometimes I will even add a comment after the ending curly bracket to indicate the method that it is ending. Plus most Java developers follow this convention, so it makes it much easier for other programmers to read your code.


Please follow this convention, even in your handwritten assignments. The AP exam is handwritten so you'll need to be able to write out legible code. Legible code makes it easier for the person reading and grading your AP exam. 

public class Program {
    public static void main(String[] args) {
        sayGoodMorning();    
    } // end of main()
    public static void sayGoodMorning() {
        System.out.println("Guten morgen!");
        System.out.println("Hello! My name is Jason!");
    } // end of sayGoodMorning()
} // end of Program