CS360

Copyright @ CMPUT301 - University of Alberta

Lab 4 Participation Exercise

Dr. Suleman Shahid and Dr. Abdul Ali Bangash, Department of Computing Science, LUMS (2026). Dr. Hazel Campbell, Department of Computing Science, University of Alberta (2019, 2023, 2024). Dr. Abram Hindle, Department of Computing Science, University of Alberta (2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023). Alexander Wong, 2019. status: published summary: Lab 4 Participation Exercise

Lab 4 Slides

Lab 4 Slides

Extra Information

Command Line Authentication to GitHub

Sensitive Information and Git

What is Sensitive Information

Lab 4 Participation Exercise

This task is for teams.

  1. As a team:

    • Create an Organization in GitHub and then create a repository (repo name: Team name) under this organization.
    • Add your members as collaborators so the whole team will be able to commit to their branches.
    • Create a new Android Studio project (1 project per team) with the same name as the repo name (Team name).
    • Your android project folder is your local repository and write all the commands within this repo/directory.
    • Use 'git init', 'git add', 'git commit', and 'git push' to push your code to the remote
    • Use 'git remote add origin' to add the URL of your remote repo to this local repo.
    • The repository should include .gitignore to not include Android Studio settings files (.idea) and the project build folder.
    • Create an abstract class Shape (java file) with x and y integer fields (as a team).
    • Commit the change and push it to GitHub.
  2. As a member, on your local machine:

    • (Do not fork) Clone the repository and create a branch with your name (do not use RollNum).
    • Create a model class (ex. circle, rectangle, star, etc) (new java file) that extends Shape in your own branch.
    • Commit the change and push the branch to GitHub.
    • Create a pull request to main in Github.
    • Ask another member to merge it.
    • Edit the Shape class by adding a color string field. (String color = "blue";) (local your-own branch)
    • Commit the change. (Don't push it)
    • As a team:

    • Edit the Shape class in the main branch on GitHub by adding a color string field. (String color = "$PUT_YOUR_CHOICE_OF_COLOR";)

    • Commit the change in GitHub.
    • As a member, on your local machine:

    • Pull the main branch from GitHub. You should have a conflict. (Origin/main -> local your-own)

    • Resolve the conflict.
    • Commit the change.
    • Push the branch to GitHub.

Please submit:

  1. Your RollNum

  2. Link to your branch in the repository at LMS

Due Date

Tuesday 5PM