Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please solve using c++ coding...the program should be like the screen shot of the video attached(increasing and dicreasing in the bars and numbers)........here is the

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedplease solve using c++ coding...the program should be like the screen shot of the video attached(increasing and dicreasing in the bars and numbers)........here is the link for colors.h and Bar.cpp and Chart.cpp........https://onlinegdb.com/Sk4uwAITw

for real you are saying too much information sir? i gave all these information and all the files needed to solve the question! becuase i saw this question 3 times solved wrong on cheggbecause they were giving not enough information and not all files!....so i dont know what to do this is everything you need for the question i cant delete anything actually...if u cant solve it pass it to the next expert sir
O Description Part 3: A Bar Chart Racer! Points: 35% Overview The goal of this part of the assignment is to implement an animated program that shows how some data changes over time. You will repeatedly read data from a file and display it using the Chart class you have implemented in Part 2. Data Files Data will be read from one of the following files (or any other file that follows the same format): cities.txt: The most populous cities in the world over time. countries.txt: The most populous countries in the world over time. baby-names.txt: The most popular baby names in the USA over time. brands.txt: The most valuable brands over time. Each of these files contains data grouped by date. You will represent each group of data (i.e. the data for every date) using a chart. Note the following: The first line in the file is the chart title. This title is the same for all the charts that will be created from this data file. The title is guaranteed not to have spaces. O Description Note the following: The first line in the file is the chart title. This title is the same for all the charts that will be created from this data file. The title is guaranteed not to have spaces. For each date, information is formatted as follows: o The number of bars in the chart (n) appears on a separate line. Each of the following n lines has the following separated by spaces: The date. This will be used as the caption of the chart. This is an integer that is repeated as-is for all the n bars. The label of the bar. This is a string that is guaranteed not to have any spaces. The length of the bar. This is an integer that is guaranteed to be non-negative. The following figure illustrates the format: The-most-populous-cities-in-the-world number of Bars in the first chart 400 12 1500 Beijing 672 1500 Cairo title for all the 1500 Cuttack 140 charts in this file 1500 Fez 130 1500 Gauda 200 1500 Guangzhou 150 1500 Hangzhou 250 1500 Istanbul 200 1500 Nanjing 147 label 1500 Paris 185 1500 Tabriz 250 1500 Vijayanagar 500 length caption for the first chart 12 1501 1501 1501 1501 Beijing 672 Cairo 399 Cuttack 139 Fez 130 data for the O Description This is an integer that is guaranteed to be non-negative. The following figure illustrates the format: The-most-populous-cities-in-the-world number of Bars in the first chart 12 1500 Beijing 672 1500 Cairo 400 title for all the 1500 Cuttack 140 charts in this file 1500 Fez 130 1500 Gauda 200 1500 Guangzhou 150 1500 Hangzhou 250 1500 Istanbul 200 1500 Nanjing 147 label 1500 Paris 185 1500 Tabriz 250 1500 Vijayanagar 500 - length caption for the first chart data for the second chart 12 1501 1501 1501 1501 1501 1501 1501 1501 1501 1501 1501 1501 Beijing 672 Cairo 399 Cuttack 139 Fez 130 Gauda 200 Guangzhou 150 Hangzhou 250 Istanbul 205 Nanjing 147 Paris 186 Tabriz Vijayanagar 500 248 Visualize and Animate Write a program to perform the following: Read from the user the name of the data file. O Description Visualize and Animate Write a program to perform the following: Read from the user the name of the data file. Read from the file the title of the chart. Repeat the following while there is still data in the file. Each iteration is for one chart. o Read the number of bars in the chart (call it n). o Create an array of Bar objects of size n. o For each Bar object: Read the caption (and ignore it, or save it for later use). Read and set the label and length of the bar. Set the color of the bar to GREEN (or any other color of your choice). Create a Chart object using the created bars. Sort the chart. o clear the screen. Use system("CLS") on Windows and system("clear") on Macos, Unix, Ed, Repl.it, OnlineGDB, etc. o show the top 10 bars in the chart with the appropriate caption and a maximum size of 70. o Pause the computer for a short while. - On Windows, you can include and then use Sleep (delay). - On Mac/Unix, you can include and then use usleep (delay). o Delete the created array of bars. The following videos are examples for how running the program should look like: e Description ( , JUVEILIUI TULCI C. Read and set the label and length of the bar. Set the color of the bar to GREEN (or any other color of your choice). o Create a Chart object using the created bars. Sort the chart. o clear the screen. Use system("CLS") on Windows and system("clear") on Macos, Unix, Ed, Repl.it, Online GDB, etc. o show the top 10 bars in the chart with the appropriate caption and a maximum size of 70. o Pause the computer for a short while. - On Windows, you can include and then use Sleep(delay). - On Mac/Unix, you can include and then use usleep (delay). o Delete the created array of bars. The following videos are examples for how running the program should look like: Using cities.txt: video link. Using baby-names.txt: video link. Using countries.txt: video link. Using brands. txt: video link. The colors are arbitrary. You can pick any color you like. A Running the program on Ed, Repl.it, OnlineGDB, or any other online IDE, will cause flickering. The above videos are smooth because they were produced by running the program locally on the machine (you can do that too!) O Description Unix, Ed, Repl.it, Online GDB, etc. o show the top 10 bars in the chart with the appropriate caption and a maximum size of 70. o Pause the computer for a short while. - On Windows, you can include and then use Sleep (delay). - On Mac/Unix, you can include and then use usleep (delay). o Delete the created array of bars. The following videos are examples for how running the program should look like: Using cities.txt: video link. Using baby-names.txt: video link. Using countries.txt: video link. Using brands. txt: video link. The colors are arbitrary. You can pick any color you like. A Running the program on Ed, Repl.it, OnlineGDB, or any other online IDE, will cause flickering. The above videos are smooth because they were produced by running the program locally on the machine (you can do that too!) Implementation Requirements All of your code must in the file named Racer.cpp. You must also copy your implementation for parts 1 and 2 into Bar.cpp and Chart.cpp (without the main() functions). You are allowed to define functions beside main() in Racer.cpp. The-most-populous-cities-in-the-world-from-1500-to-2018-(Population-in-thousands) London (5137) New-York (2837) Paris (2682) Berlin (1710) Vienna (1291) Tokyo (1067) Philadelphia (1042) Saint-Petersburg (1034) Beijing (980) Chicago (930) Manchester (928) Istanbul (874) Da 0.40015885

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

Beginning VB 2008 Databases

Authors: Vidya Vrat Agarwal, James Huddleston

1st Edition

1590599470, 978-1590599471

More Books

Students also viewed these Databases questions

Question

Discuss various types of training methods.

Answered: 1 week ago

Question

Illustrate the value of different types of employment tests.

Answered: 1 week ago

Question

Outline key considerations when making a hiring decision.

Answered: 1 week ago