1 / 11

Towson University COSC 236

Towson University COSC 236. Lab 1: Java Basics. Lab document created by Kyung Eun Park. Introduction to DrJava. DrJava is a programming environment for Java for beginners. For more detailed and technical user documentation, see the User Documentation: http://www.drjava.org.

asta
Download Presentation

Towson University COSC 236

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Towson UniversityCOSC 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: http://www.drjava.org

  3. Using DrJava • After installing, run DrJavaunder computer science/pgmsfolder • 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. There’s one thing every coder must understand: The System.out.println command.

More Related