Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

So my question is if you could correct the code I found, so that the code matches the output it should match up with for

So my question is if you could correct the code I found, so that the code matches the output it should match up with for ms51,ms52,ms53,ms54,ms55, and ms56.

The problem ms51 has is a problem all my submission for ms51,ms52,ms53,ms54,ms55, and ms56 have. The problem I see is that the width for the author should be longer so that J. R. R. Tolkie could be J. R. R. Tolkien. An even if I change the max author width from 15 to a higher number like 150 that still does not solve my output problems because the second problem i HAVE IS THAT

i GET

B -1 S001 Book one 0 2020/10/10 John Doe P -1 S002 Daily one 0 2020/10/10

WHEN i AM SUPPOSE TO GET

B 1095 S001 Book one 0 2020/10/10 John Doe P 1096 S002 Daily one 0 2020/10/10

i DO NOT KNOW WHY THE -1 IS APPEARING INSTEAD OF 1095 aLL PROBLEMS TO THIS CODE SHOULD BE FOUND IN THE libApp.cpp and libApp.h files.

Here is the link to the project files https://github.com/Seneca-244200/OOP-Project/tree/main/MS5

Here is the link to the code I found that comes closest to the desired output I want, get all files from the go file link: https://gofile.io/d/viobkx

This is the output I get for Ms51

Loading Data Seneca Library Application 1- Add New Publication 2- Remove Publication 3- Checkout publication from library 4- Return publication to library 0- Exit > 1 Adding new publication to the library Choose the type of publication: 1- Book 2- Publication 0- Exit > 1 Shelf No: S001 Title: Book one Date: 2020/10/10 Author: John Doe Add this publication to the library? 1- Yes 0- Exit > 1 Publication added

Seneca Library Application 1- Add New Publication 2- Remove Publication 3- Checkout publication from library 4- Return publication to library 0- Exit > 1 Adding new publication to the library Choose the type of publication: 1- Book 2- Publication 0- Exit > 2 Shelf No: S002 Title: Daily one Date: 2020/10/10 Add this publication to the library? 1- Yes 0- Exit > 1 Publication added

Seneca Library Application 1- Add New Publication 2- Remove Publication 3- Checkout publication from library 4- Return publication to library 0- Exit > 0 Changes have been made to the data, what would you like to do? 1- Save changes and exit 2- Cancel and go back to the main menu 0- Exit > 1 Saving Data

------------------------------------------- Thanks for using Seneca Library Application B 1001 C544 The Hobbit 35277 2021/11/14 J. R. R. Tolkie B 1002 D208 Harry Potter and the Philosopher's Stone 72685 2021/11/19 J. K. Rowling P 1018 P002 The Toronto SUN 85176 2021/11/17 P 1019 P002 The Toronto SUN 0 2021/11/11 B 1048 N518 The Bridges of Madison County 15467 2021/11/14 Robert James Wa B 1061 Z192 Charlotte's Web 0 2021/11/17 E. B. White; il B 1062 V718 The Tale of Peter Rabbit 0 2021/11/12 Beatrix Potter P 1093 P008 Canadian Running Magazine 77051 2021/11/25 P 1094 P008 Canadian Running Magazine 0 2021/11/18 B -1 S001 Book one 0 2020/10/10 John Doe P -1 S002 Daily one 0 2020/10/10 ==243130== ==243130== HEAP SUMMARY: ==243130== in use at exit: 0 bytes in 0 blocks ==243130== total heap usage: 77 allocs, 77 frees, 102,550 bytes allocated ==243130== ==243130== All heap blocks were freed -- no leaks are possible ==243130== ==243130== For lists of detected and suppressed errors, rerun with: -s ==243130== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

The correct output I am suppose to get is below:

Loading Data Seneca Library Application 1- Add New Publication 2- Remove Publication 3- Checkout publication from library 4- Return publication to library 0- Exit > 1 Adding new publication to the library Choose the type of publication: 1- Book 2- Publication 0- Exit > 1 Shelf No: S001 Title: Book one Date: 2020/10/10 Author: John Doe Add this publication to the library? 1- Yes 0- Exit > 1 Publication added

Seneca Library Application 1- Add New Publication 2- Remove Publication 3- Checkout publication from library 4- Return publication to library 0- Exit > 1 Adding new publication to the library Choose the type of publication: 1- Book 2- Publication 0- Exit > 2 Shelf No: S002 Title: Daily one Date: 2020/10/10 Add this publication to the library? 1- Yes 0- Exit > 1 Publication added

Seneca Library Application 1- Add New Publication 2- Remove Publication 3- Checkout publication from library 4- Return publication to library 0- Exit > 0 Changes have been made to the data, what would you like to do? 1- Save changes and exit 2- Cancel and go back to the main menu 0- Exit > 1 Saving Data

------------------------------------------- Thanks for using Seneca Library Application B 1001 C544 The Hobbit 35277 2021/11/14 J. R. R. Tolkien B 1002 D208 Harry Potter and the Philosopher's Stone 72685 2021/11/19 J. K. Rowling P 1018 P002 The Toronto SUN 85176 2021/11/17 P 1019 P002 The Toronto SUN 0 2021/11/11 B 1048 N518 The Bridges of Madison County 15467 2021/11/14 Robert James Waller B 1061 Z192 Charlotte's Web 0 2021/11/17 E. B. White; illustrated byGarth Williams B 1062 V718 The Tale of Peter Rabbit 0 2021/11/12 Beatrix Potter P 1093 P008 Canadian Running Magazine 77051 2021/11/25 P 1094 P008 Canadian Running Magazine 0 2021/11/18 B 1095 S001 Book one 0 2020/10/10 John Doe P 1096 S002 Daily one 0 2020/10/10 ==15100== ==15100== HEAP SUMMARY: ==15100== in use at exit: 0 bytes in 0 blocks ==15100== total heap usage: 60 allocs, 60 frees, 100,453 bytes allocated ==15100== ==15100== All heap blocks were freed -- no leaks are possible ==15100== ==15100== For lists of detected and suppressed errors, rerun with: -s ==15100== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions