In this project I'm working with Ruby using OOP.
✅ Created a new class called Person with the following methods:
initialize
as constructorcan_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
✅ 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 🆙
✅ 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
⏫ ⏬
✅ 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.
- 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
- Ruby
- Terminal
👤 Alejandro Ramos
- GitHub: @AlexRS90
- Twitter: @AlejandroRBenji
Contributions, issues, and feature requests are welcome!
Give a ⭐️ if you like this project!
This project is MIT licensed.