https://github.com/fmanimashaun/school_library
School Library App is a Ruby project focused on implementing classes and objects to manage a school library. This initial step involves creating classes to represent students and teachers.
https://github.com/fmanimashaun/school_library
ruby ruby-gem ruby-oop
Last synced: 7 months ago
JSON representation
School Library App is a Ruby project focused on implementing classes and objects to manage a school library. This initial step involves creating classes to represent students and teachers.
- Host: GitHub
- URL: https://github.com/fmanimashaun/school_library
- Owner: fmanimashaun
- License: mit
- Created: 2023-11-07T09:52:12.000Z (over 2 years ago)
- Default Branch: dev
- Last Pushed: 2023-11-19T07:45:05.000Z (over 2 years ago)
- Last Synced: 2025-02-10T21:19:21.619Z (about 1 year ago)
- Topics: ruby, ruby-gem, ruby-oop
- Language: Ruby
- Homepage:
- Size: 69.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OOP school library
# 📗 Table of Contents
- [📖 About the Project](#about-project)
- [🛠 Built With](#built-with)
- [Tech Stack](#tech-stack)
- [Key Features](#key-features)
- [💻 Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Setup](#setup)
- [Usage](#usage)
- [👥 Authors](#authors)
- [🔭 Future Features](#future-features)
- [🤝 Contributing](#contributing)
- [⭐️ Show your support](#support)
- [🙏 Acknowledgements](#acknowledgements)
- [📝 License](#license)
## 📖 School Library command-Line App
**School Library App** is a Ruby project focused on implementing classes and objects to manage a school library. This initial step involves creating classes to represent students and teachers.
- Ruby
Server
- Ruby
- Create class `Person` with the following:
- Instance vars: `@id`, `@name`, and `@age`.
- Constructor with `name`, `age`, and `parent_permission` as parameter. `name` and `parent_permission` are optional and have default values of `"Unknown"` and `true`.
- Getters for `@id`, `@name`, and `@age`.
- Setters for `@name` and `@age`.
- Private method `of_age?` that returns `true` if `@age` is greater or equal to 18 and `false` otherwise.
- Public method `can_use_services?` that returns `true` if person is of age or if they have permission from parents.
- Create class `Student` with the following:
- Inherits from `Person`.
- Constructor extends parent's constructor by adding `@classroom` and a parameter for it.
- Method `play_hooky` that returns `"¯\(ツ)/¯"`.
- Create class `Teacher` with the following:
- Inherits from `Person`.
- Constructor extends parent's constructor by adding `@specialization` and a parameter for it.
- Override `can_use_services?` so it always returns `true`.
- Each class are be saved in a separate file.
To get started with the project, follow the steps below.
### Prerequisites
To run this project, ensure you have the following installed:
- [Git](https://git-scm.com/)
- [Ruby](https://www.ruby-lang.org/en/)
- A code editor (e.g., [VsCode](https://code.visualstudio.com/))
### Setup
Clone the repository to your local machine:
```bash
git clone https://github.com/fmanimashaun/school_library.git
```
### Usage
To run the program, you can use a Ruby interpreter. For example, to interact with the code, use the following:
```ruby
irb
```
Then, load the required files and start using the classes.
👤 **Fisayo Michael Animashaun**
- GitHub: [@fmanimashaun](https://github.com/fmanimashaun)
- Twitter: [@fmanimashaun](https://twitter.com/fmanimashaun)
- LinkedIn: [Fisayo Michael Animashaun ](https://linkedin.com/in/fmanimashaun)
- [Add your future feature ideas here.]
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
https://github.com/fmanimashaun/school_library/issues
If you like this project leave a start for it.
I'd like to thank Microverse for helping us in the journey to become a Fullstack developer.
This project is [MIT](./LICENSE) licensed.