Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are to create a program that you use for keeping track of textbooks required and recommended for classes and the cost of those textbooks.

image text in transcribedimage text in transcribed

You are to create a program that you use for keeping track of textbooks required and recommended for classes and the cost of those textbooks. All input will be taken from standard input. Each line of input will begin with a single or double character code that identifies the type of operation that line describes. The possible line formats are Command B Explanation Define a book. The ISBN is a 13-digit number. The Title is a string of arbitrary length (ending with a line break). (Note that you favorite integer data type may not big enough for 13-digit numbers. In that case, it is OK to use a C++ std:string instead to store this number B 1234567890123 Programming for Programmers Example Command | D <value> Explanation Define a characteristic of a book (for the book with the given ISBN. If 'A' is used, then the Author is set, and the value is name of the author (string of arbitrary length, ending with end of line). If 'E' is used, the value is the number of the edition (a positive integer). If D is used, it is the date of publication, where the date is in MM/YYYY format no da Example D 1234567890123 D 01/2017 Command M <isbn> <cost> <n i ui r ie> Explanation Define the cost for a book. ISBN is the ISBN number; Cost is an amount, expressed as a floating-point number with 2 spaces after the decimal point. The final letter indicates whether the price is for a New, Used, Rented, or Electronic version of the book. A book may have a different price for each format M 1234567890123 39.99N Example Command C <department code> <course number> <name> Explanation Define a course. The Department Code is a 4-letter code for a department. The course number is a 3-digit number for the course. The name is a name for the course - a string of arbitrary length, ended by the end of the line C CSCE 315 Programming Studio Example Command A <isbn> <department code> <course number> <section number> Explanation Assign a book to a class. The ISBN is the ISBN number for the book. The Department Code and Course number are as in the definition of a course. The section number is a 3 digit integer. The final digit is either R for required or O for optional A 1234567890123 CSCE 315 501 R Example</section></course></department></isbn><ame></course></department><></cost></isbn></value>

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

Recommended Textbook for

Databases And Information Systems 1 International Baltic Conference Dbandis 2020 Tallinn Estonia June 19 2020 Proceedings

Authors: Tarmo Robal ,Hele-Mai Haav ,Jaan Penjam ,Raimundas Matulevicius

1st Edition

303057671X, 978-3030576714

More Books

Students also viewed these Databases questions