Skip to content

CodingDors/object-oriented-programming-python-ancatabaranu

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README for Simple Library System Exercise


📚 Simple Library System in Python

Welcome, students! 🚀 This exercise is tailored to enhance your grasp on object-oriented programming, dictionaries, and basic regular expression validation in Python.

🎯 Objectives

  • Implement and comprehend the mechanics of a basic library system.
  • Develop classes and functions that interact to simulate a library.
  • Validate method implementations through testing and debugging.

🔍 Overview

Your primary working file is exercise.py, which contains stubs for the Book and Library classes. Each class has methods you must implement.

exercise.py also contains a driver() function that demonstrates how each method works and provides log messages to elucidate the expected behavior of each method.

As you go about implementing each method, you can uncomment its respective lines in the driver() function to validate its functionality.

✅ Tasks

1️⃣ Understand the Distribution Code

While inside exercise.py:

  • Go through each function's docstrings to understand the desired implementation.
  • Run the command:
python exercise.py
  • Also run before starting on the terminal
pytest

You should run this after completing each function to verify that it was correctly implemented. Once all tests pass you can submit your code for review.

2️⃣ Implementing the function

Implement each function in the TODO. Do the following steps:

  • Add your implementation
  • Uncomment corresponding section on driver() and run python exercise.py to make sure it works as you intenteded.
  • Run pytest to make sure it passsed the tests

3️⃣ Committing and Pushing Changes using VSCode Codespaces

Once all the tests have completed:

  1. Stage Changes:
    • View your changes in the Source Control view.
    • Click on the + (plus) sign next to the files you wish to stage.
  2. Commit Changes:
    • Enter a descriptive commit message.
    • Press Ctrl + Enter (or Cmd + Enter on macOS) to commit the changes.
  3. Push Changes:
    • Click on the ellipsis ... in the Source Control view.
    • Select Push.
  4. Verify you code has passed:

📘 Resources

🤔 Need Help?

  • Clarifications: Don’t hesitate to ask for clarifications regarding the functionality of the on Discord.
  • Debugging: If you’re grappling with bugs or issues, seek help! Debugging is key to learning.
  • Answer: We have a file called the_answer.py. Only look at it if you are stuck for some time (30 min+)

Should your functions exhibit unexpected behaviors or issues:

  • Place breakpoints in your code within VSCode.
  • Use the VSCode debugger to navigate through your code, inspect variables, and diagnose potential issues.
  • Modify your code as needed, guided by your findings during debugging.
  • Debugger Tutorial

About

OOP problems

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%