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

  Explain what components she''ll need to add or upgrade

One of Nichol's network technicians says she doesn't believe the servers are capable of handling Windows Server 2008. She adds that Nichol has:

  Are there any drawbacks to using embedded operating systems

An embedded computer system runs nearly every electronic device available today. Are there any drawbacks to using embedded operating systems

  Network security principles

Explain a recent high profile computer security issue that you have heard of. Based on basic network security principles, how might the issue have been avoided?

  Expansion of network services

Assume you have been hired through your local library to help them setup a LAN to connect their three library sites.

  About linux operating system

your netlab workstation then ssh to server.cnt1015.local with your college username (the account you used for the quizes).Create a directory called final in your home directory.

  Creating programs to compute

Compare zero-, one-, two-, and three-address machines through writing programs to compute X = (A+B X C)/D - E X F)

  Program to calculate numeric grades for a course

Create a program to calculate numeric grades for a course. The course records are in a document that will serve as the input document.

  Describe advantages of having a componentized system

Consider a typical house in which there are several bedrooms, a kitchen, and a laundry room-each with a distinct function. You sleep in the bedroom, you wash clothes in the laundry room, and you cook in the kitchen. Each room encapsulates all the ..

  Describe the ongoing maintenance that will be required

Describe all the necessary equipment and explain the costs involved in the creation of the system and describe the ongoing maintenance that will be required

  Determine the biggest advantage of implementing threads in

question 1 a system has two processes and three identical resources. each process needs a maximum of two resources. is

  Interactions with the systems

Think about a typical day in your life and discuss all the instances when your activities get recorded

  Discuss the merits of each file management system

Discuss the merits of each file management system - Methods available for file manipulation and how user-defined permissions are implemented and can be examined.

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