Giter Club home page Giter Club logo

oop-project's Introduction

OOP-Project

This repository contains the solution for an Object-Oriented Programming (OOP) assignment, which involved implementing two classes (Book and Library) in C++ and writing a driver program to test them.

Book Class The Book class represents a book with a title, ISBN, first author, and number of copies. The class has a parameterized constructor, getters and setters for all data members, and a method to update the number of copies. The Book class is used by the Library class to store information about the books in the library.

Library Class The Library class represents a library that contains several books. The class has a dynamic array of Book objects that represents all unique book titles in the library. The Library class has methods to add and remove books, resize the dynamic array, find books by title or ISBN, and get information about the library (e.g., current number of books, maximum number of books, capacity usage).

Driver Program The driver.cpp program tests the Book and Library classes by creating a dynamic array of Book objects, filling them with data from the user, creating a Library object, and adding the books to the library. The program also demonstrates the use of some of the methods of the Library class.

Files The repository contains the following files:

book.cpp: implementation of the Book class book.h: header file for the Book class library.cpp: implementation of the Library class library.h: header file for the Library class driver.cpp: driver program to test the classes Makefile: makefile to build the program Building and Running the Program To build the program, run the following command:

make

This will compile the driver.cpp, book.cpp, and library.cpp files and create an executable named driver.

To run the program, run the following command:

./driver

This will run the driver program and test the Book and Library classes.

Author The code in this repository was written by Ahmad Awwad, Ahmad Adawi, and Adnan Saeed.

Acknowledgments This assignment was given as part of Object Oriented Programming course/ Princess Sumaya University for Technology. Thanks to Anas Abu-Taleb for providing the assignment and specifications.

oop-project's People

Contributors

aawwad172 avatar

Watchers

 avatar

Forkers

3dawi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.