#Example Lab
Welcome to the example lab. This lab will let you practice the method of pulling the lab code to your computer and then submitting it to GitHub when it is complete. Follow these steps:
- Create an account with GitHub
- Fork the example lab repository
- Import the project into Eclipse
- Click File->Import...
- Choose Git->Projects from Git
- Choose "Clone URI", press Next
- Copy the clone URI on your forked github repository (bottom right)
- Paste the URI into the Eclipse window
- Set your GitHub user name and password, leave everything else as it is.
- Press Next
- Choose Master on the "Branch Selection" screen and press Next
- Choose a local destination directory and press Next
- Select "Import existing Eclipse project" (should be default choice), press Next.
- Press Finish and your project is imported!
- Do the actual lab work
- Modify the main method in edu.carrollcc.cis232.App to ask for a name.
- Replace "world" in the "Hello world!" output with that name.
- Test your work.
- Run the application by pressing the Play button to test your program manually.
- To test your program with the built-in Unit tests:
- Open the unit test class named AppTest in the src/test/java folder.
- Press the Play button.
- The failed tests will show up as red on the left. Passed tests will show up as green.
- Submit your work
- Right click the project
- Choose Team->Commit...
- Enter a comment such as "My solution for the example lab"
- Enter your name/email for the author/committer fields if it is not set
- Press "Commit and Push". (Committing saves the changes locally, Pushing saves the changes on your GitHub fork)
- Your work is now on your GitHub fork. Open up the browser to your GitHub fork of the example lab.
- Press the green pull request button at the top to the left of the "Branch: master" dropdown.
- To finally submit your lab, Click the green "Create new pull request" button, enter a title and message, and press "Create pull request".
- Your lab is now submitted!