Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Bubble Sort Algorithm There are several algorithms that perform various operations on arrays. However, one of the most common tasks is sorting an array

Bubble Sort Algorithm There are several algorithms that perform various operations on arrays. However, one of Use the information provided above to answer the questions that follows: 2.1 Describe bubble sort algorithm. 2.2 b the Ages of the managers are numerically used to arrange the records in ascending order, starting from

Bubble Sort Algorithm There are several algorithms that perform various operations on arrays. However, one of the most common tasks is sorting an array to arrange its elements in the correct order, either ascending or descending using a sorting algorithm such as bubble sort. As a Bsc. IT graduate of PIHE, you have been presented with the information of seven (7) managers who heads ABC Mining Corporation contained in the table below: City First Name Adewale Nkosi Thandeka Ndlovu Anthony Dlamini Nosipho Last Name Obaro Hlungwane Noluthando Mabuza Kimberly Nkosana Thabete Source: Obaro A (2023) Johannesburg Pretoria Port Elizabeth East London Cape Town Durban Bloemfontein Age 50 70 40 60 30 55 25 Use the information provided above to answer the questions that follows: 2.1 Describe bubble sort algorithm. (5 Marks) 2.2 Using your knowledge of arrays and classes, write a C# console application to perform a bubble sort on the given data, in such a way that: 2.2 a the Last Names of the managers are alphabetically arranged in ascending order. Show all records before and after the sorting process. Your output should be display in the format below: ::: Before Sorting Obaro Adewale Johannesburg - 50 Hlungwane Nkosi - Pretoria - 70 Noluthando- Thandeka - Port Elizabeth 40 Mabuza - Ndlovu- East London - 60 Kimberly Anthony - Cape Town - 30 Nkosana - Dlamini - Durban - 55 Thabete - Nosipho - Bloemfontain - 25 :::::After Sorting - Bubble Sort Using Last Names Hlungwane Nkosi Pretoria 70 Kimberly Anthony - Cape Town - 30 60 Mabuza - Ndlovu - East London Nkosana - Dlamini - Durban - 55 Noluthando- Thandeka - Port Elizabeth Obaro Adewale- Johannesburg Thabete Nosipho - Bloemfontain 25 50 40 2.2 b the Ages of the managers are numerically used to arrange the records in ascending order, starting from the lowest to the highest age. Show all records before and after the sorting process. Your output should be display in the format below: Obaro Adewale Johannesburg - 50 Hlungwane Nkosi - Pretoria - 70 Noluthando : Before Sorting Thandeka- Port Elizabeth 40 60 Mabuza Ndlovu East London Kimberly Anthony Nkosana Dlamini Thabete - Nosipho - Bloemfontain - 25 Cape Town Durban - 55 End of Question 2 30 :::::After Sorting Thabete - Nosipho - Bloemfontain - 25 Kimberly - Anthony - Cape Town - 30 Noluthando Thandeka Port Elizabeth Obaro Adewale - Johannesburg - 50 Nkosana - Dlamini - Durban - 55 Mabuza Ndlovu East London - 60 Hlungwane - Nkosi - Pretoria - 70 40 Bubble Sort Using Ages of Managers (10 Marks)

Step by Step Solution

3.49 Rating (152 Votes )

There are 3 Steps involved in it

Step: 1

Lets start by addressing each part of the question beginning with 21 21 Describe bubble sort algorithm Bubble sort is a simple sorting algorithm that repeatedly steps through the list compares adjacen... 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

Discrete and Combinatorial Mathematics An Applied Introduction

Authors: Ralph P. Grimaldi

5th edition

201726343, 978-0201726343

More Books

Students also viewed these Programming questions

Question

K Homework Find f'(x). f(x)=8x-2 f'(x) =

Answered: 1 week ago

Question

the standard deviation

Answered: 1 week ago

Question

Describe the different types of love outlined in Sternbergs theory.

Answered: 1 week ago

Question

Identify factors involved in interpersonal attraction.

Answered: 1 week ago