This code needs to be in C++ and the files contain random superhero names. Super hero DB
Fantastic news! We've Found the answer you've been seeking!
Question:
This code needs to be in C++ and the files contain random superhero names.
Super hero DB Files:
superheroDB1.txt
superheroDB2.txt
superheroDB3.txt
superheroDB4.txt
superheroDB5.txt
Transcribed Image Text:
CSS 2A-Dynamic Arrays Lab 7: Super Hero Database Due date: 11/22/16 Your task: You need to create a program to process a superhero database distributed in five different text files (superheroDB1-5.txt). The layout of the file is defined as follows: The first line contains the number of super heroes names stored in the file. Super hero data (names, specifically) shows in subsequent lines. Lab 7 Part 1. File Processing 1. Process one input file per program execution (user will select the input file). 2. Allow the user to enter the name of the input file (maximum 30). 3. Name entered must not exceed the maximum file input name size. 4. Verify whether the input file was successfully opened, otherwise show an error to the screen. 5. Use a dynamic array to store all super hero data in the file selected. 6. Sort (Part 2) 7. Display the ordered array in the screen. Part 2. Sort 1. Sort the array in ascending order (use bubble sort). CSS 2A-Dynamic Arrays Lab 7: Super Hero Database Due date: 11/22/16 Your task: You need to create a program to process a superhero database distributed in five different text files (superheroDB1-5.txt). The layout of the file is defined as follows: The first line contains the number of super heroes names stored in the file. Super hero data (names, specifically) shows in subsequent lines. Lab 7 Part 1. File Processing 1. Process one input file per program execution (user will select the input file). 2. Allow the user to enter the name of the input file (maximum 30). 3. Name entered must not exceed the maximum file input name size. 4. Verify whether the input file was successfully opened, otherwise show an error to the screen. 5. Use a dynamic array to store all super hero data in the file selected. 6. Sort (Part 2) 7. Display the ordered array in the screen. Part 2. Sort 1. Sort the array in ascending order (use bubble sort).
Expert Answer:
Answer rating: 100% (QA)
To achieve the desired functionality in C you can use file handling to read the superhero names from ... View the full answer
Related Book For
Operations Management Creating Value Along the Supply Chain
ISBN: 978-0470525906
7th Edition
Authors: Roberta S. Russell, Bernard W. Taylor
Posted Date:
Students also viewed these programming questions
-
The auditor's audit files usually can be provided to someone else only with the permission of the client. Give three exceptions to this general rule.
-
Files in MS-DOS have to compete for space in the FAT -16 table in memory. If one file uses k entries, that is k entries that are not available to any other file, what constraint does this place on...
-
The IA64 processors contain registers that can be used to address a 64-bit address space. However, Windows XPlimits the address space of user programs to 8-TB, which corresponds to 43 bits' worth....
-
Find the coordinates of the vertices and the foci of the given hyperbolas. Sketch each curve. 9y 2 16x 2 = 9
-
Refer to the Real World Case on WestJet, JetBlue, and Others in the chapter. In general, is it a good idea for companies to make major software upgrades public beforehand? What are the advantages and...
-
List factors that might affect an audit firms client portfolio.
-
Paired data are data for which each value in one sample can be matched with a corresponding value in another sample. In Exercises 5 and 6, determine whether the statement is true or false. If the...
-
Which type of unemployment would be affected with the following changes? Would it go up or down? a. Increased employment benefits b. Heavy snowfall in Minnesota c. Online job search becomes more...
-
Consider a firm with an EBITDA of $ 1 , 1 0 0 , 0 0 0 and an EBIT of $ 1 , 0 0 0 , 0 0 0 . The firm finances its assets with $ 4 , 6 4 0 , 0 0 0 debt ( costing 8 . 4 percent, all of which is tax...
-
When Corona leased farmland to a strawberry farmer named Armando Munoz Juarez, it claimed a security interest in his strawberry crop. Coronas financing statement listed the farmers name as Armando...
-
A gas pipework is supplying liquefied petroleum gas (LPG) to a kitchen appliance. Based on the following information, calculate the gas flow rate and pressure loss. If the pipe diameter is changed to...
-
On March 1, 2025, Swifty Corporation purchased land for an office site by paying $2748000 cash. Swifty began construction on the office building on March 1. The following expenditures were incurred...
-
On January 1, 20x1, Elite Company purchased equipment with a cost of P8,800,000, useful life of 10 years and no residual value. The entity used straight light depreciation. At every year-end, the...
-
Describe the difference between anonymous and confidential.
-
A leveraged recapitalization sounds like a complicated and scary transaction but, in fact, it's just a combination of things we've seen. In effect, it is a large stock buyback that is funded by the...
-
Describe the fraud exposure rectangle and why an examination of each area should be made to detect financial statement fraud.
-
The chief executive of Esprit Holdings struck an upbeat tone as the company embarks on a global expansion, predicting the worst is over for fashion retail despite soaring inflation and supply chain...
-
Organizations are increasing their use of personality tests to screen job applicants. What are some of the advantages and disadvantages of this approach? What can managers do to avoid some of the...
-
Determine the optimal order quantity and total annual inventory cost for cups in Problem 13-27 if the carrying cost is 5% of the price of a box of cups.
-
What is the balanced scorecard? How does it relate to operations?
-
FansForYou is a small, privately owned company that manufactures fans. Large variations in demand due to seasonality have contributed to high costs for the company. FansForYou currently uses a level...
-
A study of 1622 high school seniors from four public high schools in the northeastern United States compared high school grade point averages to SAT and ACT scores as predictors of on-time college...
-
A study in a district of Northern Ethiopia is designed to investigate the level of awareness among pregnant women of the danger signs of obstetrics. Researchers interview all pregnant women in eleven...
-
Determine whether the study is an observational study or an experiment. Explain. (a) Researchers conduct a study to determine whether cataract surgery patients experience different comfort levels...
Study smarter with the SolutionInn App