Skip to content

AlexRS90/OOP-school-library

Repository files navigation

School Library

In this project I'm working with Ruby using OOP.

Milestone 1:

✅ Created a new class called Person with the following methods:

  • initialize as constructor
  • can_use_services?
  • is_of_age? as private method
    ✅ Added setters and getters for name, age and id
    ✅ Created a Student class that inherits from Person
    ✅ Created a Teacher class that inherits from Person

Override can_use_services? method thanks to polymorphism

Milestone 2:

✅ Created a new class called Corrector
✅ Added a method to limit the number of characters to 10 and capitalize the first character 🅰️
✅ Set a instance of Corrector in Person class on initialization 🤝
✅ Added a method called validate_name to update @name using Corrector instance 🆙

Milestone 3:

✅ Created a class Classroom 🧑‍🏫
✅ Created the has-many/belongs-to relationship between Classroom and Student ◀️ ▶️
✅ Created a class Book 📚
✅ Create a class Rental 🧾
✅ Create the many-to-many relationship between Person and Book using the intermediate class Rental ⏫ ⏬

Milestone 4:

✅ Created main.rb as entry point to the app.rb 🧑‍💻
✅ Added methods to do the following: ⬇️ ⬇️

☑️ List all books 📚
☑️ List all people 👩 👨 🧑‍🏫 👦
☑️ Create a new student or teacher 👨‍🏫 🧒
☑️ Create a book. 📖
☑️ Create a rental. 🧾
☑️ List all rentals for a given person id. 📄

✅ Added user interaction, he/she is able to do the following: ⬇️ ⬇️

☑️ Present the user with a list of options to perform.
☑️ Lets users choose an option.
☑️ If needed, ask for parameters for the option.
☑️ Have a way to quit the app.

Built With

  • Ruby

To get a local copy up and running follow these simple example steps.

Open your termnial and run the following command:

git clone https://github.com/AlexRS90/OOP-school-library.git

Prerequisites

  • Ruby
  • Terminal

Author

👤 Alejandro Ramos

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Show your support

Give a ⭐️ if you like this project!

📝 License

This project is MIT licensed.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages