Find Jobs
Hire Freelancers

C++ Data Structures.

$10-30 USD

Në vazhdim
Postuar almost 6 years ago

$10-30 USD

Paguhet në dorëzim
C++ You will have to implement a searchable textbook database. This will allow the user to search for the author (or ISBN or publisher, etc.) for a book with a particular title, as well as finding all books by a particular author, among other things. You will implement 2 classes: Book and BookDatabase. The Book class must contain: A string for the title and publisher, an integer for the year of publication, and a vector (or list, or set) of strings for the author. (You can choose whichever one you want). The Book class will have the following member functions defined on it: Book(const string& title, const string& publisher, int yearOfPublication, string* au- thors, int numAuthors); This is the book constructor. It will initialize all the member variables and also store all of the authors names in the container that will hold these names. Accessor functions for all of the data fields, e.g. string getTitle(), etc. bool operator ==(Book& b1, Book& b2); This will return true iff the two Books have the same title. (You can assume that the database will not contain 2 books with exactly the same title. bool operator < (Book& b1, Book& b2); This will return true iff the title of book1 is lexicographically before the title of book2. ostream& operator << (ostream& os, Book& b); This will print a representation for a Book. For example: Title: Data Structures with C++ Using STL Authors: William Topp and William Ford Publisher: Prentice Hall Year: 2002 You may, of course, write as many private functions as you would like to help your im- plementation. The BookDatabase class must have the following member variables: A map whose keys are strings and values are Book objects, such that the key is a string representing the book’s title, and the value is a Book object corresponding to that title. For example for the Book object described above, the key would be “Data Structures with C++ Using STL” and the value would be the Book object containing that same string as a title, “Prentice Hall” as the publisher, 2002 as the year, and {“William Topp”, “William Ford”} (However you want to represent this.) as the authors. The declaration for that map should be: map <string, Book> bookData; The BookDatabase class should have the following operations: Book& searchByTitle(const string& title); returns a reference to the Book object that contains the given title. set<Book> searchByAuthor(const string& author); returns a set of Books by the given author. (This one is a bit tricky). set<Book> publishedBefore(int year); returns a set of Books that were published before a given year. set<Book> searchByPublisher(const string& publisher); returns a set of Books that were published by the given publisher. void addBook(Book& book); adds a new book to the database if it is not there already. (You will implement this by adding a new pair into the map where the key is [login to view URL]() and the value is book). If it is there already, do nothing. void removeBook(const string& title); Remove the book with the given title from the database if it is there. ostream& operator <<(ostream& os, BookDatabase& bookDatabase); Prints a representation for a book database. You may use the “[login to view URL]” file that I have uploaded as your data, but you should add some more items to the file for testing purposes. You must submit: Books.h, [login to view URL], BookDatabase.h, [login to view URL], and [login to view URL], which is a test program for the database. You may use ONLY those functions that are part of the API on the course webpage. Un- less you ask me first, you may not use any fancy map or set member functions unless you write them yourself.
ID e Projektit: 16904668

Rreth projektit

3 propozime
Projekt në distancë
Aktive 6 yrs ago

Po kërkoni të fitoni para?

Përfitimet e ofertës për Freelancer

Vendosni buxhetin dhe afatin tuaj
Paguhuni për punën tuaj
Përshkruani propozimin tuaj
Është falas të regjistrohesh dhe të bësh oferta për punë
3 freelancers are bidding on average $32 USD for this job
Avatari i Përdoruesit
Hello. How are you . I have read I have strong knowledge in Data structures, Algorithms Design, Computer Architecture And I'm expert in C/C++ etc. I'm interested in this project. Please send me a message so that we can discuss more. Then I'll be happy. I wait for your good reply. Thanks.
$45 USD në 1 ditë
4,9 (125 përshtypje)
6,2
6,2
Avatari i Përdoruesit
Hello, I am interested in this project and so wanted to discuss more it in details. I have experience in C++ programming. Please hire me. I will keep your time.
$25 USD në 1 ditë
4,9 (82 përshtypje)
6,1
6,1

Rreth klientit

Flamuri i UNITED STATES
Brooklyn, United States
5,0
2
Mënyra e pagesës u verifikua
Anëtar që nga maj 5, 2018

Verifikimi i klientit

Punë të tjera nga ky klient

SQL Small Exercise
$10-30 USD
Faleminderit! Ne ju kemi dërguar me email një lidhje për të kërkuar kredinë tuaj falas.
Ndodhi një gabim gjatë dërgimit të email-it tuaj. Ju lutemi provoni përsëri.
Përdorues të regjistruar Punë të postuara
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Po ngarkohet shikimi paraprak
Leja u dha për Geolocation.
Seanca e hyrjes ka skaduar dhe ke dalë. Hyr sërish.