Answered step by step
Verified Expert Solution
Question
1 Approved Answer
send help Write a C+ program named books . Copy the data file booklites dat into your project directory with the command op contabile dat
send help
Write a C+ program named books . Copy the data file booklites dat into your project directory with the command op contabile dat What to include in Thooks.cpp" program 1. The program reads the tales of a collection of books from a data file and we them in an array .) This should be done using a ser defined function named "RudData". This function should have parameters the input file stream the array of book titles, and the number of books read from the file 2. Then, the program prints out the list of book titles, one title perline 3. Afterwards, the program goes into a query mode prompting the user querywhether a book is in the collection of the book is in the collection is display is location in the collection for book is not in the collectie, inform the user about that. The query mode and when the enters an empty stringe, simply press the "ENTER"key when prompted for book title Notice: The index of the first element in the amey is 0. Yet, for the output the value coexpending to the first book should be . Same goes for the location values returned in the gry made Here is an example run of the program 1 : A Send in the Road 2A New Earth: Awakening to Tour Life's Purpose 1: A Spool of blue Thread: A novel Cane River 5. Drowning Ruth: A Novel 6 I Know This Much Is True A Novel 7 Middlesex: A Novel #Night Night) 9 Ruby 10 Shantaran A Novel 11 : She's Come Undone 12 Take Me With You 13 The Alchemist 14 The Book of Awakening: Having the Life You Want by Being Fresent to the life You Have 15 The Gifts of Imperfection: Let Go of who You Think You're supposed to me and abrace w Tos Are 16 The Invention of Wing 17 The Life We Bury 18 : The Nightingale 19 The Pecan Han 20 : The Plum Tree 21 The Secret Life of Bees 22 The Untethered soul. The Journey beyond yourself 2) Me Are Water A Novel (7.8.) 24 : What I Know For sure 25: What she left behind 261 When I Found You 27: While I was gone 28 Whistling Past the Graveyard 29 1 Yellow Crocus Enter the book titlet Ruby The book is at location Enter the book title: The Plun Tree The book is at location 20 Enter the book title: wide I Was Gone The book is at location 27 Enter the book title: Harry Potter The book is not in the collection Enter the book title: The Dragon Maker The book is not in the collection Enter the book titler Take Me With You the book is at location 12 Enter the book titles Here is the Liar Search function int Linear search const string an int size, string to ind) // Look through all items, starting at the front. for (int i.; Size: 1) if (i toind) return it 1 // You've gone through the whole list without us return-1 Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started