We can work on Statistics Analysis

void sortfunction(double scores[], int scoresize) {
int maxelement;
int index;
for (maxelement = scoresize – 1; maxelement > 0; maxelement–)
{
for (index = 0; index < maxelement; index++) { if (scores[index] > scores[index + 1])
{
swap(scores[index], scores[index + 1]);
}
}
}
// for (int i = 0; i < scoresize; i++) {
// cout << scores[i] << endl;
// }
}

int main() {
double median = 0;
double average = 0;
string filename;
const int scoresize = 11;
double scores[scoresize]; // array of scors
double teamnum;
int scoreposition = 0;
streamsize ss = cout.precision();
ifstream somefile(filename);
string teams; // string for the teams
double highAverage = 0;// used this as a variable to have something to compare average to and to store the highest average
string winners; // this string was made to store the winning team
double highestmedian = 0; // highest median is useful , because i can compare the median variable with it and store the highest median
bool medianwinner = false; // setting a bool variable allowed me to choose when the hihgest median variable comes into play
int teamcount = 0; // simple counter for the teams attending

cout << “Enter filename and file location” << endl; // lines 46-50 were very helpful in testing for file errors and making the correct code as well as telling me if the file was not opening correctly cin >> filename;
somefile.open(filename);
if (somefile.fail()) {
cout << “Error opening file” << endl;
}
if (somefile) {
while (!somefile.eof()) {

cout << fixed << setprecision(2); // lines 54 – 62 are responsible for reading scores and adding on to the teamcount(that will count teams) getline(somefile, teams); ++teamcount; scoreposition = 0; cout << teams << endl; for (int i = 0; i < 11; i++) { // loop to intake data somefile >> teamnum;
cout << teamnum << ” “;
scores[scoreposition++] = teamnum;

}
double highest = scores[0]; // lines 65-76 were made in order to get the highest and lowest averages so it will be easier to get those values out of the average
double smallest = scores[0];
double sum = scores[0];
for (int i = 1; i < 11; i++) { sum += scores[i]; if (scores[i] > highest) {
highest = scores[i];
}
if (scores[i] < smallest) { smallest = scores[i]; } } sortfunction(scores, scoresize);//the function made it really easy to assort the array of scores from lowest to highest which easily allowed me to pick a median as all i had to do //was choose the element in the middle median = scores[5]; sum -= highest + smallest; // total of scores which helps me find average double average = sum / 9; //cout << “Average: ” << average << endl; if (average > highAverage) { // lines 83 – 96 use the bool median winner to see if the highest median will come into play,using the variable highaverage to make a comparison and
// highestmedain to store the median
highAverage = average;
winners = teams;
highestmedian = median;
medianwinner = false;
}
else if (average == highAverage) {
if (median >= highestmedian) {
winners = teams;
highAverage = average;
highestmedian = median;
}
medianwinner = true;
}
// median = scores[5];
somefile.ignore(); // lines 99-107 simply show a stat report for the teams including total scores, averages and medians for the teams
cout << endl;
cout << endl;
cout << “Stat report for ” << teams << endl;
cout << “—————————–” << endl;
cout << “Average is ” << average << endl;
cout << “median is: ” << median << endl;
cout << “total is: ” << sum << endl; // helps me make sure average is correct as i divide sum by 9 and see if average is correct
cout << endl;

}

}
if (medianwinner) { // if the bool is true the program will display the team won with a higher median
cout << “The winning team won by breaking a tie with a higher median” << endl;
}
cout << “The amount of teams that attended are: ” << teamcount << endl;
cout << “Winning team is : ” << winners << endl; // showcasing the winner
cout << “Average of ” << winners << ” is: ” << highAverage << endl; //winners average
somefile.close();
system(“PAUSE”);
return 0;

Sample Solution

facebook Share on Facebook

Twitter Tweet

Follow Follow us
custom Share
custom Share
custom Share
custom Share
custom Share

siness organizations can achieve a sustainable competitive advantage by integrating total quality management and business process reengineering. TQM seeks continuous improvements in product/service quality over time, while BPR takes advantage of information and telecommunication technology to achieve dramatic changes in organizational processes that facilitate performance improvements. While the two management approaches both seek to enhance performance and quality, they are often perceived as complete opposites because of their dissimilar pace, time requirements and change initiatives” (Lee and Asllani 409). Lee and Asllani however, argue that the two philosophies and approach to management control the course of the business “have many similarities and can be combined to form the ‘endless quality improvement’ management approach” (Lee and Asllani 409). Similarities between reengineering and TQM out number differences, both; are initiated by senior management, focus on enhanced quality, seek the contribution of all employees, are team oriented, allows the blurring of pre-existing departmental boundaries, and both requires full management commitment. However there are some differences between these concepts. “Quality programs work within the frame work of a company’s existing processes and seek to enhance them by means of what the Japanese cal Kaizen, or continuous incremental improvement” (Hammer and Champy 52). The idea here is to do what you already do, however only do it better. With QTM the process is never truly completed, whereas with BPR the process can be quickly called completed. Also with QTM the process is evolutionary and utilizes a democratic management style, however with BPR more measurable results>

Is this question part of your Assignment?

We can help

Our aim is to help you get A+ grades on your Coursework.

We handle assignments in a multiplicity of subject areas including Admission Essays, General Essays, Case Studies, Coursework, Dissertations, Editing, Research Papers, and Research proposals

Header Button Label: Get Started NowGet Started Header Button Label: View writing samplesView writing samples