Lab 7A: Thank you, Grace Hopper. You may have heard the story, but the programming term...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Lab 7A: Thank you, Grace Hopper. You may have heard the story, but the programming term "bug" is attributed to the computer legend Grace Hopper who, after diagnosing the problem with a program, determined it was because a bug (in this case, a moth) physically wedged itself under a vacuum tube - causing the machine to no longer work. We've come a long way since then... For this part of the lab, you are going to write a program, then show what it looks like using the debugger. So, in addition to your code, you're going to have to submit a screenshot of the debugger. Start by writing the following program: prompt the user for the size of an integer array, declare an array of that size, then populate each cell of the array with the square of the cell's index (e.g. cell 0 = 0, cell 1 = 1, cell 2 = 4, cell 3 = 9). Finally, print out the contents of the array separated by the "pipe" symbol (above the Enter key) on a single line. The program should behave like the sample output below. User input is denoted in bold. C++ students: see the appendix for example code of creating an array based off of a user variable. Use the debugger: Once your program is working, you must set a breakpoint in your code (preferably the line that is printing out each cell), then start walking through the code. Just before the program is finished, show the array in the debugger – with each cell holding the correct value (i.e. expand the array in the debugger, just like in the video). Take a screenshot of it and save it to your desktop. In addition to your code, you will need to submit this image. Sample #1: Enter the size of the array: 5 10|1|4|9|16 Lab 7A: Thank you, Grace Hopper. You may have heard the story, but the programming term "bug" is attributed to the computer legend Grace Hopper who, after diagnosing the problem with a program, determined it was because a bug (in this case, a moth) physically wedged itself under a vacuum tube - causing the machine to no longer work. We've come a long way since then... For this part of the lab, you are going to write a program, then show what it looks like using the debugger. So, in addition to your code, you're going to have to submit a screenshot of the debugger. Start by writing the following program: prompt the user for the size of an integer array, declare an array of that size, then populate each cell of the array with the square of the cell's index (e.g. cell 0 = 0, cell 1 = 1, cell 2 = 4, cell 3 = 9). Finally, print out the contents of the array separated by the "pipe" symbol (above the Enter key) on a single line. The program should behave like the sample output below. User input is denoted in bold. C++ students: see the appendix for example code of creating an array based off of a user variable. Use the debugger: Once your program is working, you must set a breakpoint in your code (preferably the line that is printing out each cell), then start walking through the code. Just before the program is finished, show the array in the debugger – with each cell holding the correct value (i.e. expand the array in the debugger, just like in the video). Take a screenshot of it and save it to your desktop. In addition to your code, you will need to submit this image. Sample #1: Enter the size of the array: 5 10|1|4|9|16
Expert Answer:
Related Book For
Interpersonal Skills in Organizations
ISBN: 978-0078112805
5th edition
Authors: Suzanne de Janasz, Karen Dowd, Beth Schneider
Posted Date:
Students also viewed these accounting questions
-
Write a program that receives an ASCII code (an integer between 0 and 127) and displays its character. For example, if the user enters 97, the program displays the character a. Here is a sample run:...
-
You just heard a news story aboutmad cow diseasein a neighboring country, and you believe that feeder cattle prices will rise dramatically in the next few months as buyers of cattle shift to U.S....
-
You have just been told, Because we are going to finance this project with debt, its required rate of return must exceed the cost of debt. Do you agree or disagree? Explain.
-
A sample of size n is randomly selected from a non-normal population with mean and standard deviation o. a. Describe the mean and standard deviation of the sampling distribution of X for all samples...
-
The law firm of Spade & Associates hired Dylan Sayers to review the audit of the 2014 financial statements that Hammer & Wimsey, CPAs, had completed for Golden Sound and Records Company....
-
When = 20 the 50-lb uniform block compresses the two vertical springs 4 in. If the uniform links AB and CD each weigh 10 lb, determine the magnitude of the applied couple moments M needed to...
-
If \(P=150 \mathrm{kN}\), determine the total strain energy stored in the truss. Each member has a cross-sectional area of \(8.0\left(10^{3} ight) \mathrm{mm}^{2}\) and is made of A-36 steel. P D -3...
-
Recently, Ashland MultiComm Services has been criticized for its inadequate customer service in responding to questions and problems about its telephone, cable television, and Internet services....
-
3. In the figure below, a laser beam shines along the surface of a block of transparent material. Half of the beam goes straight to a detector, while the other half travels through the block and then...
-
a. During February, $194,500 was paid to creditors on account, and purchases on account were $210,400. Assuming that the February 28 balance of Accounts Payable was $62,500, determine the account...
-
A sub-query is needed to answer this question. See the notes in the assignment specification document. Write a query to return the following result set: Columns: - ProductCategoryID...
-
Using the diagram below, calculate the depth of penetration of skin for the average and maximum beta energies emitted by cobalt-60. Provide your final answers in millimeters. How does this compare...
-
The results achieved in the targeting stage with ATmin = 20C include = 40 MW = 38 MW = 150C Minimum hot utility Minimum cold utility Pinch temperature (a) Draw the network design for the problem to...
-
frictionless track is given by the acceleration due to gravity of a cart down a a = g sine, where is the angle that the track makes with the horizontal. (This hopefully makes some intuitive sense:...
-
Assume p = 1000 kg/m; %= 9.8 kN/m; g = 9.8 m/s for all questions in this assignment. You have completed a drilling investigation for a site proposed for a proposed development for a new housing...
-
Write a sub procedure to calculate the total heat required to vaporize given amount or ice. Specific details of the problem are as follows: a. User should enter the mass of ice (grams), initial...
-
1.Portfolio = $1,000,000, 90% in equity earning 12%, 40% in Fixed Income = $125,000 earning 2.5% [ note 90% + 40% > 100%, there is a margin here, assume the cost of margin is 6.5%].Calculate the FV...
-
B.) What is the approximate concentration of free Zn 2+ ion at equilibrium when 1.0010 -2 mol zinc nitrate is added to 1.00 L of a solution that is 1.080 M in OH - . For [Zn(OH) 4 ] 2- , K f = 4.610...
-
The text discusses proxemics or the way in which we use space in communicating and how one's "safe zone" may be larger or smaller depending on the context (business or personal) and the culture. If...
-
We suggest that facilitators play other roles, such as educator. Why is the educator role so important?
-
With so much communication occurring on-line todayin fact, it's not unusual to find people in adjacent offices using email to communicate to one anotherwhat are some ways to ensure your message is...
-
Ludwig and Miller (2007) used a discontinuity in program funding for Head Start to test the impacts on child mortality rates. In the 1960s, the federal government helped 300 of the poorest counties...
-
The standard enthalpy change of combustion of acetylene is \(-1300.48 \mathrm{~kJ}\) at \(298 \mathrm{~K}\) with \(\mathrm{H}_{2} \mathrm{O}\) in the liquid state. Calculate the standard enthalpy of...
-
Which instrument is used to determine the heat of combustion of a fuel?
Study smarter with the SolutionInn App