Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help When you purchase a storage device, the capacity is usually listed by the manufacturer in units of GB. This could for example be

image text in transcribed

image text in transcribed

image text in transcribed

please help

When you purchase a storage device, the capacity is usually listed by the manufacturer in units of GB. This could for example be 16 GB. Manufacturers use 1000 bytes to represent 1kB, however 1024 bytes is the actual size of 1kB. A table showing manufacturers' conversions can be seen in Table 1. Table 1: Table showing manufacturers' conversions. A table showing the actual conversions can be seen in Table 2. Table 2: Table showing correct conversions. Draw a flowchart, first on paper and then using Flowgorithm that converts the manufacturer storage capacities, listed in Table 3, into the actual amount of storage space you can expect to get from a device. You should - first come up with an algorithm for performing the conversion discussed above. - The algorithm should prompt the user for an input of a manufacturer capacity and - display the actual capacity. Check your flow chart is correct by calculating the values yourself and checking what output your flowchart gives. Translate your flowchart into C++ code. Make sure your code can display numbers correct to 2 decimal places. Your code should accept an input in the terminal of a given manufacturer in GB, print to the terminal the converted actual capacity in GB and terminate. Using your C++ code complete the table below. Your code will be tested on the inputs provided. Table 3: Complete the table. Hints: Pay attention to what data type you should be storing the user input as. Also make sure to use the setprecision and fixed keywords to correctly display two decimals in your output. Testing your code Download a script named lab1_test_windows.exe. Make sure you copy this file into the folder where your main. cpp file is. If you are unsure of what to do check Lab 0 for information. Before submitting you must ensure that you pass all tests when running the test executable. Submission instructions Your flowchart file (.fprg) and source code (.cpp) must be submitted to the Lab 1 link under Assignments on Sakai. Only submit your source code and flowchart file. It is important that you follow good programming practices in your code. This includes indenting code correctly (use the AStyle formatting tool in Code::Blocks), add necessary comments and choose meaningful names of variables in your code. Make sure to add the following comment at the start of each source code file

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

Refactoring Databases Evolutionary Database Design

Authors: Scott Ambler, Pramod Sadalage

1st Edition

0321774515, 978-0321774514

Students also viewed these Databases questions