Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

code in java please Hep Chese Study Chee.com KAMNOLOMBA-peod Lab 7A: Thank you, Grace Hopper. You may have heard the story, but the programming term

code in java please image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Hep Chese Study Chee.com KAMNOLOMBA-peod 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. Part 1) Writing the Program: Write a program that prompts 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. For example, cell 0 = 0, cell 1 = 1, cell 2 = 4, cell 3 - 9. The program will then print out the contents of the array separated by the "pipe" symbol (this symbol | above the "Enter" koy ). The contents need to be printed out on a single line as shown in the sample output below. User input is denoted in bold If you are using C++, please see the appendix for example code of creating an array based on a user variable Part 2) Using the debugger: For this part of the assignment, it is important that you watch the debugger tutorial video in the introduction of this assignment. After you finish creating your program and it is working, you need to set a breakpoint in your code then start walking through the code. For simplicity we recommend that you set the breakpoint at the line of code that is printing out each cell. Right before the program is finished, show the array in the debugger-with each cell holding the correct value (.e. expand the array in the debugger, just like in the tutorial video). Take a screenshot of this and save it to your desktop. To get credit for this assignment, you need to submit your code and the screenshot the program is finished, show the array in the debugger with each cell holding the correct value (ie. expand the array in the debugger, just like in the tutorial video). Take a screenshot of this and save it to your desktop. To get credit for this assignment, you need to submit your code and the screenshot Sample #1: Enter the size of the array: 5 10111419116 Sample #2: Enter the size of the array: 14 10111419116125136/491641811100112111441169 Out How with Study Chess.com Kedua-.- .-Jersedd below: Lab7B: Yes, your Honor Graduating with a high GPA is a big achievement, but can be really difficult to do! You can learn all about graduation requirements at https://commencement kennesaw.edu/information-candidates/graduating-honors.php. For this part of the lab, you will design a program that asks the user for the number of GPAs to enter. The program will then prompt the user to enter the specified number of GPAs. The program will print out the graduation standing of the students based on their GPAs. Honors GPA requirements are listed Summa Cum Laude (3.90 -4.00) Magna Cum Laude (3.70 - 3.89) Cum Laude (3.50 -3.69) Students with a GPA below 2.0 are "Not Graduating" and students with a GPA of 3.499 to 2.0 are "Graduating." The sample output is shown below. User input is denoted in bold. Sample #1: Enter the number of GPAS: 5 GPA #0: 3.97 GPA #1: 3.5 GPA #2: 3.499 GPA 3: 3.71 GPA 4: 1.9 Student #0: Summa Cum Laude Student #1: Cum Laude Student 2: Graduating Wees dees.edur M4320-3.2017.-.-.20talased.pl Student #1: Cum Laude Student #2: Graduating Student #3: Magna Cum Laude Student #4: Not graduating Sample #2: Enter the number of GPAS: 7 GPA #0: 0.03 GPA #1: 4.0 GPA #2: 3.32 GPA #3: 2.81 GPA #4: 3.75 GPA #5: 3.85 GPA #6: 2.3 Student #0: Not graduating Student 1: Summa Cum Laude Student #2: Graduating Student #3: Graduating Student #4: Magna Cum Laude Student #5: Magna Cum Laude Student #6: Graduating Lab7C: Twinsies! For this last part of the lab, you will write a program that compares the contents of 2 single-dimensional arrays of the same size. Write a program that asks the user to enter the array size. The program will prompt the user to initialize each array with integer values. The program will compare the arrays by determining if the cells with the same index number have the same values. If all the cells with the same index number have the same values, the program will print out the statement "The arrays are identical." If they are not the same, the program will print out the statement "The arrays are not identical." The sample output is shown below. User input is in bold. Sample #1: Enter the size of the arrays: 4 Enter array 1 slot 0: 1 Enter array 2 slot 0: 1 Enter array i slot 1: 2 Enter array 2 slot 1: 2 Enter array l slot 2: 3 Enter array 2 slot 2: 3 Enter array 1 slot 3: 4 Enter array 2 slot 3: 4 The arrays are identical Sample #2: Enter the size of the arrays: 5 Enter array l slot 0: 78 lepas pul Sample #2: Enter the size of the arrays: 5 Enter array 1 slot 0: 78 Enter array 2 slot 0: 81 Enter array i slot 1: 81 Enter array 2 slot 1: 78 Enter array 1 slot 2: 6 Enter array 2 slot 2: 6 Enter array 1 slot 3: 97 Enter array 2 slot 3: 97 Enter array l slot 4: 14 Enter array 2 slot 4: 14 The arrays are not identical Sample run 3: Enter the size of the arrays: 2 Enter array i slot 0: 17 Enter array 2 slot 0: 17 Enter array i slot 1: 3 Enter array 2 slot 1: 3 The arrays are identical

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

Professional Microsoft SQL Server 2014 Integration Services

Authors: Brian Knight, Devin Knight

1st Edition

1118850904, 9781118850909

More Books

Students also viewed these Databases questions