Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Object Oriented book database sort Problem: A Book Database Databases are an essential part of most computing systems, and has become an indispensable part

C++ Object Oriented book database sort

image text in transcribedimage text in transcribedimage text in transcribed

Problem: A Book Database Databases are an essential part of most computing systems, and has become an indispensable part of our lives as a whole. We encounter many databases on a daily basis, even though we may not realize it (student records, social security, health/medical to just name a few). This homework will look at a mini-database for a library to store book records, and will use a plain text file to store and retrieve information for multiple books. In database terms, this is referred to as a flat-file storage. In a flat-file storage, each line represents one unique record. So if you were to store the information of every book in a collection (for example, the Minneapolis Central Library) in a flat file, this would take up exactly one line per book. You have seen an example of a flat-file database in the lab on earthquake data where you used a comma-separated value (CSV) file. In this homework, you will create an object-oriented program with classes, to 1. read in records for all books available from an input file into C++ objects representing book 2. 3. records sort those records alphabetically based on their title (more on that later), write the sorted records into a different file. Input/output specifications: The input file will be called 'bookinput.dat' (without the quotes) The output file will be called 'bookoutput.dat' (without the quotes) Each line in the input file will contain entry for exactly one book, and the same needs to happen for the output file. 1. 2. 3. 4. Number of records in a file shall not be known upfront. 5. The book records will be made up of the following fields (with data types in parenthesis): 1. 6-digit book ID (string) 2. Author (string) 3. Title (string) 4. Edition (int) 5. Year published (int) 6. A10-digit alphanumeric ISBN (International Standard Book Number) (string) The data types must be as shown. See later in this file for an example input file. Problem: A Book Database Databases are an essential part of most computing systems, and has become an indispensable part of our lives as a whole. We encounter many databases on a daily basis, even though we may not realize it (student records, social security, health/medical to just name a few). This homework will look at a mini-database for a library to store book records, and will use a plain text file to store and retrieve information for multiple books. In database terms, this is referred to as a flat-file storage. In a flat-file storage, each line represents one unique record. So if you were to store the information of every book in a collection (for example, the Minneapolis Central Library) in a flat file, this would take up exactly one line per book. You have seen an example of a flat-file database in the lab on earthquake data where you used a comma-separated value (CSV) file. In this homework, you will create an object-oriented program with classes, to 1. read in records for all books available from an input file into C++ objects representing book 2. 3. records sort those records alphabetically based on their title (more on that later), write the sorted records into a different file. Input/output specifications: The input file will be called 'bookinput.dat' (without the quotes) The output file will be called 'bookoutput.dat' (without the quotes) Each line in the input file will contain entry for exactly one book, and the same needs to happen for the output file. 1. 2. 3. 4. Number of records in a file shall not be known upfront. 5. The book records will be made up of the following fields (with data types in parenthesis): 1. 6-digit book ID (string) 2. Author (string) 3. Title (string) 4. Edition (int) 5. Year published (int) 6. A10-digit alphanumeric ISBN (International Standard Book Number) (string) The data types must be as shown. See later in this file for an example input file

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

3. Explain how to conduct an appraisal feedback interview.

Answered: 1 week ago