Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE ASSIT ME BY MAKING THE CODE BELOW FULLY FUNCTIONAL BY USING BASIC C + + STRUCTURE AND ARRAY WHICH DES NOT USE THE USE

PLEASE ASSIT ME BY MAKING THE CODE BELOW FULLY FUNCTIONAL BY USING BASIC C++ STRUCTURE AND ARRAY WHICH DES NOT USE THE USE OF INT & OR THE OTHER HARDER FUNCTIONS AND STRUCTURE BUT RATHER MAKE IT AS SIMPLIFIED AS POSISBLE making sure to meet guidelines Create a C++ program.
2. Declare and initialize variables of different data types (int, float, char, string).
3. Implement a basic structure of the program.
4. Implement basic input and output and output formatting.
5. Submit source code to CANVAS.#include
#include
using namespace std;
struct Borrower
{
char br_details[50];
char f_name[50];
char l_name[50];
string address;
int contact;
};
struct Book
{
char bk_details[50];
char bk_title[50];
char Author[50];
int numofcopies;
int ISBN;
};
void addNewBorrower(Borrower borrowers[]);
void addNewBook(Book books[]);
void viewBookInventory(Book books[]);
void searchBook(Book Books[]);
void DisplayAllBorrowers(Borrower borrowers[]);
void borrowBook(Book books[], Borrower borrowers[]);
void addNewBorrower(Borrower borrowers[])
{
int i;
cout<<"First Name: ";
cin>>borrowers[i].f_name;
cout<<"Last Name: ";
cin>>borrowers[i].l_name;
cout<<"Contact Info: ";
cin>>borrowers[i].contact;
cout<<"Address: ";
cin.ignore();
cin>>borrowers[i].address;
borrowers++;
}
void addNewBook(Book books[])
{
int i;
cout<<"Book Title: ";
cin>>books[i].bk_title;
cout<<"Author: ";
cin>>books[i].Author;
cout<<"ISBN: ";
cin>>books[i].ISBN;
cout<<"Number Of Copies:";
cin>>books[i].numofcopies;
cin.ignore();
books++;
}
void viewBookInventory(Book books[])
{
int i, numBooks;
cout<<"------------------------------------------------------------"<>searchISBN;
for( i =0; i>option;
switch(option)
{
case 1: addNewBorrower(borrowers); break;
case 2: addNewBook(books); break;
case 3: viewBookInventory(books); break;
case 4: borrowBook(books,borrowers); break;
case 5: DisplayAllBorrowers(borrowers,books); break;
case 6: searchBook(books); break;
default:
{
cout<<"Invalid Opton! Please Try Again"<

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

Learning PostgreSQL

Authors: Salahaldin Juba, Achim Vannahme, Andrey Volkov

1st Edition

178398919X, 9781783989195

More Books

Students also viewed these Databases questions

Question

ged

Answered: 1 week ago