CS160: Foundations in Programming: Spring 2015
Recitation R0 - Introduction to Programming
The goals of this lab are as follows:
- Login to department systems
- Discover the class website
- Learn to run Linux applications
- Get Eclipse up and running
- Write a very simple Java program
- Show you how to checkin your programs
- Learn about preliminary testing
- Login to the machine using your electronic ID (same username that you use for RamWeb).
- The initial password should be your student ID (same as nine digit number on your RamCard).
- The teaching assistant will show you how to change your password.
- Raise your hand if you cannot login!
- Start your preferred internet browser and type in the url www.cs.colostate.edu/~cs160.
- Note the semester that appears as part of the url!
- Look at the syllabus and progress pages.
- Find the lab instructions for today.
- Open another tab and type in the url ramct.colostate.edu.
- Login on RamCT using your EID and password and make sure you can see CS160.
- Your TA will show you how to launch applications and add them to the task bar.
- Select "Activities" in the upper left corner of the screen, then select "Applications"
- Run firefox, gedit, file manager, and a terminal.
- The terminal command brings up a window where you can type in Linux commands
- Note: this is similar to using the DOS command prompt on Windows.
- Use the
passwd command to change your password.
- We recommend changing it to your RamWeb/RamCT password, if possible.
Eclipse makes programming easier by compiling and running your programs in a single step.
Your TA will go over setting up Eclipse and your workspace.
- To start Eclipse, open a terminal window and type "eclipse.sh".
- You must do this every time you launch Eclipse.
- Close the window that welcomes you to Eclipse.
- Select the Window→Open Perspective→Java.
- You can change perspectives as need be to fit your workflow.
- If your perspective ever gets messed up, you can reset your perspective by going to Window→Reset Perspective.
- Close the "Welcome" window if it doesn't disappear automatically.
- Create a default comment header by going to Window→Preferences→Java→Code Style→Code Templates→Code→New Java files
and putting a line for file name, your name, the class, the date, and your email.
Your TA will guide you in creating a project called P1 and class for starting the P1.
Submit your program
Your TA will now walk through logging in to the course website, submitting your code,
and viewing preliminary test results. You should pass the first two preliminary tests.
Read the assignment for P1 here. Now see if you
can add another print statement and pass a third test. There is no grading for this
- You can now run your program by clicking the green Play button on the toolbar.
- Note that the output will appear in the Console window at the bottom.
- You should see the program print two lines to the console.
- For detailed tutoring on using Eclipse, check out the website:
- There is no grading for this recitation!
© 2015 CS160 Colorado State University. All Rights Reserved.