Implementation of a common sorting algorithm

Assignment Help C/C++ Programming
Reference no: EM132274689

Description:

For this project, you have been tasked to read a text file with student grades and perform several operations with them. First, you must read the file, loading the student records. Each record (line) contains the student's identification number and then four of the student's numerical test grades. Your application should find the average of the four grades and insert them into the same array as the id number and four grades. I suggest using a 5th array position to hold the computed average. Once the file has been read and the averages calculated and stored in the array, you must sort the list by grade in descending order. Finally, the records should be printed to screen in descending final grade order with statistics at the end of the file for the class average, highest and lowest grades. We will cover the aspects you need to complete this project over the next 3-4 weeks.

Objectives:

• Use of the FILE* and file functions.
• Use of functions to include the passing of arrays and or array elements.
• Implementation of a common (bubble sort) sorting algorithm.
• Display formatted output using input/output statements.
• Use format control strings to format text output.
• Use C data types.

Requirements:

Your program should make use of the following functions.

1. A function to read the file into an array of arrays. This function should take an empty multi-dimensional array from the caller. The function should ask the user for the name of the file. You may assume the file name entered will be accurate and accessible. You may omit this requirement and hard code the path to the file. You will be given a test file (shown below). I suggest hard coding the filename while you develop your project to save typing it over and over while you test.

2. A function to compute the grade for each array/record. This function should access the array and average the test grades, inserting the final average into the last position for each record as a float.

3. A function to sort the array of arrays by final grade in descending order (highest grade first). This function should take the entire array.

4. A function to print out the results of the operation to screen calculating the required totals and formatting the output appropriately. This function should take the entire array as well.

Your program is expected to only deal with fractional values. Therefore, you are required to use a multi-dimensional array of type float or double.

Your program will not have to resize your array; you may hard code the size of the array using a constant (#define). The test files will have 10 records/students, a student number followed by 4 grades. You may not use any global variables save for the use of a constant for array size if you wish as shown often in some examples.

Reference no: EM132274689

Questions Cloud

What other trends or forces might affect marketing : Consider the three key forces (technology, globalization, and social responsibility) driving the new marketing realities. ( in 350 word)
What are some risk factors of being sexually harassed : Should school districts include additional classes or information on sexual harassment, sexual assault, dating violence, and stalking? Why or why not?
Explain the statement with emphasis on home : Write an essay to explain the statement with emphasis on home and host country government policies that facilitate and regulate the international marketing.
How your actions can be consistent with the person you hope : Write a plan for success detailing how your actions can be consistent with the person you hope to be.
Implementation of a common sorting algorithm : Implementation of a common sorting algorithm - compute the grade for each array/record. This function should access the array and average the test grades
Should a department policy be updated with each new case : Many times such civil Liability risks can be handled with confidence gained through well-informed personnel who have been well trained in the topic.
What are some of the specific sort of crimes : Provide some details about your findings. What are some of the specific sort of crimes that cyber criminals commit?
Describe your brand and competitor pricing strategies : Describe your brand's pricing strategies and competitor brand's pricing strategies that are implemented by each category. Give brief examples to show your.
What are the steps to investigating a burglary : What are the steps to investigating a burglary? What types of evidence are usually associated with a burglary?

Reviews

len2274689

4/4/2019 2:12:37 AM

This is a course capstone project, whereby you may use the tools, lessons and modules that we have examined to process a text data file. Many of the functionality in this project have been demonstrated in the modules, such as the bubble sort. You can use those code samples. I will be looking for copied assignments using plagiarism tools, please do your own code/work. You may seek assistance and guidance but this is to make sure you have the skills to move on in the computing major.

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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