AP Computer Science 2018 2019 E-mail: taegoode@vbschools.com Summer Assignment (updated 5/29/2018) DUE : Sept. 4, 2018 This assignment is due on the first day of class. Please read the instructions carefully and complete it all. It will take several hours so don t wait until the last minute. E-mail me if you have any questions: taegoode@vbschools.com Part 1 : Download & Install the Java compiler & Dr. Java code editor The objective of this part of the summer assignment is to ensure that each student has the ability to compile and run code on a computer system at home. We will be doing a lot of coding during the school year in class, but there will be times when it is necessary to work outside of the class. Setting Up a java compiler and editor: 1. Download the java JDK 8 (Java Development Kit) from Oracle s Java website. It is the JDK Download on the right (see the red and blue arrow bottom right). http://www.oracle.com/technetwork/java/javase/downloads/index.html **** Choose Java SE 8 1
2. It will then open the following window. You have to click on ACCEPT LICENSE AGREEMENT. Install the jdk that matches your computer s operating system. 2
3. Download Dr. Java (code editor) from the link: http://www.drjava.org/ I used the Old Stable Release (click on the More Download Options ) When you open the application, this window will appear, select ALWAYS. * To test Dr. Java and the java compiler, type the following on the definitions pane (the biggest blank space/window). ( Note : Use your actual last name, Example: Jones_HelloWorld ) public class YourLastName_HelloWorld { public static void main(string args[]) { System.out.println( Hello world! ); } } 3
* Then, File SAVE AS YourLastName_HelloWorld.java Example : Jones_HelloWorld.java * Click on the Save icon, then Compile (far right). The program should display Hello world! at the bottom (interactions) pane, in green text. Some things to remember when creating a program in java: 1) Java is case sensitive. 2) The filename should match the class name, character by character. Example: public class Smith_HelloWorld must be saved as Smith_HelloWorld.java 4
Part 2 : Write simple Java programs Be sure to use the indicated filename for each assignment. You must have the following comments at the beginning of each program: //******************************************************* //Author: (your first name and last name) //Program Description: (describe what the program does) //Date Created: //******************************************************* 1) Write a java program that prints the following pattern, without using any loop. Filename: YourLastName_Triangle.java * ** *** **** ***** ****** ******* 2) Write a java program that displays your initials (first, middle, last) using the uppercase initials of your name. Initials must be in uppercase letters and must look like it is written in bold. It must be at least 10 characters tall. Use the space bar key for spacing between characters, NOT the tab key. For example: Initials J C Y will be displayed as: Filename: YourLastName_Initials.java JJJJ CCC CCC CCC YYY YYY JJJJ CCC CCC YYY YYY JJJJ CCC YYY YYY JJJJ CCC YYY YYY JJJJ CCC YYY JJJJ CCC YYY JJJJ CCC YYY JJJJ JJJJ CCC YYY JJJJ JJJJ CCC CCC YYY JJJ JJJ JJJ JJJJ CCC CCC CCC YYY 5
3) Write a program that displays a medium-sized tic-tac-toe board. Use the asterisk * character. Filename : YourLastName_TicTacToe.java 4) Write a program that displays a recognizable animal shape using asterisks only. It must be filled in (or at least 90% filled in) with asterisks *. Minimum Size: 20 characters tall and 20 characters wide. Filename : YourLastName_AnimalShape.java 6