CPSC 421-010 Object-Oriented Programming (OOP) Spring 2024

Exercise 5: Rainfall I

Take the starting rainfall.cpp code and make the same changes that I make in class.

Your code is in a repository from GitHub Classroom:

  1. Log in to your GitHub account.
  2. Click on the invitation link (GitHub Classroom Rainfall) on the main course page in Brightspace.
  3. Follow the directions to link your GitHub account to your UA ID.

Environment

  1. Local

    This would be on your own machine with local files.

    First, you need to authenticate your local environment with GitHub: Guide: GitHub Authentication. This only has to be done once per environment, e.g. WSL on Windowws.

    Then you clone the repository. Cloning creates a local repository that is a copy of your repository at GitHub.

    You can get the repo link from the button <> Code button on GitHub, then under Local and HTTPS.

    Cloning a repository creates a directory with the name of your repository, e.g., _rainfall-_. To work on the files, you need to move into that directory:

  2. GitHub Codespaces

    GitHub Codespaces provides a development environment in the browser. When you create one from your GitHub Repository, you are already authenticated with GitHub and have a clone repository. So you can start working right away

    You can start a Codespace from the button <> Code button on GitHub, then under Codespaces.

Build Setup

Git Workflow on Rainfall

  1. Edit files locally, e.g., add a header comment to the file rainfall.cpp
  2. Build, run, and check your work
  3. View your changes
  4. Commit current changes to the local repository:
  5. Push your local commits to the GitHub repository:
  6. View and verify your changes at GitHub in your browser Do not skip this verification
  7. View your commits locally

Note Your code must build and compile. If you have a build warning or error, fix these before making any more changes to the code.

Note You must commit each change that I make separately and use the exact commit message that I use in class