It shows me that 1 error exists in this code but I didn't know how to fix this error so if you can help I will appreciate it.
Language C++.
Code:
#include <iostream>
#include <string>
#include <iterator>
#include <fstream>
#include <sstream>
#include <cstdlib>
#include <set>
using namespace std;
class Book
{
private:
string BookId;
string BookISBN;
string Publisher;
int PublisherYear;
double Price;
int Quantity;
string Author;
public:
string SetBookId();
string SetBookISBN();
string SetPublisher();
int SetPublisherYear();
double SetPrice();
int SetQuantity();
string SetAuthor();
string GetBookId();
string GetBookISBN();
string GetPublisher();
int GetPublisherYear();
double GetPrice();
int GetQuantity();
string GetAuthor();
void PrintInfo();
void DecrementQ();
bool isTitle(string Title);
};
string Book::GetBookId()
{
return BookId;
}
string Book::GetBookISBN()
{
return BookISBN;
}
string Book::GetPublisher()
{
return Publisher;
}
int Book::GetPublisherYear()
{
return PublisherYear;
}
double Book::GetPrice()
{
return Price;
}
int Book::GetQuantity()
{
return Quantity;
}
string Book::GetAuthor()
{
return Author;
}
string Book::SetBookId()
{
BookId=BookId;
}
string Book::SetBookISBN()
{
BookISBN=BookISBN;
}
string Book::SetPublisher()
{
Publisher=Publisher;
}
int Book::SetPublisherYear()
{
PublisherYear=PublisherYear;
}
double Book::SetPrice()
{
Price=Price;
}
int Book::SetQuantity()
{
Quantity=Quantity;
}
string Book::SetAuthor()
{
Author=Author;
}
void Book::PrintInfo()
{
cout << BookId << ":" << BookISBN << ":" << Publisher << ":" << PublisherYear << ":" << Price << ":" << Quantity << ":" << Author << endl;
}
void Book::DecrementQ()
{
if (Quantity <= 0)
{
cout << "Can't decrement since the quantity is lessthan or equal to zero" << endl;
}
else
{
Quantity= Quantity-1;
}
}
bool Book::isTitle(string Title)
{
return (BookId == Title);
}
int readDataFromFile(Book Blist[], string InFile)
{
ifstream ReadMyFile("Book.dat");
if (!ReadMyFile.is_open())
{
cout << "Error; Can't open file" << endl;
exit(1);
}
int size;
int i = -1;
string Text;
string BookId;
string BookISBN;
string Publisher;
int PublisherYear;
double Price;
int Quantity;
string Author;
getline(ReadMyFile, Text);
while (getline(ReadMyFile, Text))
{
i += 1;
Blist[i].SetBookId();
Blist[i].SetBookISBN();
Blist[i].SetPublisher();
Blist[i].SetPublisherYear();
Blist[i].SetPrice();
Blist[i].SetQuantity();
Blist[i].SetAuthor();
}
ReadMyFile.close();
size = i + 1;
return size;
}
void Printlist(Book Blist[], int size)
{
for (int i = 0; i < size; i++)
{
Blist[i].PrintInfo();
}
}
void CheckBook(Book Blist[], int size)
{
cout << "Please enter the title of the book" << endl;
string title;
cin >> title;
bool BookAvailablity = false;
for (int i = 0; i < size; i++)
{
if (Blist[i].isTitle(title) == true)
{
BookAvailablity = true;
break;
}
}
if (BookAvailablity)
{
cout << "The book that your looking for is available" << endl;
}
else
{
cout << "The book that your looking for is not available" << endl;
}
}
void UpdateNumber(Book Blist[], int size)
{
int num;
cout << "Enter a number to increment the book list" << endl;
cin >> num;
for (int i = 0; i < size; i++)
{
Blist[i].SetQuantity(GetQuantity() + num);
}
cout << "The book list is updated her is the new value in the book list" << endl;
Printlist(Blist, size);
}
int main()
{
Book Blist[10];
int size = readDataFromFile(Blist, "infile");
int c = 0;
do
{
cout << "Please enter a number from the following list" << endl;
cout << "1 - To print the list of books available in the AUD library" << endl;
cout << "2 - To check whether the book that your looking for is available in AUD library" << endl;
cout << "3 - To get the updated number of copies of the book that your looking for" << endl;
cout << "4 - To Exit the program" << endl;
cin >> c;
switch (c)
{
case 1:
Printlist(Blist, size);
break;
case 2:
CheckBook(Blist, size);
break;
case 3:
UpdateNumber(Blist, size);
break;
case 4:
cout << "Exiting Program. Thank You" << endl;
break;
default:
cout << "Error; Invalid Choice" << endl;
}
} while (c != 4);
return 0;
}
In: Computer Science
Chimney Swifts TEAS VI Passage
Chimney Swifts
Chimney swift are small, slender birds that have become a symbol of summer for many. they usually appear urine warm, summer months as they make their way to more tropical sites for the winter. They are recognized spectacular, chirping flocks moving through the sky in synchrony. chimney swift can be seen most vividly at the colonies of hundreds. Or even thousands, of individuals from tornado like funnels as they descend into the chimney. Unfortunately, the size of the colonies we see is misleading. Though the numbers may seem remarkable, chimney population have been declining sharply since the 1970s due primarily to habitat loss.
Unlikely most birds, chimney swift cannot perch or stand upright, so they require long, hollow spaces that are provide save roosting and nesting sites . Historically, chimney swift preferred hollow trees. However, Espeon pioneers territory and replaced forest with towns, the species was forced to adapt by using other structures, such as US, the large-scale shift two alternate heat sources, chimney capping, and the use of fabricated chimneys has drasting their ability to nest during migration. Newer, prefabricated chimneys are often aligned with metal flues that make it possible for the addition, logging and deforestation may make finding suitable overwintering habitat more challenging than ever.
In an effort of sustain the remaining population, conservation groups have designed supplemental housing structure “ Chimney Towers,” this towers are designed specially to provide a roosting sites 4 Chimney Swifts. Chimney swift almost entirely on man-made structure like these to survive. However, because this species is remarkable adaptive minimal conservation efforts like keeping traditional masonry chimneys uncapped during the summer months can improve their changes to survival.
1. Which of the following best summarizes the passage?
the number of Chimney Swifts in the world has been slowly decreasing since 1970s
prefabricated chimneys are the one thing that the threatens the future of the chimneys swifts
the diminishing number of Chimney swifts can be reversed by simple conservation efforts
chimney swift rely entirely on masonry chimneys to survive their yearly migration
2. Which of the following conclusion can the reader make from the passage?
chimney swifts are nocturnal Birds whose large number are evident in the size of their colonies
metal flues are inserted in masonry chimneys to prevent birds, such as Chimney Swifts, from nesting in them
moving in a large chirping blocks is a natural protection against predators
chimney swift can easily adapt roosting behaviors to any structure made of the proper material
3. Which of the following lists support the main idea of the passage?
logging and deforestation, changes in the way we heat our buildings, and chimney capping have robbed the chimney roasting sites
chimney swift appear in North America in summer, migrate to the tropics in winter, and give birth in the spring
the small, slender bird known as the chimney swift migrates in large numbers, Can be seen only at dusk, and raised its babies
metal line chimneys, chimney Towers, and reforestation efforts will ultimately result in the growth of the chimney Swifts
4. Based on this passage, which of the following statement is true?
that author relies on first-hand observation of chimney swift Behavior
the author has an extensive background in bird studies
the author use an informal style that appeals to reader
the author provides fact to support the main idea
5. The first paragraph in the passage on Chimney Swifts include this description: “ large colonies of hundreds or even thousands from tornado-like funnels” why does the author include this passage?
It is stablish the passage as work of fiction
it provides the reader with an engagement image
it offers supporting evidence from the claim
it proves the author is an expert in bird studies
6. Which of the following can be interfered from the passage?
logging industry production dramatically increase around 1970s
changing Home Design & Home Heating occurs in 1970s
the chimney swift adaptability was severely hindered around 1970s
the way we track ChimneySwift population change in the 1970s
In: Nursing
What is the average monthly return and standard deviation of returns for
(i) S&P 500:
| Date | Adj Close |
| 8/1/2015 | 1972.18 |
| 9/1/2015 | 1920.03 |
| ######## | 2079.36 |
| ######## | 2080.41 |
| ######## | 2043.94 |
| 1/1/2016 | 1940.24 |
| 2/1/2016 | 1932.23 |
| 3/1/2016 | 2059.74 |
| 4/1/2016 | 2065.3 |
| 5/1/2016 | 2096.95 |
| 6/1/2016 | 2098.86 |
| 7/1/2016 | 2173.6 |
| 8/1/2016 | 2170.95 |
| 9/1/2016 | 2168.27 |
| ######## | 2126.15 |
| ######## | 2198.81 |
| ######## | 2238.83 |
| 1/1/2017 | 2278.87 |
| 2/1/2017 | 2363.64 |
| 3/1/2017 | 2362.72 |
| 4/1/2017 | 2384.2 |
| 5/1/2017 | 2411.8 |
| 6/1/2017 | 2423.41 |
| 7/1/2017 | 2470.3 |
| 8/1/2017 | 2471.65 |
| 9/1/2017 | 2519.36 |
| ######## | 2575.26 |
| ######## | 2584.84 |
| ######## | 2673.61 |
| 1/1/2018 | 2823.81 |
| 2/1/2018 | 2713.83 |
| 3/1/2018 | 2640.87 |
| 4/1/2018 | 2648.05 |
| 5/1/2018 | 2705.27 |
| 6/1/2018 | 2718.37 |
| 7/1/2018 | 2816.29 |
| 8/1/2018 | 2901.52 |
| 9/1/2018 | 2913.98 |
| ######## | 2711.74 |
| ######## | 2760.17 |
| ######## | 2506.85 |
| 1/1/2019 | 2704.1 |
| 2/1/2019 | 2784.49 |
| 3/1/2019 | 2834.4 |
| 4/1/2019 | 2945.83 |
| 5/1/2019 | 2752.06 |
| 6/1/2019 | 2941.76 |
| 7/1/2019 | 2980.38 |
| 8/1/2019 | 2926.46 |
(ii) GE:
| Date | Adj Close |
| 8/1/2015 | 22.04931 |
| 9/1/2015 | 21.37927 |
| ######## | 24.7352 |
| ######## | 25.60761 |
| ######## | 26.64251 |
| 1/1/2016 | 25.07532 |
| 2/1/2016 | 25.10978 |
| 3/1/2016 | 27.61257 |
| 4/1/2016 | 26.70923 |
| 5/1/2016 | 26.25756 |
| 6/1/2016 | 27.3433 |
| 7/1/2016 | 27.25289 |
| 8/1/2016 | 27.34041 |
| 9/1/2016 | 25.92262 |
| ######## | 25.66629 |
| ######## | 27.13042 |
| ######## | 27.8713 |
| 1/1/2017 | 26.39264 |
| 2/1/2017 | 26.49039 |
| 3/1/2017 | 26.69272 |
| 4/1/2017 | 25.96718 |
| 5/1/2017 | 24.52506 |
| 6/1/2017 | 24.19364 |
| 7/1/2017 | 23.33439 |
| 8/1/2017 | 22.36858 |
| 9/1/2017 | 22.03145 |
| ######## | 18.55219 |
| ######## | 16.83133 |
| ######## | 16.05832 |
| 1/1/2018 | 15.08917 |
| 2/1/2018 | 13.16687 |
| 3/1/2018 | 12.68307 |
| 4/1/2018 | 13.23819 |
| 5/1/2018 | 13.2476 |
| 6/1/2018 | 12.80539 |
| 7/1/2018 | 12.93803 |
| 8/1/2018 | 12.28306 |
| 9/1/2018 | 10.71682 |
| ######## | 9.678614 |
| ######## | 7.187089 |
| ######## | 7.254169 |
| 1/1/2019 | 9.74951 |
| 2/1/2019 | 10.36903 |
| 3/1/2019 | 9.969832 |
| 4/1/2019 | 10.16022 |
| 5/1/2019 | 9.430923 |
| 6/1/2019 | 10.4899 |
| 7/1/2019 | 10.45 |
| 8/1/2019 | 8.25 |
In: Finance
In: Finance
Let [x]B be the coordinate vector of a vector x ∈ V
with respect to the basis B for V . Show
that x is nonzero if and only if [x]B is nonzero.
In: Advanced Math
Find the equation of the line through the point P = (0,2,−1) that is perpendicular to both ⃗v = 〈3,0,1〉 and ⃗w = 〈1,−1,2〉.
v and w are vectors by the way
In: Math
Highlights of this chapter include informal and formal
proposals (persuasive offers to solve problems, provide
services, or sell equipment) and reports (presents
information to decision-makers after investigation and
analysis):
Components of Informal Proposals (short 2- 4
pages total):
Introduction- reasons for proposal and writer's
qualifications
Background- IDs problem and goals/purposes of
project
Proposal- plan for solving the problem
Staffing- credentials/expertise of project
leaders
Budget- list of project costs
Authorization request- request for approval or
authorization of proposal
Formal Proposals include the above plus the
below optional components (and are much longer):
Copy of RFP
Letter or memo of transmittal
Abstract and/or executive summary
Title page
Table of contents
List of figures
Appendix
Components of an Informal Business Report
include (outlined in Ch 9):
Introduction
Body
Conclusions
Recommendations
Formal reports would include the above plus the
additional items below:
Prefatory (Introductory) Parts
Title page
Letter or memo of transmittal
Table of contents
List of figures
Executive summar
Body of Report
Introduction
Background
Problem or purpose
Significance and scope
Sources and methods
Organization
Discussion of findings
Summary, conclusions, recommendations
Supplementary Parts of a Formal Report
Footnotes or endnotes
Works Cited, References, or Bibliography
Appendix
Watch this excellent video of "How to Write a Business
Plan" and answer the following 3 questions:
https://www.youtube.com/watch?v=Fqch5OrUPvA
According to your studies and this Author:
1. What type of communication is this (report or
proposal, informal or formal, external or internal)?
2. What are the (9) key elements to successful
business plan?
3. What is the most important of these 9 elements?
this is a business question
In: Economics
Oxidation-Reduction Titration
***Sulfuric acid used was 6 M
***All Lab notes are at the bottom, procedure included for clarity... PLEASE HELP WITH THE SHORT ANSWER:)
PROCEDURES:
Experiment 1: Prepare the Materials
Take four 100.00 mL volumetric flasks from the Containers shelf and place them on the workbench.
In one flask, prepare a standard solution of potassium dichromate (K2Cr2O7):
Take potassium dichromate from the Materials shelf and add 4.00 g to the volumetric flask.
Take water from the Materials shelf and add 30.00 mL into the volumetric flask to dissolve the dichromate compound.
Complete the solution by filling the volumetric flask to the 100.00 mL mark with water from the Materials shelf by checking the "Fill To Mark" box.
Double-click on the volumetric flask to open a properties window. Then, rename the volumetric flask as "Standard Potassium Dichromate Solution".
In two of the empty flasks, prepare a standard solution of iron (II) ammonium sulfate hexahydrate (Fe(NH4)2(SO4)2 × 6H2O):
Take iron(II) ammonium sulfate hexahydrate from the Materials shelf and add 4.00 g to each empty volumetric flask.
Take water from the Materials shelf and add 30.00 mL to each volumetric flask to dissolve the compound and release the water of hydration.
Complete both solutions by filling the volumetric flask to the 100.00 mL mark with water from the Materials shelf by checking the "Fill To Mark" box.
Rename the volumetric flasks as "Standard Iron(II) Solution". Both flasks will have the same name.
Take the Grey Moose vodka from the Materials shelf and add 2.00 mL to the last empty flask. Fill with water from the Materials shelf by checking the "Fill To Mark" box. The vodka has now been diluted to 1/50th, or 2%, of its original ethanol concentration.
Rename the volumetric flask containing the vodka as "2% Vodka Solution".
Experiment 2: Titrate the Vodka Sample
Part 1: Oxidize the Ethanol in Vodka
Take a 150.00 mL Erlenmeyer flask from the Containers shelf and place it on the workbench.
Add 5.00 mL of 2% vodka solution from the volumetric flask to the Erlenmeyer flask.
Take water from the Materials shelf and add 35.00 mL to the Erlenmeyer flask. Note that this further dilutes the vodka sample by a factor of eight. The ethanol concentration is now 1/8th of 2%, or 0.25% of the original ethanol concentration of the bottled vodka.
Acidify the vodka solution in the Erlenmeyer flask. Take the sulfuric acid (H2SO4) solution from the Materials shelf and add 5.00 mL to the Erlenmeyer flask.
Add 5.00 mL of the standard potassium dichromate solution from the volumetric flask to the Erlenmeyer flask. This is enough to reduce all of the ethanol in the vodka and leave an excess of dichromate ions. Note that the solution has turned bright green. This is the color of the reduced Cr3+ ions. Record these observations in your Lab Notes. Remember to press Save Notes each time you add more notes.
Part 2: Coarse Titration
Take a burette from the Containers shelf and place it on the workbench. Fill the burette with 50 mL of the standard iron(II) solution. Record the initial burette reading for the amount of volume dispensed in your Lab Notes. Before dispensing any liquid, the amount dispensed should read 0 mL.
Take the redox indicator, sodium diphenylamine sulfonate, from the Materials shelf and add 0.50 g to the Erlenmeyer flask. In the presence of the excess dichromate ions, the solution turns a deep purple.
Place the Erlenmeyer flask on the lower half of the burette to connect to flask and burette.
Perform a coarse titration by adding large increments of the standard iron(II) solution from the burette. To do this, press and hold the black knob at the bottom of the burette until the solution turns suddenly from intense, dark purple to green. Each time you add the standard iron(II) solution, check the volume dispensed from the burette by hovering over the burette and reading the gray tool tip. You will need to know this value.
As the iron(II) is added, the dichromate ions (Cr2O72–) are reduced to Cr3+ ions. At the end point of the titration, there are no dichromate ions left. The redox indicator becomes colorless, and the dark purple color suddenly disappears, leaving the solution bright green again. Recall that bright green is the color of the Cr3+ ions.
Record both the last burette volume that the solution was dark purple and the burette volume at which the solution first appeared green again in your Lab Notes. This gives the range in which the titration will end. Remember to press Save Notes.
Discard just the Erlenmeyer flask in the recycling bin underneath the workbench.
Part 3: Fine Titration
Set up the titration as before:
Add 5.00 mL of diluted vodka, 35.00 mL water, 5.00 mL of sulfuric acid, 5.00 mL of the standard potassium dichromate solution, and 0.50 g sodium diphenylamine sulfonate to an Erlenmeyer flask.
Connect the Erlenmeyer flask to the lower half of the burette.
Note the current volume of standard iron(II) solution in the burette. Add to it from the volumetric flask on the workbench so that the volume is 50.00 mL again. Record the initial burette reading for the amount dispensed in your Lab Notes.
Click and hold the black knob of the burette to quickly add enough standard iron(II) solution to just get into the range of the coarse titration (the first number you recorded), but still have the solution in the flask appear dark purple. This is near, but not yet at, the titration's end point.
Add standard iron(II) solution in small increments, down to one drop at a time, until the addition of just one more drop causes the solution in the flask to turn green. Record the final burette reading for the amount of volume dispensed in your Lab Notes.
Place the Erlenmeyer flask in the recycling bin beneath the workbench.
Repeat the fine titration once more, and record the results in your Lab Notes. If the results from the two fine titrations do not closely agree, perform a third fine titration to determine which of the first two was done incorrectly.
SHORT ANSWER
Oxidation-Reduction Titration
Experiment 1: Prepare the Materials
Data Analysis
Calculate the concentration of the dichromate ion in the first volumetric flask.
Calculate the concentration of the iron (II) ion in the second volumetric flask.
Experiment 2: Titrate the Vodka Sample
Lab Results
Record the following lab data in the table below. If you had to repeat one of the titrations, disregard the value that was different.
| (a) volume of potassium dichromate solution added to the Erlenmeyer flask in mL | 5.000 mL |
| (b) coarse titration volume of iron (II) solution range in mL | 34.76-37.74 mL |
| (c) volume of iron (II) solution delivered from the burette in mL during the first fine titration | 14.15 mL |
| (d) volume of iron (II) solution delivered from the burette in mL during the second fine titration | 14.14 mL |
| (e) average volume of iron (II) solution used in the fine titrations | 14.145 mL |
| (f) the color of the analyte solution at the end point of the titration | Bright green |
| (g) the color of the analyte solution after adding the indicator | Deep purple |
Data Analysis
Record and calculate the quantities in the table below using the data from your dichromate titrations. Use an average value for the volume of iron (II) solution used in the titration. If one of your values is very different, and you had to perform the titration three times, disregard the value that was very different when computing the average.
| (a) volume of potassium dichromate solution added to the Erlenmeyer flask in mL | 5.000 mL |
| (b) moles of dichromate ion added to the Erlenmeyer flask | |
| (c) average volume of iron (II) solution delivered from the burette in mL | |
| (d) moles of iron (II) ions delivered from the burette | |
| (e) moles of excess dichromate ions that reacted with the iron (II) ions (remember that the ratio in which they react is 1 dichromate : 6 iron (II)) | |
| (f) moles of dichromate that reacted with the ethanol in the vodka (Subtract excess dichromate ions that reacted with the iron (II) ions from the original moles of dichromate ion present.) | |
| (g) moles of ethanol in the 5 mL diluted vodka sample according to the stoichiometric ratio of 2 dichromate ions to 3 ethanol molecules |
The amount of alcohol in a drink is typically
reported as percent alcohol by volume. Volume percent or
volume/volume percent (% v/v) most often is used when preparing
solutions of liquids. Volume percent is defined as:
% v/v =
Vsolute/Vsolution ×
100
Find the percent alcohol (ethanol) by volume for the vodka used in
the lab by following the steps outlined in the table below.
| (a) given the molar mass of ethanol of 46.07 g/mol, calculate the mass of alcohol (ethanol) in the tested sample solution | |
| (b) given the density of ethanol of 0.7893g/ml, find the volume in mL of ethanol present in the diluted vodka solution | |
| (c) record the volume of vodka used in the experiment in mL | |
| (d) find the percent alcohol by volume (% v/v) in the diluted vodka solution | |
| (e) the diluted vodka solution was prepared by diluting 2.00 mL vodka to 100.00 mL. Calculate the dilution factor used (N:1) | |
| (f) multiply the percent alcohol by volume in the diluted vodka solution by the dilution factor to obtain the % v/v alcohol in the original vodka solution |
Conclusions
The Grey Moose vodka tested in this lab reports a percent alcohol by volume of 40.0% on its label. How does your value compare to the reported one? If the values are different, give one possible experimental error that might have contributed to the difference.
Potassium permanganate is another strong oxidizing substance similar to potassium dichromate. An acidic solution of purple permanganate ions can get reduced to colorless Mn2ions in the presence of ethanol. Write down the redox reaction between permanganate and ethanol, and balance it using the half-reaction method.
Besides vodka, there are other colorless alcohol-containing beverages that can be titrated following the procedure in your lab. Given the average values for the percent alcohol by volume listed in the table below, which beverage do you expect to use the least amount of iron (II) standard solution during the titration? Assume all lab procedures stay the same.
| % alcohol by volume | |
|---|---|
| White rum | 37.0% |
| Vermouth | 18.0% |
| White whine | 12.0% |
LAB NOTES:
Solution turned bright green upon adding the standard potassium dichromate.
Initial burette reading: 50 mL
(Solution turned deep purple after adding sodium diphenylamine sulfonate)
Coarse Titration:
First dispense
Volume: 46.93 mL
Volume dispensed: 3.07 mL
Second dispense
Volume: 44.07 mL
Volume dispensed: 5.93 mL
Third dispense
Volume: 40.91 mL
Volume dispensed: 9.09 mL
Fourth dispense
Volume: 37.74 mL
Volume dispensed: 12.26 mL
Fifth dispense- END POINT REACHED
Volume: 34.76 mL
Volume dispensed: 15.24 mL
Fine Titration 1
End point volume: 35.85 mL
Volume dispensed: 14.15 mL
Fine Titration 2:
End point volume: 35.86 mL
Volume dispensed: 14.14 mL
In: Chemistry
In: Economics
Drug name is INDOMETHACIN
|
Drug Generic Name: Indomethacin Brand Name |
Dosage & Frequency Usual Dosage |
Route |
Classification |
Action and Purpose Of Drug Action Purpose |
Side effects and major nursing implications Mom Fetal/Newborn |
In: Nursing