Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Operating System Expert

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

Operating System, Computer Science

  • Category:- Operating System
  • Reference No.:- M91615598
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Operating System

Question you are a security administrator responsible for

Question: You are a security administrator responsible for providing secure configuration requirements for new laptop deployments. After reading Module 2 of Certified Secure Computer User v2exercises, apply the configura ...

Taskyour job in this assignment is to create two virtual

Task Your job in this assignment is to create two Virtual machines each running a different but the latest distribution of Linux e.g. Ubuntu Server and CentOS. Each of these VM's is to offer services to a user base. The ...

Foundation of information technologyresearch types of

Foundation of Information Technology Research types of operating systems that are currently available and provide a scenario in which the operating system you chose would be appropriate to be used in this situation. Expl ...

Question what do you see as the major differences between

Question : What do you see as the major differences between UNIX/Linux and other operating systems, such as Windows and Mac OS X? The response must be typed, single spaced, must be in times new roman font (size 12) and m ...

State the required answer precisely and then provide proper

State the required answer precisely and then provide proper explanation. It is not enough to provide one- word or one-line answers. Consider a computer embedded in the control of a manned spacecraft. Would it require an ...

Discussion question this research assignment will give

Discussion Question : This research assignment will give further information on the nature and workings of multi-tasking and multi-processing operating systems. All information reported in this assignment is to be in the ...

Question note apa format 250 words and three reference

Question: Note: APA format 250 words and three reference without plagarism Computerized Operating Systems (OS) are almost everywhere. We encounter them when we use out laptop or desktop computer. We use them when we use ...

Question 1answer the following questions 10 marks a

Question 1 Answer the following questions: 10 marks a. Consider the following page reference string: 3, 1, 4, 1, 2, 3, 5, 3, 2, 1, 2,5, 4, 3, 5, 2, 4,2, 5,3 Using the above page reference string display the contents of t ...

Show all stepssuppose that the following processes arrive

Show all steps Suppose that the following processes arrive for execution at the times indicated. Each process will run the listed amount of time. in answering the questions, use non-preemptive scheduling and base all dec ...

Catalog course descriptionin this course students carry out

Catalog Course Description In this course students carry out independent research in a significant technical area of information, network, and computer security. The student is to investigate a technical area, research i ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As