HelloWorld

Work on this exercise by yourself, but ask questions of your instructor, student assistants and classmates as desired.

Goals

The goals of this exercise are to:

The Exercise

You will design, implement and test the famous HelloWorld program, using good OOP techniques.

You will add the HelloWorld project to a central repository using Subclipse.

Instructions Part 0 - Install Subclipse

Follow these directions.

Instructions Part 1 - Create the Project

  1. Open Eclipse, and make sure the Package Explorer is visible in the left window.
  2. From the menus, select File → New → Project . This will bring up the New Project Wizard.
  3. Accept the default choice, "Java Project" and choose "Next"
  4. Name your project "HelloWorld". Accept the defaults, but notice that you are choosing to Create a New Project in Workspace.
  5. Choose Next, and notice the folders (src and bin) that Eclipse is about to create for you
  6. Choose Finish and you should be back at the Eclipse Package Explorer.
Before you continue, minimize Eclipse and go find the folders for HelloWorld, bin and src . Unless you redirect your project workspace output, from now on all your projects will be created here.

Instructions Part 2 - Write and Execute the Code

  1. Write the code for HelloWorld....
  2. Make sure it runs as a proper dignified HelloWorld program should, with output on the console - no GUIs. To run, select in the Package Explorer the .java file containing main(), right-click, and choose Run as → Java application

 

Instructions Part 3 - Add the Project to Version Control

  1. Right click on the HelloWorld project in the Eclipse Package Explorer, and choose Team → Share Project
  2. Select the SVN Repository - we created this for the class to use.
  3. Select Create New Repository Location and choose Next
  4. Type as the URL: http://svn.cs.rose-hulman.edu/repos/<your username> and choose Next.
  5. Accept the default to use Project Name as Folder Name, and select Next.
  6. Make sure to Select All in order to put all your project files under version control
  7. Include a useful comment!!!! This is important for later on!!!!
  8. After you choose "Finish" you should see log file notes in the Eclipse console window that verify your success.
  9. Minimize or exit Eclipse and go look for your HelloWorld folder. Something is very different - a Green Check mark is on the folder, indicating that the folder and its contents are now part of the version control system.
From now on, when you want to modify this project, you will need to update your local copy first, in case anyone else has worked on the project. Then, after you make your changes, you will commit your changes back to the repository so other people can see them. Details on how to do all this in our next lab.

More detailed directions for further reference using version control in Subclipse are stored here.