Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please test it on these inputs: B 1234567890123 Programming for Pros B 1234567890124 Programming for Dummies B 1234567890125 Programming for Pets D 1234567890123 D 02/2017

image text in transcribed

image text in transcribed

Please test it on these inputs:

B 1234567890123 Programming for Pros B 1234567890124 Programming for Dummies B 1234567890125 Programming for Pets D 1234567890123 D 02/2017 D 1234567890123 A King of Stupid D 1234567890123 E 5 D 1234567890124 D 05/2017 D 1234567890124 A Ray D 1234567890124 E 2 D 1234567890125 D 03/2017 D 1234567890125 A James D 1234567890125 E 3 M 1234567890123 1 N M 1234567890123 1 U M 1234567890123 1 R M 1234567890123 1 E M 1234567890124 1 N M 1234567890124 1 U M 1234567890124 1 E M 1234567890124 1 R M 1234567890125 1 N M 1234567890125 1 U M 1234567890125 1 R M 1234567890125 1 E C ECEC 215 Programming Studio C ECEC 111 Unix Testing A 1234567890123 ECEC 215 501 R A 1234567890123 ECEC 215 502 R A 1234567890123 ECEC 215 503 R A 1234567890124 ECEC 213 604 R A 1234567890124 ECEC 213 607 R A 1234567890124 ECEC 213 603 R A 1234567890125 ECEC 215 501 R A 1234567890125 ECEC 215 502 R A 1234567890125 ECEC 215 503 R GC ECEC 215 GS ECEC 215 504 GC ECEC 111 GS ECEC 111 605 GB 1234567890123 GB 1234567890124 GB 1234567890125 PB PC PY 02/2017 PY 05/2017 PD ECEC PM ECEC

You are to create a program that can be used 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: B KAI E I D> <value define a characteristic of book the with given isbn. if is used then author set and value name arbitrary length ending end line number edition positive integer ifd it date publication where in mm format day e.g.: d m> <ni ui rie> 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. e.g.: M 1234567890123 39.99 N C Department Code <course number define a course. the department code is letter for department. course name string of arbitrary length ended by end line e.g.: c csce programming studio> <department code number> <section number i o assign a book to class. the isbn is for book. department code and course are as in definition of course. section digit integer. final either r required or optional e.g.: csce gc print books all sections given gs gb> Print a information known about a particular book You are to create a program that can be used 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: B <isbn> <title define a book. the isbn is digit number. title string of arbitrary length with line break e.g.: b programming for programmers d> KAI E I D> <value define a characteristic of book the with given isbn. if is used then author set and value name arbitrary length ending end line number edition positive integer ifd it date publication where in mm format day e.g.: d m> <ni ui rie> 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. e.g.: M 1234567890123 39.99 N C Department Code <course number define a course. the department code is letter for department. course name string of arbitrary length ended by end line e.g.: c csce programming studio> <department code number> <section number i o assign a book to class. the isbn is for book. department code and course are as in definition of course. section digit integer. final either r required or optional e.g.: csce gc print books all sections given gs gb> Print a information known about a particular book</section></department></course><i></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

More Books

Students also viewed these Databases questions