c++- lab

Hello,I am working on a lab and I am half way done. I need someone to finish my program. I am submitting a text file where you can find the cpp files and h files necessaries to finish the lab.Thank you,
lab5.txt

lab_5_assignment__1_.docx

Don't use plagiarized sources. Get Your Custom Essay on
c++- lab
Just from $13/Page
Order Essay

Unformatted Attachment Preview

LibraryBook.cpp
// Your name
// Today’s date
// Lab #4
// Ensure class isn’t added more than once
#ifndef LIBRARYBOOK_H
#define LIBRARYBOOK_H
#include
using namespace std;
// Write LibraryBook class here
// Define LibraryBook functions here
// This matches #ifndef at beginning of the file, so leave it in
#endif
LibraryBook.h
// Your name
// Today’s date
// Lab #4
// Ensure class isn’t added more than once
#ifndef LIBRARYBOOK_H
#define LIBRARYBOOK_H
#include
using namespace std;
// Write LibraryBook class here
// Define LibraryBook functions here
// This matches #ifndef at beginning of the file, so leave it in
#endif
Sample checkedout.txt
Books checked out:
—————–Title Author
ISBN
Code: The Hidden Language of Computer Hardware and SoftwareCharles Petzold
1735611319
Interconnection Networks
Jose Duato 1558608524
Understanding Computers: Today & Tomorrow, Comprehensive
Deborah Morley
1423925211
Logic and Computer Design Fundamentals
M. Morris Mano
1131678493
books.txt
Nine Algorithms That Changed the Future
John MacCormick
1691147140
Code: The Hidden Language of Computer Hardware and Software
Charles Petzold
1735611319
Introduction to Algorithms
Thomas H. Cormen
1262033844
The Science of Programming
David Gries
1387964800
Interconnection Networks
Jose Duato
1558608524
Computer System Architecture
M. Morris Mano
1131755633
Understanding Computers: Today & Tomorrow, Comprehensive
Deborah Morley
1423925211
Logic and Computer Design Fundamentals
M. Morris Mano
1131678493
Methods in Algorithmic Analysis
Vladimir A. Dobrushkin
1420068296
Software Engineering: An Engineering Approach
James F. Peters
1471189642
isbns.txt
1558608524
1131678493
1735611319
1471189642
1387964800
1691147140
1558608524
1131678493
1420068296
1735611319
1131755633
1387964800
1735611319
1420068296
1387964800
1691147140
1420068296
1471189642
1420068296
1131678493
1735611319
1387964800
1423925211
1131755633
1131755633
1131755633
1735611319
1558608524
Lab5.cpp
// Your name
// Today’s date
// Lab #4
#include “LibraryBook.h”
#include
#include
#include
using namespace std;
int main() {
// File stream variables
ifstream finBooks(“books.txt”);
ifstream finISBN(“isbns.txt”);
ofstream fout(“checkedout.txt”);
// Check for file errors first
if(!finBooks || !finISBN)
{
cout << "Error opening input files!n"; system("pause"); return 1; } // Write program in here // Close the files at the end finBooks.close(); finISBN.close(); fout.close(); } // End program return 0; Lab #5 You work at the Computer Science 201L Library, and your boss just bought a bunch of new books for the library! All of the new books need to be cataloged and sorted back on the shelf. Thankfully, the library only has a maximum of 15 books, and you don’t need to keep track of what customer has the book or not, just whether they are checked in or out. Directions 1. Open Visual Studio 2010. 2. Create a new project and name it Lab5. 3. Open up Blackboard. 4. Download the files, along with books.txt and isbns.txt. Save them together in your project folder (usually under My Documents, then under Visual Studio 2010, Projects, Lab5, then Lab5 if you have that folder). 5. In Visual Studio, click on Project, Add Existing Item, and add the files to your project. 6. Edit the comments at the top of the files with your name and the date. 7. Start implementing the missing parts. Objects You need to create a class called LibraryBook. It needs to have the following member variables, stored privately: string title, string author, and string ISBN. You also need to have a Boolean to store its status whether it’s checked out or not. Call this variable checkedOut. For functions, this library book class needs to have: • A default constructor setting all strings blank and the checked out status to false • A constructor setting all strings through the parameters (title, author, ISBN), and setting the checked out status to false. • “Getters” to get the values from the private variables. (So getTitle(), getAuthor(), getISBN()) • A checkOut() function to change the status so it is checked out • A checkIn() function to change the status so it is checked in (or NOT checked out) • A isCheckedOut() function to return the status of the book More Information and File Structure The books.txt file has a list of all of the books at the library. The books are listed with the title on one line, the author on the next, then the ISBN on the next. For simplicity, all three are stored as strings in the class, including the number. Using the file streams, you’ve learned how to read in one word or number at a time. To read in an entire line, use the getline() function. For example: string str; ifstream fin(“file.txt”); getline(fin, str); // string variable // input file stream // read one line, store in variable This will read in the while line (not the first word) from the file and store it in the variable str, which is a string. Use this example to read in the title, author, and ISBN from the file. From there, you can pass in your data in as parameters into the LibraryBook object. For example: string title = “title”; string author = “author”; string ISBN = “123”; LibraryBook myBook(title, author, ISBN); STOP HERE! Make sure your program works correctly at this point before continuing. Next, in the isbns.txt file, you have a list of ISBN numbers, one per line. If the ISBN number appears in this file, it has passed through the barcode scanner on the computer to be checked in or out. You can read these in with the normal style you are used to (for example: string theISBN; fin >> theISBN; ). You can then either use the LibraryBook’s checkIn() or
checkOut() function to tag it as either there or not there. To determine which one to use, call
the isCheckedOut() function to find out if it’s at the library or not, then use that Boolean to
determine which function you call.
STOP HERE! Make sure your program works correctly (again) at this point before continuing.
Finally, you need to print the report your boss needs. The report should be named
checkedout.txt and should print out a header consisting of the words “Title”, “Author”, and
“ISBN”, separated by tabs, and on each line after that, the title, author, and ISBN of the books
that are checked out, separated by tabs. You will need to do another loop to iterate through the
array, and print out books that are checked out. For the files provided, your checkedout.txt file
should look like:
Books checked out:
—————–Title
Author
ISBN
Code: The Hidden Language of Computer Hardware and Software
Charles Petzold
1735611319
Interconnection Networks
Jose Duato
1558608524
Understanding Computers: Today & Tomorrow, Comprehensive Deborah Morley
1423925211
Logic and Computer Design Fundamentals M. Morris Mano
1131678493
Grading and Turning In
Turn in your .cpp and .h files on Blackboard by the end of class. You will be grading using the
items listed in the syllabus (algorithm, functional/structural composition, proper input/output,
documentation, programming style, and compilation). If you are not complete, turn it in anyway
and get partial credit.

Purchase answer to see full
attachment

GradeAcers
Calculate your paper price
Pages (550 words)
Approximate price: -

Why Work with Us

Top Quality and Well-Researched Papers

We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.

Professional and Experienced Academic Writers

We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.

Free Unlimited Revisions

If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.

Prompt Delivery and 100% Money-Back-Guarantee

All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.

Original & Confidential

We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.

24/7 Customer Support

Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.

Essays

Essay Writing Service

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.

Admissions

Admission Essays & Business Writing Help

An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.

Reviews

Editing Support

Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.

Reviews

Revision Support

If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.

Order your essay today and save 15% with the discount code DISCOUNT15