CS1027b Computer Science Fundamentals II

Lab 1

Learning Outcomes

Upon completion of this lab, you should be able to do the following in Eclipse:

General Lab Instructions to Help Labs Run Smoothly

Overview and Preparation

In this course we will use Eclipse as the Integrated Development Environment. Eclipse has been installed on the Computer Science Department machines in the Undergrad Labs used as the First Year Teaching Environment (MC 8, 10, 230, 235).

IMPORTANT. Make sure you attend your lab session, sign the attendance sheet, show the result(s) of each exercise to your TA, and submit your .java files through OWL by 11:55pm on the same day as your lab session to get your marks for the lab.

Suggested Project Organization

In Integrated Development Environments such as Eclipse, Netbeans, VisualStudio, etc. we need to create a project in order to run a program. Most programs consist of multiple files. A project contains all the information about the program, such as a list of program files (source files, class files) and IDE settings. You will create a new project in Eclipse for every program that you wish to run.

Create a folder called (for example) Eclipse or CS1027b to hold all your Eclipse projects for this course. This folder will contain the project files themselves. The Java source files may be in this folder also (as in Exercises 1 and 3), or in some other (external) folder (as in Exercise 2).

Exercise 1: Getting Started with Eclipse

Exercise 2: Creating a New Project from Existing Source Files

In this exercise, you will create a new project to run the sample Social Networking application whose files are posted on the sample code section of the CS1027 Course web page. (We will not concern ourselves with what this code does at present; you will merely use the files to practice this part of the Lab.)

Exercise 3: Creating a New Java Program

Exercise 4: Creating a Simple Calculator