Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring - Part 2 #37

Open
dpshelio opened this issue Nov 27, 2024 · 0 comments
Open

Refactoring - Part 2 #37

dpshelio opened this issue Nov 27, 2024 · 0 comments
Labels
preparation Exercises to do before the class week09 Structure and design

Comments

@dpshelio
Copy link
Contributor

dpshelio commented Nov 27, 2024

This follows on from #36.

Stage 2: Using a Person Class

We will now look at at how to represent and manipulate the person data with our own Person class.

Instead of each person being a dictionary, we will represent them with the class that has methods for dealing with the connections. We will restructure our code so that the functions become methods of the class. You may also wish to refer to the course notes on object-oriented design.

One example of the starting point for the structure is the file initial_person_class.py.
We have implemented some methods for these classes, but not everything that is required (the remaining methods have pass instead of actual code).

Your task:

  1. You should already have the files from the previous part.
  2. Fill in the remaining code in initial_person_class.py so that the file works as before.
  3. Run the file to make sure the assertions are still satisfied.
  4. Commit your changes.
  5. Create a pull request from your branch to the original friend-group repository and use the text in the description to link your PR to this issue Answers UCL-COMP0233-24-25/RSE-Classwork#37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preparation Exercises to do before the class week09 Structure and design
Projects
None yet
Development

No branches or pull requests

1 participant