Questions
Write a 4-6 sentence summary explaining how you can use STL templates to create real world...

Write a 4-6 sentence summary explaining how you can use STL templates to create real world applications. In your summary, provide an example of a software project that you can create using STL templates and provide a brief explanation of the STL templates you will use to create this project.

After that you will implement the software project you described . Your application must be a unique project and must incorporate the use of an STL container and/or iterator and at least 7 STL algorithms with an option to exit. Your application must contain at least 8 menu options. You will decide how to implement these menu selections.

Her is the sample code how this project suppose to be.

A local library requested a program to help them organize their book collection. Their collection consists of 3500 books. They would like to be able to display all books by the author, so users could find specific book easier.

For this project, a menu-driven console was created to read data from a text file, and store the data in the vector container.

Each field in the text file was stored in a separate line. Starting the application triggered the creation of a vector and structs, where each struct will contain one book. Furthermore, the structs will contained the following information: author, title, publisher, description, ISBN, and year published fields which are pushed at the back of the vector.

When started, the application presents a welcome message with the current date, and a menu with the following menu items:

  • Add new book: program adds the book to the vector and to the text file

  • Remove book: program removes the book from the vector and from the text file

  • Remove All: program deletes vector

  • Search by author: Program prompts the user for the author’s name, search a vector for an author, and if found, the author’s name with the book title will be displayed to the user

  • Search by ISBN Program prompts user for the ISBN number, searches a vector for given ISBN, and if found, the author’s name with the book title and ISBN number will be displayed to the user

  • Sample code

    #include <iostream>
    #include <fstream>
    #include <string>
    #include <vector>
    
    using namespace std;
    
    struct book {
        string author;
    
        string title;
        string publisher;
        string description;
        string ISBN;
        string yearPub;
    

    };

    int main() {

    string tempStr;
    book tempBook;
    string choiceString = ""; int choiceInt = 0; vector<book> library; bool found;

    ifstream inFile("library.txt"); while (getline(inFile, tempStr)) {

    tempBook.author = tempStr; getline(inFile, tempStr); tempBook.title = tempStr; getline(inFile, tempStr); tempBook.publisher = tempStr; getline(inFile, tempStr); tempBook.description = tempStr; getline(inFile, tempStr); tempBook.ISBN = tempStr; getline(inFile, tempStr); tempBook.yearPub = tempStr; library.push_back(tempBook);

    } inFile.close();

    while (choiceInt != 7) {

            // Need this for screen
            // Need this for files
            // Need this for strings
            // Need this for vectors
    
    // Data structure of book type
    

    found = false;
    cout << "1. Add new book\n";
    cout << "2. Remove book by ISBN\n"; cout << "3. Remove All\n";
    cout << "4. Display book list\n"; cout << "5. Search by Author\n"; cout << "6. Search by ISBN\n";
    cout << "7. Exit\n\n";
    getline(cin, choiceString);
    cout << endl;
    choiceInt = stoi(choiceString);

    switch (choiceInt) {
    case 1:
    

    cout << "Author name? "; getline(cin, tempBook.author); cout << "Title? ";

    // Print menu

    // Get choice
    // Change choice to integer for switch
    
    // Add new book
    
     // Open file for reading
     // While there is still data to import
    
     // Put line items into book type
    
    // Add book to library
     // Close file
     // Begin user input portion of program
    

    getline(cin, tempBook.title);
    cout << "Publisher? "; getline(cin, tempBook.publisher); cout << "Description? "; getline(cin, tempBook.description); cout << "ISBN? ";

    getline(cin, tempBook.ISBN); cout << "Year published? "; getline(cin, tempBook.yearPub); library.push_back(tempBook); break;

    case 2:
    cout << "What is the ISBN? "; getline(cin, tempStr);
    for (int i = 0; i < library.size(); i++)

    if (library[i].ISBN == tempStr) {

    library.erase(library.begin()+i);

    found = true; }

    if (!found)
    cout << "ISBN not found\n";

        break;
    case 3:
    

    library.clear();

        break;
    case 4:
    

    for

    // Remove all items from library
    // Print all books
    
    // Put line items into book type
    // Add book to library
    
    // Delete book by ISBN
                    // For loop to iterate through vector
    

    (int i = 0; i < library.size(); i++) // For loop to iterate through vector

    {
    cout << "Author : " << library[i].author << " | Title : " << library[i].title;
    cout << "\nISBN : " << library[i].ISBN << " | Publisher : " << library[i].publisher; cout << "\nDescription : " << library[i].description << " | Year Published : " <<

    library[i].yearPub << endl << endl; }

                break;
            case 5:
    
    // Search by author
    

    cout << "Author name? ";
    getline(cin, tempStr);
    for (int i = 0; i < library.size(); i++) // For loop to iterate through vector

    if (library[i].author == tempStr) {

    cout << "Author : " << library[i].author << " | Title : " << library[i].title;

    cout << "\nISBN : " << library[i].ISBN << " | Publisher : " << library[i].publisher;

    cout << "\nDescription : " << library[i].description << " | Year Published : " << library[i].yearPub << endl << endl;

    found = true; }

    if (!found)
    cout << "Author not found\n";

        break;
    case 6:
    
    // Search by ISBN
    

    cout << "ISBN? ";
    getline(cin, tempStr);
    for (int i = 0; i < library.size(); i++) // For loop to iterate through vector

    if (library[i].ISBN == tempStr) {

    cout << "Author : " << library[i].author << " | Title : " << library[i].title;

    cout << "\nISBN : " << library[i].ISBN << " | Publisher : " << library[i].publisher;

    cout << "\nDescription : " << library[i].description << " | Year Published : " << library[i].yearPub << endl << endl;

    found = true; }

    }

    if (!found)
    cout << "ISBN not found\n";

        break;
    case 7:
    
        break;
    default:
    

    // Exit

    break; }

    }

    cout << "Not a valid selection.\n\n";

    ofstream outFile("library.txt"); while (!library.empty())
    {

       // Open out file stream
       // While there are still books in the library
    
        // Get the data from the last book
    // Delete that book from the linked list
    
       // Output book data to file by line
    
       // Close out file
    

    tempBook = library.front(); library.erase(library.begin());
    outFile << tempBook.author << endl; outFile << tempBook.title << endl; outFile << tempBook.publisher << endl; outFile << tempBook.description << endl; outFile << tempBook.ISBN << endl; outFile << tempBook.yearPub << endl;

    } outFile.close();

In: Computer Science

Internet Research Worksheet Topic: ________________________________________________________________________ Find two documents from the Internet on the subject of your...

Internet Research Worksheet

Topic: ________________________________________________________________________

Find two documents from the Internet on the subject of your next speech. Provide a complete citation for each article following the A.P.A.bibliography format and answer the questions about each document. (For sample bibliography formats check in d2l in the content section)

1.     Document: _________________________________________________________________

__________________________________________________________________________

Did you locate this document through a search engine?     Yes  ❑    No  ❑

If you answered yes, what is the name of the search engine? _________________________

If you answered no, how did you locate the document? _____________________________

Why will the document be useful for your speech? Be specific. ______________________

__________________________________________________________________________

__________________________________________________________________________

Explain why the author or sponsoring organization for this document should be accepted as a credible source on your speech topic.

__________________________________________________________________________

__________________________________________________________________________

2.     Document: _________________________________________________________________

__________________________________________________________________________

Did you locate this document through a search engine?     Yes ❑    No  ❑

If you answered yes, what is the name of the search engine? _________________________

If you answered no, how did you locate the document? _____________________________

Why will the document be useful for your speech? Be specific. ______________________

__________________________________________________________________________

__________________________________________________________________________

Explain why the author or sponsoring organization for this document should be accepted as a credible source on your speech topic.

__________________________________________________________________________

__________________________________________________________________________

In: Psychology

Description The primary purpose is to gain experience building a simple programmer-defined class. Requirements • Class...

Description
The primary purpose is to gain experience building a simple programmer-defined class.
Requirements
• Class Rectangle: Create a new class named Rectangle that
o is in its own Rectangle.cs file
o has properly formatted class header docs with your name as the author and a simple class description such as “Class Rectangle represents a rectangle with a length and width.”
o has private attributes (fields) named length and width that will hold integer values.
o has public properties named Length and Width that correspond to those attributes. The gets for Length and Width simply return the corresponding attribute. The sets will assign value to the attribute only if value is non-negative (>= 0)
• Class Program
o Copy/paste the code below and then
▪ Realign the code as needed
▪ Insert your name as the author
▪ Add code where it says ** ADD CODE **
o Run to ensure that your output matches the sample run
Program.cs
using System;
/**
* @author First and Last Name
* Class Program tests the Rectangle class. */
class Program
{
public static void Main()
{
// **ADD CODE **
// Create a new Rectangle object named aRectangle
// Then set the Length to 3 and the Width to 4
// Display the rectangle dimensions
Console.WriteLine($"Length: {aRectangle.Length}, " +
$"Width: {aRectangle.Width}");
// Test that negative values are ignored
aRectangle.Length = -2;
aRectangle.Width = -4;
Console.WriteLine($"Length: {aRectangle.Length}, " +
$"Width: {aRectangle.Width}");
} // end Main
} // end class
Sample Run Sample Run
Length: 3, Width: 4
Length: 3, Width: 4
Submission
• Upload the two source files: Program.cs and Rectangle.cs
• If in the on-campus section, also print the two source files before class and turn in at the beginning of class.

In: Computer Science

The bottle of hydrogen peroxide you used in Experiment 1: Ideal Gas Law - Finding Percent H2O2 is labeled as a 3% solution (the same as store-bought hydrogen peroxide)

NEED ASSISTANCE TO CHECK MY WORK

The goal for Experiment 1: Ideal Gas Law - Finding Percent H2O2 with Yeast is to find the percentage of hydrogen peroxide in the solution. To determine percentage, you need to first determine how many moles of hydrogen peroxide are present. Rearrange PV=nRT to solve for n, then plug in your known values for P, V, R, and T. Show your rearrangement of the ideal gas law equation from Experiment 1 to solve for n. Then plug in your P, V, R, and T values (using proper units) and solve. NOTE: All work must be shown.

Show your calculations from Experiment 1: Ideal Gas Law - Finding Percent H2O2 with Yeast for determining the theoretical number of moles of O2 if the hydrogen peroxide were a 100% solution. NOTE: All work must be shown.

Using the actual moles of O2 you determined from your experiment (n) and the theoretical moles of O2 you just calculated, show your calculations from Experiment 1: Ideal Gas Law - Finding Percent H2O2 with Yeast for determining the percent hydrogen peroxide in your experimental sample. NOTE: All work must be shown.

The bottle of hydrogen peroxide you used in Experiment 1: Ideal Gas Law - Finding Percent H2O2 is labeled as a 3% solution (the same as store-bought hydrogen peroxide). Do your experimental results support this (with consideration given to experimental error)? Show your calculations for your percent error of your results. NOTE: All work must be shown.

P= .998 atm

V= 50ml

R= (constant) 0.0821

T= 293 Kelvin

5ML of 3% H2O2 were used.

In: Chemistry

Patricia Cruz is a Mexican economist. She analyzes the demand-supply-market of Latin Americans notebook's market. She...

Patricia Cruz is a Mexican economist. She analyzes the demand-supply-market of Latin Americans notebook's market. She notes some assumptions and then concludes the market. Explain why she makes the assumptions!

In: Economics

Complete section 1 on form 941 with the following information: # of employees for pay period...

Complete section 1 on form 941 with the following information:

# of employees for pay period that include September 12 – 14 employees

Wages paid third quarter - $79,750.17

Federal income tax withheld in the third quarter - $9,570.17

Taxable social security and Medicare wages - $79,750.17

Total tax deposits for the quarter $21,771.83

Complete sections 2, 3, 4, and 5 with the following information:

Cruz Company is a monthly depositor with the following monthly tax liabilities for this quarter:

July                 $7,193.10

August           $7,000.95

September     $7,577.78

State unemployment taxes are only paid to California. The company does not use a third-party designee and the tax returns are signed by the president, Carlos Cruz (Phone: 916-555-9739).

In: Accounting

Read the beginning of the article “Control of Cardiovascular Risk Factors in Patients With Diabetes and...

Read the beginning of the article “Control of Cardiovascular Risk Factors in Patients With Diabetes and Hypertension at Urban Academic Medical Centers” in Diabetes Care, Volume 25, Number 4, April 2002 (http://care.diabetesjournals.org/content/25/4/718.long). For now, you need only to read up to the “Data Analysis” section on p. 719 (top of second column). Answer the questions below regarding the article. Note: The “cohort” in the article is the sample.

a) What was the objective of the study?

b) Was this a retrospective study or a prospective study? (Circle one)

c) What was the target population?

d) How many patients were in the sample?

e) How were the data collected (e.g., survey, experiment, chart review,…)?

f) What percentage of subjects in the study met the combined ADA goal for BP, LCL cholesterol, and HbA1c?

In: Statistics and Probability

Ratio of Liabilities to Stockholders' Equity and Ratio of Fixed Assets to Long-Term Liabilities Recent balance...

Ratio of Liabilities to Stockholders' Equity and Ratio of Fixed Assets to Long-Term Liabilities

Recent balance sheet information for two companies in the food industry, Santa Fe Company and Madrid Company, is as follows (in thousands):

Santa Fe Madrid
Net property, plant, and equipment $743,280 $574,700
Current liabilities 331,320 466,878
Long-term debt 687,534 413,784
Other long-term liabilities 241,566 160,916
Stockholders' equity 300,100 226,430

a. Determine the ratio of liabilities to stockholders' equity for both companies. Round to one decimal place.

Santa Fe
Madrid

b. Determine the ratio of fixed assets to long-term liabilities for both companies. Round to one decimal place.

Santa Fe
Madrid

c. Although   uses more debt, it has   creditor protection and borrowing capacity.

In: Accounting

Two separate capacitors, C1 and C2 C1 = 36 micro-Coulomb on 3 micro-Farad C2 = 72...

Two separate capacitors, C1 and C2
C1 = 36 micro-Coulomb on 3 micro-Farad
C2 = 72 uC on X 2uF, , if zero 1
C2 had a gap of 0.2m maintained by a compressed plastic spring inside the gap, the natural spring length
was 0.5m, the compressed spring length was 0.2 m. Spring constant = 8,000 micro-Newton/ meter
Action: Connected the two capacitors in parallel
Part A
Find Q2-new, C2-new, new gap,
Hint: Capacitance has geometry parameters, build an equation with numerical coefficients
Hint: Parallel connection, V same, build an equation with numerical coefficients
Hint: F-attract equals F-spring with spring inside the gap, build an equation with numerical coefficients

Part B
Find the initial total energy, the final total energy,
Hint: use the energy formulas

In: Physics

Apex Computing is preparing for a Secret Santa gift exchange. Certain information will be gathered from...

Apex Computing is preparing for a Secret Santa gift exchange. Certain information will be gathered from each employee. Although it would be more realistic to write a program that asks a user for input, this program will just be a practice for using structures and functions so we will create the information by assigning values to the variables.

Write a program that uses a structure named EmpInfo to store the following about each employee:

Name

Age

Favorite Food

Favorite Color

The program should create three EmpInfo variables, store values in their members, and pass each one, in turn, to a function that displays the information in a clear and easy-to-read format. (Remember that you will choose the information for the variables.)

Here is an example of the output:

Name………………………………Mary Smith

Age ……………………………….. 25

Favorite food ………………… Pizza

Favorite color ……………….. Green

In: Computer Science