Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

http://smugmug.com/thumbs/Lacus.jpeg?170x330 44cf8edbd53cf75be874604b39a7694c 21990 http://smugmug.com/thumbs/Vel.jpeg?300x220 3a5414349bd34657e58bd0603f6cdf0d 10689 http://smugmug.com/thumbs/ElementumNullam.png?270x280 ae4619f06272cb0b87d1eca49a84698b 59995 http://smugmug.com/thumbs/MontesNasceturRidiculus.jpeg?180x220 00bb01dc4ea0c7bd929111c8f8511970 103889 http://smugmug.com/thumbs/AtLorem.jpeg?200x240 2042f0e5b7fc38c239b5f4ca447f6574 22108 Solve with c++ Write a program that extracts information from

http://smugmug.com/thumbs/Lacus.jpeg?170x330 44cf8edbd53cf75be874604b39a7694c 21990 http://smugmug.com/thumbs/Vel.jpeg?300x220 3a5414349bd34657e58bd0603f6cdf0d 10689 http://smugmug.com/thumbs/ElementumNullam.png?270x280 ae4619f06272cb0b87d1eca49a84698b 59995 http://smugmug.com/thumbs/MontesNasceturRidiculus.jpeg?180x220 00bb01dc4ea0c7bd929111c8f8511970 103889 http://smugmug.com/thumbs/AtLorem.jpeg?200x240 2042f0e5b7fc38c239b5f4ca447f6574 22108

image text in transcribed

Solve with c++

Write a program that extracts information from a text file containing information about images on a website. Your program should read from a file called Images.txt which will consist of an unknown number of lines. Each line consists of an image URL (web address), an MD5 hash identifying the image, and a file size in bytes. Note that this file has 5 lines, but when I test your program I will not use this exact file. You cannot count on there always being exactly 5 images. The file will end with an empty line (like the sample file). Make sure to test your program with more/less lines than 5. Your program should print out an organized table that for each image shows: the filename, image type (the file extension), the width, the height and the size in KB (1024 bytes in a kB) rounded to one decimal place. It should then display the total size in KB of the images. Something like: Width 170 size 300 Name Lacus.jpeg Vel.jpeg ElementumNullam.png MontesNasceturRidiculus.jpeg AtLorem.jpeg Type jpeg jpeg png jpeg jpeg 270 180 200 Height 330 220 280 220 240 21.5 10.4 58.6 101.5 21.6 Total Size: 213.5 Write a program that extracts information from a text file containing information about images on a website. Your program should read from a file called Images.txt which will consist of an unknown number of lines. Each line consists of an image URL (web address), an MD5 hash identifying the image, and a file size in bytes. Note that this file has 5 lines, but when I test your program I will not use this exact file. You cannot count on there always being exactly 5 images. The file will end with an empty line (like the sample file). Make sure to test your program with more/less lines than 5. Your program should print out an organized table that for each image shows: the filename, image type (the file extension), the width, the height and the size in KB (1024 bytes in a kB) rounded to one decimal place. It should then display the total size in KB of the images. Something like: Width 170 size 300 Name Lacus.jpeg Vel.jpeg ElementumNullam.png MontesNasceturRidiculus.jpeg AtLorem.jpeg Type jpeg jpeg png jpeg jpeg 270 180 200 Height 330 220 280 220 240 21.5 10.4 58.6 101.5 21.6 Total Size: 213.5

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_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions