Calculate the exam grades for a class

Assignment Help Operating System
Reference no: EM13944734

You will write a program to calculate the exam grades for a class of a few hundred students.

Input

Read the input file into your program as a comand line argument, rather than hardcoding the name as you were allowed to in project 3.

Each student has a last name, first name, and five problem scores (the four problems on the exam and one extra credit problem). Your program should scan students data in from a file and store it in an array of 27 linked lists. Students will be sorted to different lists by the first letter of their last name. So "Hunter, Johnny"
will be sorted to arr[7] list, as H is the 8th letter in the alphabet (remember 'H' - 'A' = 7). The 27th list should store any names that somehow do not start with a letter of the alphabet.

The input file itself is formatted so that each student's entry is one line. All entries are divided by single spaces, so scanning them in should be fairly easy.

You can assume that each students first and last name will consist of at most 20 characters each. I'd prefer that you allocate these strings dynamically, but it isn't a requirement.

Calculating scores

Along with the five problem scores, each student structure should also contain room for a final exam grade. This will be the sum of four of the four exam problems. If the extra credit problem has a higher score than one of the exam problems, then it can be used (only once) to replace that problem score.

So if Johnny's scores were 11, 17, 19, and 5, with an extra credit score of 8,
then his final grade would be 11 + 17+ 19 + 8 = 55 out of a total 80.

However if Sue's scores were 20, 5, 6, and 18, with an extra credit score of 10,
Then her final grade would be 20 +10 + 6 + 18 = 54 out of 80.

So the extra credit problem will replace the lowest problem score. Really much less complicated than I've made it sound.

Output

Print a menu with four options.

The first should prompt for a letter and print the names and final scores for all students whose last names begin with the input letter.

The second option should be to compute the class average.

The third option should prompt for a score number 1-6 and a number of points 0-20.
Score numbers 1-4 correspond to problems 1-4.
Score number 5 corresponds to the extra credit problem.
Score number 6 corresponds to the final grade.

The function you write for this should increment the specified score by the number of points given. Final grades will have to be recalculated in the first five cases, so that function may have to be called again.

The last option should free all allocated memory and exit.

Modification
--------------------------------------------------------------------------------------------------
First off, you can assume a fixed size of 20 characters for first and last names. I would prefer if you dynamically allocated these, but I won't require you to.

Second, I didn't specify how the program should accept its input file (theres only one file). Do this with command line arguments, rather than hardcoding the name

Last, expand the functionality a bit. Rather than computing the average for one letter, include a menu with four options.

The first should prompt for a letter and print the names and final scores for all students whose last names begin with the input letter.

The second option should be to compute the class average, rather than the average for one list.

The third option should prompt for a score number 1-6 and a number of points 0-20.

Score numbers 1-4 correspond to problems 1-4.

Score number 5 corresponds to the extra credit problem.

Score number 6 corresponds to the final grade.

The function you write for this should increment the specified score by the number of points given. Final grades will have to be recalculated in the first four cases, so that function may have to be called again.

Attachment:- sqin.txt

Reference no: EM13944734

Questions Cloud

Bartlett test or levene test : Use a one-factor ANOVA to test the null hypothesis that population abundance is equal among these 6 species. Be sure to interpret your results and explain your reasons for declaring them significant or not significant. Use either Bartlett's test o..
How would you have suggested he respond to the seating : If you were Gov. Blagojevich's public relations adviser, how would you have suggested he respond to the seating of Roland Burris as senator?
How clear is kurzweil''s discussions of your item : What are the crucial passages in the text where Kurzweil discusses your item with the most clarity or depth? Please quote short passages and crucial parts of longer passages.
Prepare a classified balance sheet : The adjusted trial balance for Rego Bowling Alley at December 31, 2014, contains the following accounts. Prepare a classified balance sheet; assume that $15,000 of the note payable will be paid in 2015
Calculate the exam grades for a class : You will write a program to calculate the exam grades for a class of a few hundred students.
Show the names of the customers for whom we have invoices : Show the names of the customers for whom we have invoices.  Show the CUS_CODE of the customers for whom we DO NOT have invoices. Show the names of the customers for whom we DO NOT have invoices.
Statistical distribution of the test statistic : If the null hypothesis is true, state the statistical distribution of the test statistic. Use α=0.05 and perform all 5 steps of hypotheses testing for complete credit.
How might prototyping be used as part of the system : How might prototyping be used as part of the System Development life cycle (SDLC)? Use your own words. A 100 MIN no less.
Regression model to test the null hypothesis : Use a simple regression model to test the null hypothesis against the alternative

Reviews

Write a Review

Operating System Questions & Answers

  Implementation of algorithms for process management

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst.

  Develop a user mode command interpreter

Develop a user mode command interpreter which support list-short.

  Memory allocation in operating system

Analysis and implementation of algorithms for memory allocation in operating system, Explain First- t and best- t methods are used in memory allocation in operating systems.

  Stand alone child process

Forking the child process

  Write a multi-threaded program

Write a multi-threaded program to solve producer and consumer problem

  Marginal and average cost curves

n a competitive market place (pure competition) is it possible to continually sell your product at a price above the average cost of production.

  Simulating operating systems scheduling

Simulate the long-term scheduler, the short-term scheduler and the I/O scheduler of the computer using the First-Come-First-Serve algorithm.

  Issues with trusted platform module

Research paper discussing the issues with Trusted Platform Module (TPM)

  Threads

Explain a complication that concurrent processing adds to an operating system.

  Design and programming

Use the semaphore methods to control the concurrency of the solution

  Virtual machines

Virtual machines supported by a host operating system

  Discuss an application that benefits barrier synchronization

Discuss an application that would benefit from the use of barrier synchronization

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