Include the blackbox output done with C# microsoft visual studios software.
/**C # program that sort the array of strings
of customer names and customer ids in ascending order
and print results on console*/
//program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Sorting
{
class Program
{
static void Main(string[] args)
{
//intialize custNames array
string[] custNames = { "ccc", "ddd", "aaa", "bbb" };
//intialize custIds array
string[] custIds = { "687-3333", "456-4444", "789-1111", "234-2222"
};
Console.WriteLine("Sorted Customer Names : ");
//calling bubble sort
bubbleSort(custNames,custNames.Length);
//calling display method
display(custNames, custNames.Length);
Console.WriteLine("\nSorted Customer Names : ");
//calling bubble sort method
bubbleSort(custIds, custIds.Length);
//calling display method
display(custIds, custIds.Length);
//pause output on console until user enters a key
Console.ReadKey();
}
/**display method that takes string array and lenght as
input
and print the string elements on console*/
public static void display(string[] list, int length)
{
for (int i = 0; i < length; i++)
{
Console.WriteLine("{0}", list[i]);
}
}
/**Bubble sort to sor the list of strings in ascending
order*/
public static void bubbleSort(string[] list, int length)
{
for (int i = 1; i < length; i++)
{
for (int index = 0; index < length-i; index++)
{
if (list[index].CompareTo (list[index + 1])>0)
{
//swap them
string temp = list[index];
list[index] = list[index + 1];
list[index + 1] = temp;
}
}
}
} //end bubbleSort
}
}
Sample Output:
Include the blackbox output done with C# microsoft visual studios software. write a C# program to...
THIS MUST BE DONE ON VISUAL STUDIO Write a C# program that computes a the cost of donuts at your local Rich Horton’s store. The cost, of course, depends on the number of donuts you purchase. The following table gives the break down: Donuts Purchased Cost per Donut ($) = 15 0.75 A customer can save on the HST (13%) if they buy 12 or more donuts so only charge HST (use a constant) on the purchase if the customer...