Description
Unformatted Attachment Preview
The STL (Standard Template Library) in C++ provides many common data
structures used in day-to-day programming. In this lab we'll explore the use
of a map, which holds a (key, value) pair and provides fast lookups of a value
for a given key.
Assignment
Write a C++ program that provides a simple stock symbol lookup service
based on an input data file. It should prompt the user for a menu to either (1)
load a data file, or (2) get the stock price of a single stock.
Use an STL map to hold a (key, value) pair of a stock symbol (i.e. GOOG for
Google) and its closing price. The CSV file provided in this module - prices.csv -- should serve as the input file to the program. This CSV file
has only two columns: a stock symbol and its closing price. To process the
file, you may want to use the fields[] array processing code from previous
labs.
Requirements
1. Your program must use a map template to store a stock price symbol (a
string) and a stock price (a double). An overview and some examples are
provided in pp. 1054-1061 of the textbook (in Chapter 17).
2. Output the stock price with two digits past the decimal point precision.
3. Each time a file is loaded, overwrite all the data from the previous load.
4. The user should be able to fetch any stock symbol's price from the file.
5. Loop for input until the user requests an exit (types a 'Q').
What to Submit in Canvas
Submit your .cpp file and a screenshot of one run of the program, as usual.
Example Output
MENU
L Load a data file
G Get the last closing price of a stock
Q quit
...your choice: L
Filename to load? prices.csv
File loaded, read 2270 entries.
MENU
L Load a data file
G Get the price of a stock
Q quit
...your choice: G
Which stock symbol? AAPL
Yesterday's closing price of AAPL was $317.13.
MENU
L Load a data file
G Get the price of a stock
Q quit
...your choice: Q
Exiting...
PreviousNext
Purchase answer to see full attachment
Purchase answer to see full attachment
Explanation & Answer:
1 Script
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Explanation & Answer
It is ready:) please tell me if you wa...
Completion Status:
100%
Review
Review
Anonymous
Really helpful material, saved me a great deal of time.
Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4
24/7 Homework Help
Stuck on a homework question? Our verified tutors can answer all questions, from basic math to advanced rocket science!
Most Popular Content
New England College of Business and Finance Computer Adidas Company Questions
Using
the Adidas Company and product/service, you will answer the
following questions:
Who are the
competito ...
New England College of Business and Finance Computer Adidas Company Questions
Using
the Adidas Company and product/service, you will answer the
following questions:
Who are the
competitors in this space?
What are the
overarching benefits they have to offer the consumer? What do they offer
that is different or attractive to the consumer?
What gap will
you fill by offering your redefined or new product or service?
Paper
length should be 3 to 4 pages in length using APA formatting and should include
a cover page and reference page which are not included in the page count.
BUS 661 Ashford University Week 1 Organizational Change Essay
In a three- to four- page paper (excluding the title and reference pages), reflect on an important professional change tha ...
BUS 661 Ashford University Week 1 Organizational Change Essay
In a three- to four- page paper (excluding the title and reference pages), reflect on an important professional change that you have experienced. Compare your change story to one of the stories from the beginning of Chapter 1 of the text. Answer the following questions and support your thoughts with at least two scholarly sources.In your paper you must:Describe your change story and the one selected from Chapter 1 of the text.Discuss the common issues and lessons present in both stories.Identify and discuss the embedded lesson found in the four change stories of Chapter 1.Describe how you might use the lessons as a solutions template during future change strategies.MUST USE THE FOLLOWING HEADINGS:Introduction Two Change Stories Common Issues and Lessons Four Change Stories Lessons (Three from the Book and Yours) Lessons as a Solutions Template Conclusion The words in red are not to be use in your paper. They are just instructions about what needs to be included in that section of your paper.Your paper should include in-text citations and references for at least two scholarly sources, in addition to the course text, and it should be formatted according to APA style as outlined in the Ashford Writing Center.Carefully review the Grading Rubric (Links to an external site.) for the criteria that will be used to evaluate your assignment.
CMGT442 University of Phoenix Risk Assessment Matrix and Continuity Plan Paper
Research information about your chosen organization to complete this week's assignment.Complete a 4- to 6-page Risk Asse ...
CMGT442 University of Phoenix Risk Assessment Matrix and Continuity Plan Paper
Research information about your chosen organization to complete this week's assignment.Complete a 4- to 6-page Risk Assessment in Microsoft® Word that includes:A Risk Assessment MatrixIdentify five potential risks:Describe each risk.Determine the likelihood of each risk.Outline the impact each risk has on the organization you chose.Explain a mitigation strategy for addressing the risk.Continuity PlanPlan for business continuity.Plan for IT disaster recovery.Include risks and concerns to consider during recovery.Include APA-formatted citations when necessary.Submit your assignment.ResourcesCenter for Writing ExcellenceReference and Citation GeneratorGrammar and Writing GuidesLearning Team Toolkit
cmgt 410 Documenting the Project Lifecycle
Well-written project documentation clarifies intent, documents decisions and results, and allows project managers to asses ...
cmgt 410 Documenting the Project Lifecycle
Well-written project documentation clarifies intent, documents decisions and results, and allows project managers to assess project progress (and report it, as necessary, to project stakeholders) at every step of the project lifecycle. For this assignment, you will create two examples of project documentation that align with the Project Plan Draft assignment you completed in Week 1. The documentation you will create for this assignment aligns with the initiation and planning phases of a project. If you chose the waterfall methodology for your Week 1 Project Plan Draft assignment, create the following:A business requirements document, or BRD: Use the Business Requirements Template as the basis for your BRD.A work breakdown schedule, or WBS: Use the Work Breakdown Structure (WBS) Example document as the basis for your WBS. Alternatively, if you chose the Agile methodology for your Week 1 Project Plan Draft assignment, create the following:A product requirements document, or PRD: Read "Product Requirements Documents, Downsized" for assistance in creating this document.User stories/scenarios and acceptance criteria: Review "Agile Requirements Snail: Feature to User Story to Scenario" for help in creating this document. Then use the Scenarios and COS tabs located in User Scenarios And Acceptance Criteria Example as the basis for your user stories/scenarios and acceptance criteria. Submit your completed BRD and WBS, or your completed PRD and user stories/scenarios with acceptance criteria.
Ashford University Operating Systems Concepts Paper
OS Theory Concept Map – Section 4Prior to beginning work on this interactive assignment, read the following sections in ...
Ashford University Operating Systems Concepts Paper
OS Theory Concept Map – Section 4Prior to beginning work on this interactive assignment, read the following sections in your textbook: 9.1 to 9.6and 9.9 in Chapter 9: Mass-Storage Structure, 10.1 to 10.7 in Chapter 10: File System Interface, 11.1 to 11.3 and 11.10 in Chapter 11: File System Implementation, and 12.1 to 12.4 and 12.8 in Chapter 12: I/O. In addition, answer the following exercises: 9.1, 9.4, and 10.1. Solutions to the Practice Exercises can be accessed via the textbook website: Chapter 9 and Chapter 10.You will be including revised content from this interactive assignment in your OS Theory Concept Map final assignment. Prior to completing work on this interactive assignment, you may wish to review the instructions included for the OS Theory Concept Map final assignment in Week 5 to see how it fits into your overall final project.To complete this week’s interactive assignment, you will continue building the OS Theory Concept Map by addressing the following topics concerning files, mass storage, and I/O:Outline the objectives and functions of file systems management and the supported operations, including their reliability and performance.Contrast different directory structures and create unique diagrams to illustrate an example of each directory structure (similar to Figures 10.9, 10.10, 10.11, 10.12, and 10.13 in your textbook). Insert these images as nodes of your concept map. To create your diagrams, you can choose to use a graphics editing software (PowerPoint, Paint, PhotoShop, etc.), an online mapping software tool (draw.io), or even upload a photo of a hand-drawn sketch.Describe different types of input/output devices, distinguishing between the hardware and software layers and summarizing the integration across I/O and memory components.Logically arrange the essential concepts about files, mass storage, and I/O into a hierarchy of nodes that branch from the main idea. Include cross-links where necessary to show relationships in different sections of the concept map. Use connecting nodes to accurately describe each relationship between topics that connect. Section 4 must have at least three nodes and at least four connecting nodes.
Similar Content
Discussion Topic
Discuss about following in word document12.1 List three design goals for a firewall.12.2 List four techniques used by fire...
Cumberland County College Classification Algorithms & Data Essay
Classification is the process of assigning data to a specific category. There are many different classification algorithms...
CU Cyber Security Project Management Office Discussion
please read below 4 student posts and provide response(based on the post) in each 125 words.Project management:priyan -The...
PC Purchase Research Desktop Migration Proposal
Your project will involve a desktop migration proposal for Hudson Fisher Associates.You have already gained management’s...
Community Health
Nursing project: Obesity and unhealthy lunch served in school. Split into two parts. Guidelines and rubrics attached. APA...
Using Agile Project Management to Implement a Complex Marketing Campaign System, computer science homework help
This assignment consists of two (2) sections: a written project plan, and a project plan that is created through the use o...
Analysis
GRE is a simple method that can be used in transporting data over a public network and is limited to the only peers sharin...
Automation In Healthcare Insurance 1
In most countries where technology is at the development level, premature deaths and preventable diseases are the most ala...
Update Virtual Rehabilitation Literature Review Template 1
Type of Variables that You Need to Search for in Each Article (Each Current Solution) children directly, but they also do ...
Related Tags
Book Guides
Frankenstein
by Mary Shelley
Cat on a Hot Tin Roof
by Tennessee Williams
East of Eden
by John Steinback
Murder on the Orient Express
by Agatha Christie
The Road
by Cormac McCarthy
Robinson Crusoe
by Daniel Defoe
Invisible Man
by Ralph Ellison
Blink
by Malcolm Gladwell
The Grapes of Wrath
by John Steinbeck
Get 24/7
Homework help
Our tutors provide high quality explanations & answers.
Post question
Most Popular Content
New England College of Business and Finance Computer Adidas Company Questions
Using
the Adidas Company and product/service, you will answer the
following questions:
Who are the
competito ...
New England College of Business and Finance Computer Adidas Company Questions
Using
the Adidas Company and product/service, you will answer the
following questions:
Who are the
competitors in this space?
What are the
overarching benefits they have to offer the consumer? What do they offer
that is different or attractive to the consumer?
What gap will
you fill by offering your redefined or new product or service?
Paper
length should be 3 to 4 pages in length using APA formatting and should include
a cover page and reference page which are not included in the page count.
BUS 661 Ashford University Week 1 Organizational Change Essay
In a three- to four- page paper (excluding the title and reference pages), reflect on an important professional change tha ...
BUS 661 Ashford University Week 1 Organizational Change Essay
In a three- to four- page paper (excluding the title and reference pages), reflect on an important professional change that you have experienced. Compare your change story to one of the stories from the beginning of Chapter 1 of the text. Answer the following questions and support your thoughts with at least two scholarly sources.In your paper you must:Describe your change story and the one selected from Chapter 1 of the text.Discuss the common issues and lessons present in both stories.Identify and discuss the embedded lesson found in the four change stories of Chapter 1.Describe how you might use the lessons as a solutions template during future change strategies.MUST USE THE FOLLOWING HEADINGS:Introduction Two Change Stories Common Issues and Lessons Four Change Stories Lessons (Three from the Book and Yours) Lessons as a Solutions Template Conclusion The words in red are not to be use in your paper. They are just instructions about what needs to be included in that section of your paper.Your paper should include in-text citations and references for at least two scholarly sources, in addition to the course text, and it should be formatted according to APA style as outlined in the Ashford Writing Center.Carefully review the Grading Rubric (Links to an external site.) for the criteria that will be used to evaluate your assignment.
CMGT442 University of Phoenix Risk Assessment Matrix and Continuity Plan Paper
Research information about your chosen organization to complete this week's assignment.Complete a 4- to 6-page Risk Asse ...
CMGT442 University of Phoenix Risk Assessment Matrix and Continuity Plan Paper
Research information about your chosen organization to complete this week's assignment.Complete a 4- to 6-page Risk Assessment in Microsoft® Word that includes:A Risk Assessment MatrixIdentify five potential risks:Describe each risk.Determine the likelihood of each risk.Outline the impact each risk has on the organization you chose.Explain a mitigation strategy for addressing the risk.Continuity PlanPlan for business continuity.Plan for IT disaster recovery.Include risks and concerns to consider during recovery.Include APA-formatted citations when necessary.Submit your assignment.ResourcesCenter for Writing ExcellenceReference and Citation GeneratorGrammar and Writing GuidesLearning Team Toolkit
cmgt 410 Documenting the Project Lifecycle
Well-written project documentation clarifies intent, documents decisions and results, and allows project managers to asses ...
cmgt 410 Documenting the Project Lifecycle
Well-written project documentation clarifies intent, documents decisions and results, and allows project managers to assess project progress (and report it, as necessary, to project stakeholders) at every step of the project lifecycle. For this assignment, you will create two examples of project documentation that align with the Project Plan Draft assignment you completed in Week 1. The documentation you will create for this assignment aligns with the initiation and planning phases of a project. If you chose the waterfall methodology for your Week 1 Project Plan Draft assignment, create the following:A business requirements document, or BRD: Use the Business Requirements Template as the basis for your BRD.A work breakdown schedule, or WBS: Use the Work Breakdown Structure (WBS) Example document as the basis for your WBS. Alternatively, if you chose the Agile methodology for your Week 1 Project Plan Draft assignment, create the following:A product requirements document, or PRD: Read "Product Requirements Documents, Downsized" for assistance in creating this document.User stories/scenarios and acceptance criteria: Review "Agile Requirements Snail: Feature to User Story to Scenario" for help in creating this document. Then use the Scenarios and COS tabs located in User Scenarios And Acceptance Criteria Example as the basis for your user stories/scenarios and acceptance criteria. Submit your completed BRD and WBS, or your completed PRD and user stories/scenarios with acceptance criteria.
Ashford University Operating Systems Concepts Paper
OS Theory Concept Map – Section 4Prior to beginning work on this interactive assignment, read the following sections in ...
Ashford University Operating Systems Concepts Paper
OS Theory Concept Map – Section 4Prior to beginning work on this interactive assignment, read the following sections in your textbook: 9.1 to 9.6and 9.9 in Chapter 9: Mass-Storage Structure, 10.1 to 10.7 in Chapter 10: File System Interface, 11.1 to 11.3 and 11.10 in Chapter 11: File System Implementation, and 12.1 to 12.4 and 12.8 in Chapter 12: I/O. In addition, answer the following exercises: 9.1, 9.4, and 10.1. Solutions to the Practice Exercises can be accessed via the textbook website: Chapter 9 and Chapter 10.You will be including revised content from this interactive assignment in your OS Theory Concept Map final assignment. Prior to completing work on this interactive assignment, you may wish to review the instructions included for the OS Theory Concept Map final assignment in Week 5 to see how it fits into your overall final project.To complete this week’s interactive assignment, you will continue building the OS Theory Concept Map by addressing the following topics concerning files, mass storage, and I/O:Outline the objectives and functions of file systems management and the supported operations, including their reliability and performance.Contrast different directory structures and create unique diagrams to illustrate an example of each directory structure (similar to Figures 10.9, 10.10, 10.11, 10.12, and 10.13 in your textbook). Insert these images as nodes of your concept map. To create your diagrams, you can choose to use a graphics editing software (PowerPoint, Paint, PhotoShop, etc.), an online mapping software tool (draw.io), or even upload a photo of a hand-drawn sketch.Describe different types of input/output devices, distinguishing between the hardware and software layers and summarizing the integration across I/O and memory components.Logically arrange the essential concepts about files, mass storage, and I/O into a hierarchy of nodes that branch from the main idea. Include cross-links where necessary to show relationships in different sections of the concept map. Use connecting nodes to accurately describe each relationship between topics that connect. Section 4 must have at least three nodes and at least four connecting nodes.
Earn money selling
your Study Documents