Prepapre a database of books that are stored using a vector

Assignment Help Database Management System
Reference no: EM132109183

Programming Project 6(C++, the textbook solution is not correct.)

In this project you are to create a database of books that are stored using a vector. Keep track of the author, title, and publication date of each book.

You program should have a main menu that allows the user to select from the following: (1) Add a book's author, title, and date; (2) Print an alphabetical list of the books sorted by author; and (3) Quit.

You must use a class to hold the data for each book. This class must hold three string fields: one to hold the author's name, one for the publication date, and another to hold the book's title. Store the entire database of books in a vector in which each vector element is a book class object.

To sort the data, use the generic sort function from the <algorithm> library. Note that this requires you to define the < operator to compare two objects of type Book so that the author field from the two books are compared.

A sample of the input/output behavior might look as follows. Your I/O need not look identical, this is just to give you an idea of the functionality.

Select from the following choices:

1. Add new book

2. Print listing sorted by author

3. Quit

1

Enter title:

More Than Human

Enter author:

Sturgeon, Theodore

Enter data:

1953

Select from the following choices:

1. Add new book

2. Print listing sorted by author

3. Quit

1

Enter title:

Problem Solving with C++

Enter author:

Savitch, Walter

Enter date:

2015

Select from the following choices:

1. Add new book

2. Print listing sorted by author

3. Quit

2

The books entered so far, sorted alphabetically by author are:

Savitch, Walter. Problem Solving with C++. 2015.

Sturgeon, Theodore. More Than Human. 1953.

Select from the following choices:

1. Add new book

2. Print listing sorted by author

3. Quit

1

Enter title:

At Home in the Universe

Enter author:

Kauffman

Enter date

1996

Select from the following choices:

1. Add new book

2. Print listing sorted by author

3. Quit

2

The books entered so far, sorted alphabetically by author are:

Kauffman. At Home in the Universe. 1996.

Savitch, Walter. Problem Solving with C++. 2015.

Sturgeon, Theodore. More Than Human. 1953.

Reference no: EM132109183

Questions Cloud

Write a void method named that accepts an integer array : Write a void method named clear that accepts an integer array , and the number of elements in the array and sets the elements of the array to 0.
Write a program to read in various types of test questions : Write a C++ program to read in various types of test questions (multiple choice and True/False) from a test bank (text file), and load the questions.
Determine if the two dimensional array is a magic square : Determine if the two dimensional array is a magic square. The main method will read the size of the array outside of the while loop
Develop both an uml diagram and the corresponding java class : Develop both an uml diagram and the corresponding java class for a New York State Win 4 lottery ticket .
Prepapre a database of books that are stored using a vector : Create a database of books that are stored using a vector. Keep track of the author, title, and publication date of each book.
What is the big deal with this as far as complex projects : what is the big deal with this as far as complex projects are concerned? Surely it is a common characteristic of project management and those whom practice
Write a function that would be used in a recursive-descent : "Given a production, write a function that would be used in a recursive-descent parser for handling that production."
Write a program that transmits a series of characters : The sequence will consist of "AlphaNumber", where Alpha is meant to be a letter, cycling from A to Z, and Number is a digit that cycles through 0 to 9.
Create an algorithm for solving the following version : Create an algorithm for solving the following version of the m Smallest Numbers problem. Instead of just returning the m smallest values.

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd