Presentation is loading. Please wait.

Presentation is loading. Please wait.

Towson University COSC 236

Similar presentations


Presentation on theme: "Towson University COSC 236"— Presentation transcript:

1 Towson University COSC 236
Lab 1: Java Basics Lab document created by Kyung Eun Park

2 Introduction to DrJava
DrJava is a programming environment for Java for beginners. For more detailed and technical user documentation, see the User Documentation:

3 Using DrJava After installing, run DrJava under computer science/pgms folder Opening and Creating Files To create a new file, choose “File, New” from the File menu To open a file, choose “File, Open” from the File menu Saving Files To save a file, either click on the “Save” button or choose “File, Save.”

4 Saving Files

5 Compiling Files To compile all open files, click on the “Compile” button. Once the compile is completed, the results are displayed on the Compiler Output tab at the bottom of the screen.

6 Direction for Lab Assignments
Submit your .java file before next Lab (11:00 a.m. February 4th) electronically on the BlackBoard. Make sure that your program contains your name, course, and section number as well as a brief description of the lab as a comment. The following slides include lab assignments for this week. Please write a complete Java program, compile, and run the program. The individual assignments can be combined into one program or you can submit them as a zip file.

7 Assignment 1 Write a complete Java program that prints the following output: ///////////////////////// || Vicotory is mine! || \\\\\\\\\\\\\\\\\\\\\\\\\

8 Assignment 2 Write a complete Java program that prints the following output: / ^ ^ \ (| @ |) \ \___/ /

9 Assignment 3 Write a complete Java program that prints the following output: A well-formed Java program has a main method with { and } braces. A System.out.println statement has ( and ) and usually a String that starts and ends with a “ character. (But we type \” instead!)

10 Assignment 4 Write a complete Java program that prints the following output: A ”quoted” String is ’much’ better if you learn the rules of ”escape sequence.” Also, ”” represents an empty String. Don’t forget: use \” (\’) instead of ” (’) ! ’’ is not the same as ”.

11 Assignment 5 Write a complete Java program that prints the following output: There’s one thing every coder must understand: The System.out.println command.


Download ppt "Towson University COSC 236"

Similar presentations


Ads by Google