Link Search Menu Expand Document

Exercises

To execute and return exercises, you must have GitHub account and you have to fork teacher’s exercises to your GitHub account. After that, you’ll modify your own forked exercises with Visual Studio and sync changes back to your GitHub account. Teacher will evaluate exercises straight from students’ GitHub accounts.

Read following instructions carefully and do the steps exactly as instructed!

Preparations GitHub

  1. If you don’t have GitHub account, create it here
  2. Login to account and follow this link
  3. Click Fork-button on top right corner. These excercises will be forked (=copied) to your GitHub account.
  4. Go back to main page by clicking the “cat icon” on top left corner
  5. Click forked “H2C-csharp-exercises” repository from left
  6. Now copy web browser link and send it to teacher via e-mail: tero.niemi(at)centria.fi
  7. Email subject: “H2C C# exercise link”
  8. Teacher will use this link to evaluate your exercises

Preparations Visual Studio

  1. Download Visual Studio 2019 here
  2. Select .NET and Universal Windows platform to be installed
  3. After installation, download GitHub Extension and install it to Visual Studio.
  4. Open Visual Studio
  5. Click Clone Repository
  6. Click GitHub from below and login with browser
  7. Login by using GitHub account
  8. Go back to Visual Studio, you should now be able to see all excercises files in Visual Studio

How to do and return exercises

Watch instruction video here

  1. Read appropriate material section and then read exercise instruction, that you know what to do. You can read exercise instruction from your own GitHub account, just select the repository “H2C-csharp-exercises”. Scroll down page and you’ll see instructions for all exercises.
  2. Open Visual studio and your reposition which contains all exercises code templates.
  3. Open correct exercise number and rightclick Program.cs file and select “Set as startup item”
  4. Modify code
  5. Build Program (CTRL + B)
  6. Start without debugging (Ctrl + F5)
  7. If satisfied and program working fine, push it back to your GitHub account (check following steps).
  8. Right click your program-file and select “Go to Git changes”
  9. Write current date to message box and click “Commit all”
  10. Yellow background text appears which says commit created locally. Click Sync.
  11. Yellow background text vanishes.
  12. Click Sync under “Branch” text.
  13. Syncing starts, it will take some time to sync.
  14. Login to your Github account and check that modifications are shown there as well (remember to refresh web page)
  15. Do as many exercises as you can, your grade will be based on amount of exercises done correctly.

Copyright © 2020 Heikki Ahonen and Tero Niemi. More information about licensing here.