Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Complete the following program in C++ books that you read. Since you are now a seasoned C+ programmer, you are going to wite a C++program

Complete the following program in C++ image text in transcribed
image text in transcribed
books that you read. Since you are now a seasoned C+ programmer, you are going to wite a C++program to perform this function You will define a structure caled book list that will hold a number associated with each book (int), book ttle (string)author (string), a description of the book string), a date when the book was read stored in 2 parts-month (int) and year int) and a rating of the book (int. The number will be generated by the program as each book is entered. The rating should be limited to a number between 1 and 10. It will be a scale the user can enter what they thought of the book Your program is to check to see ia le called Treadinglist.o ifitdoes, read into an array of structures of type book-ist. already exists and The program will execute until the user selects 6 to exit the program. The program should have a menu that asks the user to 1) print bocks 2) enter a new book 3) modify a book 4) print how many books are in the list 5) print al of the books that have a certain rating 6) exit the program. I the user enters 1, all of the books will be printed to the screen indluding the book number. If the user enters 2, the program will ask the user for the be, author, description, date, and rating, If the user selects 3, the program should ask the user for the book number to be modfied and all of the new inormation for that book. the user selects 4, you are to print the total number of books in the database to the When the user enters 5 you are to ask for the rating and then print out only the books with that rating. When the user selects 6 to exit the program, you are to create a new file or overwrite the existing file and warite each record to the text file reading_ Iist. Structure member defintons: .Book number- to be generated by the programmer for each new book hat is entered Book tite This should be able to hoild spaces Author-should be able to hold spaces . Description-should be able to hold spaces Date-should be a month stored as 1-12 and year stored with all four digits, Le. 2017. It should be printed as 0X000X e 92018 when printing it to the screen. - Rating- should be a number between 1 and 10 . Create an array of structures containing the structure members as defined . The program needs to be able to handle data for up to 500 books Read the data from the file reading list tf and save each book record in - a structure in your array when you start your program (Only read once) Write to the fle once-when the user selects exit The title, author, and description should be able to contain spaces. Book numbers must start with 1 and be generated by the program . . You need to keep track of how many books there are - You must use a switch statement for the menu selection DO NOT use break statements except in the switch staternent. Sample output if 1 selected 1Les Miserables Victor Hugo About a released prisoner and his changed Ife 9201610 2 Of Men and Angels Bodie Thoene About the Irish discontent 7/2015 Sample input if 2 selected Enter tite: Raising Boys Enter author: James Dobson

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

Current Trends In Database Technology Edbt 2004 Workshops Edbt 2004 Workshops Phd Datax Pim P2panddb And Clustweb Heraklion Crete Greece March 2004 Revised Selected Papers Lncs 3268

Authors: Wolfgang Lindner ,Marco Mesiti ,Can Turker ,Yannis Tzitzikas ,Athena Vakali

2005th Edition

3540233059, 978-3540233053

More Books

Students also viewed these Databases questions

Question

Where those not participating, encouraged to participate?

Answered: 1 week ago

Question

Were all members comfortable brainstorming in front of each other?

Answered: 1 week ago

Question

4. What will the team agreement contain?

Answered: 1 week ago