
In this project, you should develop a library management system application using structures
and files. More specifically, your application should enable a user to read and write book
details to a file (books.txt). The file should store the following information for the books. One
line per book and each field to be separated by tab.
• Book ISBN
• Book title
• Author first name
• Author surname
• Year
• Availability for loan [yes/no]
The user of this application should have the following options in the form of a nice presented
menu.
Add a book: The user should add all the details of each book by answering a set of questions
(book isbn? Book title? author? year?). The availability for loan is randomly generated by the
program (y: yes, n:no). The book should be added at the end of the file.
Search for a book: The user should be given three options here.
▪ Search by the title: The user will input a keyword and the program will
search for all the titles that contain this keyword and display all the
information of the corresponding books.
▪ Search by the author: The user will give the full name of an author and
the program will display all the information of the books by that author.
▪ Search by year: The user will give as input a year and the program will
display all the information of the books published that year.
Total # of books: Print all the books in the file, one on each line, and count the total number
of books in the file.
Borrow a book: All the books that are available to borrow are displayed in the screen.
After the execution of each one of the above options (the underlined phrases above) the
user should be asked if she/he wishes to select another option or exit the program.
Your program should check if the file (books.txt) exists and if not it should display the
appropriate error message.
Bonus (+10%): Assume that your book catalogue is sorted (according to the book title).
The “add book” functionality, should add the book to the appropriate place in the file so
that the file remains sorted after the addition of the new book. You can implement this
bonus question as an extra option 6. Add new book sorted and use two files for testing
(books.txt and books_sorted.txt).
INSTRUCTIONS:
1. Create the structure Book to store the details about the book and a second structure
Author to store the first name and surname of the author. The structure Author will
be part of the structure Book.
2. Create a file book.txt to write and read from the file.
3. Use functions where appropriate.
4. Submit the .cpp file by uploading it on moodle (.cpp file ONLY). PLEASE name the file
as follows: Project2.cpp
5. The examiner will attach great importance to the quality of code. Marks will be
deducted for poor
indented to aid clarity.
6. You may only use the C++ programming concepts covered so far in class. Do not use
material that was not covered in this class. You are allowed to use only Cstring library
not String

Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 3 images

- You cannot create a shared pointer that does not reference an object. O True Falsearrow_forwardThe Save Transaction button depicted in the screen attached is used to save relevant data to the sales table and the salesdetails tables from the depicted schema. When this button is clicked it calls the saveTransaction() function that is within the PosDAO class, it passes to this function an ArrayList of salesdetails object, this list contains the data entered into the jTable which is the products and qty being sold.Write the saveTransaction function. You are to loop through the items and get the total sales, next you are to insert the current date and the total sales into the sales table. Reminder that the sales table SalesNumber field is set to AUTO-INCREMENT, hence the reason for only entering the total sales and current date in sales table.arrow_forwardastfoodStats Assignment Description For this assignment, name your R file fastfoodStats.R For all questions you should load tidyverse, openintro, and lm.beta. You should not need to use any other libraries. suppressPackageStartupMessages(library(tidyverse)) suppressPackageStartupMessages(library(openintro)) suppressPackageStartupMessages(library(lm.beta)) The actual data set is called fastfood. Continue to use %>% for the pipe. CodeGrade does not support the new pipe. Round all float/dbl values to two decimal places. All statistics should be run with variables in the order I state E.g., "Run a regression predicting mileage from mpg, make, and type" would be: lm(mileage ~ mpg + make + type...) To access the fastfood data, run the following: fastfood <- openintro::fastfood Create a correlation matrix for the relations between calories, total_fat, sugar, and calcium for all items at Sonic, Subway, and Taco Bell, omitting missing values with na.omit(). Assign the…arrow_forward
- in visual c# add customer id from customer table to booking table which has a customer id column. they are primary key and foriegn key and are linked in realtionship table in access file. when button is clicked insert first name into booking table in first name column. This should automaically copy customer id to booking table in customer id column without codingarrow_forwardPython Required information id fname lname company address city ST zip 103 Art Venere 8 W Cerritos Ave #54 Bridgeport NJ 8014 104 Lenna Paprocki Feltz Printing 639 Main St Anchorage AK 99501arrow_forwardA bucket list is a collection of goals, dreams, and aspirations that you would like to accomplish within your lifetime. The purpose of this assignment is to develop a program that allows the user to manage their personal bucket list and save it to an XML file bucketlist.xml. For full credit, run the program and create a file with at least three entry elements. Submit a document containing a copy of the source file, a screenshot of the program in action, and the contents of the XML file. File Structure Below is the basic structure (i.e. schema) for the XML file. You may add additional elements. <bucketList> <entry> <rank></rank> <description></description> <status></status> </entry> </bucketList> Note: Before running the program, manually create an XML input file with at least one entry element that contains values in each child element. GUI Requirements At a minimum, your GUI must meet the below requirements. No minimize…arrow_forward
- Required information id fname lname company address city ST zip 103 Art Venere 8 W Cerritos Ave #54 Bridgeport NJ 8014 104 Lenna Paprocki Feltz Printing 639 Main St Anchorage AK 99501arrow_forwardCodearrow_forwardJava Programing Joyce Farrell 13-8 Create an application named StudentsStanding.java that allows you to enter student data that consists of an ID number, first name, last name, and grade point average. Have the program accept input until ZZZ is entered for the ID number. Depending on whether the student’s grade point average is at least 2.0, output each record either to a file of students in good standing (StudentsGoodStanding.txt) or those on academic probation (StudentsAcademicProbation.txt). Create an application named StudentsStanding2.java that displays each record in the two files created in the StudentsStanding application. Display a heading to introduce the list produced from each file. For each record, display the ID number, first name, last name, grade point average, and the amount by which the grade point average exceeds or falls short of the 2.0 cutoff. For example, the output should be formatted as follows (note that the student info may vary): Probationary Standing…arrow_forward
- A Stationery supplier “Adwaat Al Maktabiyah” needs a program to display sales as per regions and add the sales to the file called sales.txt. The files Personal Details.txt and Sales.txt have been provided. You may download and use them in your program. They are as shown below: PersonalDetails.txt Id First name Last Name Region E111 Alvin Jones East C121 Blake Kivell Central C253 Edda Jardine Central Sales.txt Rep_Id OrderDate Region Item Units UnitCost E111 1/6/2020 East Pencil 95 1.99 C121 1/23/2020 Central Binder 50 19.99 C253 2/9/2020 Central Pencil 36 4.99 Note: - Use structures in the coding and declare structure array as public as shown below. The question 7 doesn’t need arrays. Structure personaldetails Dim rid As String ' Employee id Dim fn As String 'First name Dim ln As String 'Last name Dim rn As String ' Region he belongs to End Structure Structure Regionalsales Dim id As String 'employee id Dim od As Date 'Order Date Dim region As String…arrow_forwardindividual characters using their 0-based index. Hint: You will need to do this for checking all the rules. However, when you access a character .arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY





