CSCE A201 Computer Programming I Lab 0

Lecture Instructors: Dr. Kenrick Mock, MW 11:30‐12:45pm Dr. Frank Witmer, TR 10‐11:15am

Lab Assistants: Deanna Flynn Elisha Waugh Goals for Today

• Introduce lab assistants • Meet some of your classmates • Introduction to Dr. platform independence • Write your first (!?) Java program Syllabus Highlights wrt. Lab

• May students collaborate on lab assignments? • May students collaborate on programming assignments? • What percentage of the total course grade is determined by lab? • How is the lab grade determined? Introduce your Neighbor

1. Name 2. Hometown 3. Something interesting (e.g. hobby or recent trip) Some Java Development Environments • Dr. Java – from Rice University, simple & effective – standalone executable (installation instructions on Blackboard) • jGRASP – NSF funded at Auburn University • Intellij IDEA – good code completion & error messages – https://www.jetbrains.com/idea/ • NetBeans – from Oracle, good for multiple, larger projects • – more plug‐ins, more customizable – good for Android development) • TextPad (initially free, but then ~$30) • Any text editor & command line – Notepad++ with Cygwin/DOS – , , nano with unix/ • See also Appendix 1 in Savitch book Java Example

• Class Hello must be stored in file Hello.java public class Hello { public static void main(String[] args) { System.out.println("Hello world."); } } Platform Independence Demo

• Compile java & ++ programs on linux – Which executable/bytecode will run on a Windows machine? Platform Independence

• Use ‘javac’ command to compile Java source code .java files high‐level language • Use ‘java’ command to run Java bytecode .class and .jar (Java Archive) files low‐level language Same bytecodes can run any platform with an appropriate JVM (‘java’) Lab 0 Exercise 1. Start Dr. Java from the Start menu – For your personal computer, you can download it from www..org 2. Write a program that prints your name to the console – What elements must it contain? 3. Save your class as a .java file – Dr. Java makes backup copies of your file with suffix .java~ • Ignore these (don’t submit them to Blackboard) 4. Archive your work by using Google Drive (with your UAA email account) or a thumb drive