Question: Do in C++ Part2 Design and implement a C++ program (book7.cpp to book10.cpp) to read a file, to do the following tasks. You may continue

Do in C++

Do in C++ Part2 Design and implement a C++ program (book7.cpp tobook10.cpp) to read a file, to do the following tasks. You maycontinue this Part2 from Partl, or to create a new sqlite3 database

Part2 Design and implement a C++ program (book7.cpp to book10.cpp) to read a file, to do the following tasks. You may continue this Part2 from Partl, or to create a new sqlite3 database with the sql statements to create book table and to insert the records (as shown in Partl) You should design and implement C++ class object (book) corresponding to the database table book. The class should contain each member variable (corresponding to each table field name). For each member variable, you should define get & set method (for example, getAuthor and setAuthor for author in the table book, along with constructor method and destructor method. Task#7. Design and implement C/C++ program (book.cpp) to select all the records from table book and create each object of class book corresponding to each record from the table book. Task#8. Design and implement C/C++ program (book8.cpp) to have a C++ static variable (bookMap) which is an associative map, to keep track of (the reference of) each book object (from Task#7) so that you may enumerate (iterate) each object. The map keeps track of the pair of (a) book title as key and (b) its reference to the corresponding object of the book. Then output the content of the map, sorted by book title and output each object. Task#9. Design and implement C/C++ program (book9.cpp) to iterate each book object in the map, to write each object into a binary file (book.bin). Then delete all the book objects and empty all the entries in the map Task #10. Then your program (book 10.cpp) is to read this binary file (book-bin), reading each book object from the file into a new book object, and create an entry to the map as you have done in Task #8, and then to output the content of the map to show that the program has done this task. Task #11. Provide Makefile file to compile your program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!