Write the bubble sort and the swap function

Assignment Help Basic Computer Science
Reference no: EM131397444

USING A BUBBLE SORT In this lab, you complete a C++ program that uses an array to store data for a computer programming teacher. The program is similar to the program described in Chapter 9, Exercise 3 in Programming Logic and Design, Fifth Edition. The program should allow the user to enter a student's name and 10 quiz scores. The program should output the student's name and his or her eight highest quiz scores. The file provided for this lab contains the necessary variable declarations and input statements. You need to write the code that sorts the scores in ascending order using a bubble sort, and then print the student's name and eight highest quiz scores. Comments in the code tell you where to write your statements.

1. Open the source code file named QuizScores.cpp using Notepad or the text editor of your choice.

2. Write the bubble sort and the swap function.

3. Output the student's name and eight highest quiz scores.

4. Save this source code file in a directory of your choice and then make that directory your working directory.

5. Compile the source code file QuizScores.cpp.

6. Execute the program with the following input and record the output: Student Name: William Moriarty Ten Quiz Scores: 85, 42, 76, 95, 90, 85, 82, 92, 96, 88

Reference no: EM131397444

Questions Cloud

Find the amount of the raise and the new salary : Ed's annual salary is $67,500. He has been promised a 4.8% merit raise in the year ahead. Find the amount of the raise and the new salary.
Determine the value estimated by msbg : If n = 10 observations are sampled from each group, determine the value estimated by MSBG and comment on how this differs from the value estimated by MSWG.
Elementary and intermediate algebra : Solve the compound inequalities as demonstrated in Elementary and Intermediate Algebra and the Instructor Guidance in the left navigation toolbar, in your online course. Be careful of how a negative x-term is handled in the solving process. Show a..
Evaluate published nursing research for credibility : The purpose of this assignment is for the student to learn to examine, analyze, critique, and summarize an original research article. Student is to select an article from a list located in Course Resources. There is a choice of articles from which..
Write the bubble sort and the swap function : Execute the program with the following input and record the output: Student Name: William Moriarty Ten Quiz Scores: 85, 42, 76, 95, 90, 85, 82, 92, 96, 88
Did the authors discuss potential clinical significance : Did the authors state that the results had statistical significance (for example, confidence interval, p values, risk ratio, odds ratio)? Did the authors discuss potential clinical significance? If so, what did they say?
What might explain the discrepancy between the two methods : For the following data, verify that you do not reject with the ANOVA F testing with α = .05, but you do reject with Welch's test.- What might explain the discrepancy between the two methods?
What is the monthly income of the family : 1. A salesperson's weekly paycheck is 15% less than a second salesperson's paycheccks, and the total of the paychecks is $1125. What do each of the paychecks equal? 2. A family has a monthly mortgage payment of $760, or 16% of their monthly income...
Effectiveness of both roasts and after- dinner speeches : What element is essential to the effectiveness of both roasts and after- dinner speeches? This type of visual aid illustrates how one variable changes as a function of another by using a horizontal and vertical axis to show the changes in the two var..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd