• 100% Satisfaction Guarantee
Raj, Engineer
Category: Homework
Satisfied Customers: 1290
Experience:  4 + Experiance in IT Industry
16752232
Raj is online now

# You have been asked to write a program to grade several multiple-choic

You have been asked to write a program to grade several multiple-choice exams. The exam has 20 questions, each answered with a letter in the range of ‘a’ through ‘f’. The answers key is declared in the program as constant of type string. An example of answer key is “abcdefabcdefabcdefab”. Your program should work for any other answer key.

The program should first ask users for the number of students to be graded. Then it should have a while loop in the main function. For each student, the loop repeatedly asks users to enter a student ID number and a string of characters representing the answers of the student. The student ID number is XXXXX type string and should contain exactly 7 digits (each digit between ‘0’ and’9’). If a student ID number is XXXXX the program displays and error message and prompts the user to re-enter that student information. If a student gives more answers than necessary (more than 20 in our case), the program automatically truncates the extra answers. On the other hand, if a student provides less number of answers, the remaining unanswered questions are considered as being answered wrongly. If for a given answer, the user enters a letter other than ‘a’, b’, ‘c’, ‘d’, ‘e’, or ‘f’ then the question is considered as being wrongly answered.

Furthermore, in each while loop in the main routine, your program should compute a percentile score for the student by comparing the answers for that student to the answers key, and a curved grade in ‘A’ though ‘F’ based on the following:

• >=90 A
• =80 B
• = 70 C
• = 60 D
• = 50 E
• <50 F

The results of each student are displayed by the student in the format: percentile score and a curved grade in ‘A’ though ‘F’.

The program should also compute and display the following statistics for the graded answers: Average score, Maximum score, and Minimum score.
Hi there,

I will be helping you with the required solution.
By when do you need the solution file?

Thank you
Customer: replied 4 years ago.
ASAP hahaha :P
Ok will it be fine if i provide you solution in say next 6-7 hrs,?
Customer: replied 4 years ago.
Yes sounds good and you can be as basic as possible this is my first cis class. Please try to avoid advanced things I wouldn't know yet
No problem....
Have you been taught about arrays?
Customer: replied 4 years ago.
Yes we have
Ok thats cool...
I will keep it as simple as possible. And will also add comments to make it easy for you to understand the working of the code.
Check back after 6 hrs. For solution here....

Have a Good Day
Customer: replied 4 years ago.
Thank you so much that would be great :)
You are welcome.
Customer: replied 4 years ago.
Also I forgot to say I use visual studios 2012 so u know
I use Visual Studio 2010 so will it be fine with you??
Customer: replied 4 years ago.
Yea
Ok than....
Customer: replied 4 years ago.

visual studios 10 and 12 basically the same right as long as it works lol

Yes justbat the beginning it will ask to convert for which you wiol have to do yes.....
Thats all
Customer: replied 4 years ago.

okay cool! how long u think til u finish?

Almost done will need 1 - 2 hrs worst...
Customer: replied 4 years ago.

sounds good thank you so much!

You are welcome.
Ok Sorry for delay....

After downloading Extract the contents at one place and Open the SLN File in the Folder to open the project in Visual Studio.

Since you will be using VS 2012 so It will ask to convert for compatibility so do the NEXT and NEXT Steps and when its compatibility converson is done than Run the Project to get the Output.

I have kept the project very basic and simple.... and have followed the complete specification provided by you.

If you face any difficulty than feel free to ask for help.

If the solution file is satisfactory than Please don't forget to RATE the Answer.
It will hardly take few seconds to RATE my Answer

Thank You and Have a Good Day.
Customer: replied 4 years ago.

the code looks great i just have a few questions

can u help me with this

Component 1: Software System Design

Use the function decomposition method to describe all functions that you will implement in this project. Use arrow lines to indicate the relationship among all functions, and their calling sequence. Compare the merits of alternative designs

and

Component 3: Assurance of Software Correctness

Find out a set of preconditions and postconditions for each function in this project. In your implementation, use assert( ) to accomplish the goal of software correctness assurance. Summarize the result in the following table.

Are these questions with respect to this project?
Customer: replied 4 years ago.

yes

I never used any function because it was never mentioned to use so there will be no reply for the abobe questions for that I will have to modify the code.
Customer: replied 4 years ago.

there are functions in it tho isnt avg = total / num; a function?

No function are something like main() thats a function....
Customer: replied 4 years ago.

the whole thing is a int main()

Yes i have placed all code in main...
Didnt create any function as it was never jentioned in question to create functions...
So do you want me to change the code or the code I have provided you is fine with you??

If the solution file is satisfactory than Please don't forget to RATE the Answer.
It will hardly take few seconds to RATE my Answer

Thank You and Have a Good Day.
Customer: replied 4 years ago.
I think it should be fine but did u use any preconditions or post conditions ?
Precondition and post conditions exists for functions....

Since we have only main function so I can provide you detail for that.

MAIN FUNCTION:
PRE-CONDITION: Nothing
POST-CONDITION: A Valid Input of Student ID is Taken with Answers and Based on which We Display the Output which comprises of Score, Grade and an Overall Average value along with Maximum and Minimum Score among all students.

Thats all....

If the solution file is satisfactory than Please don't forget to RATE the Answer.
It will hardly take few seconds to RATE my Answer

Thank You and Have a Good Day.
Customer: replied 4 years ago.

lmao i sound so dumb sorry still new to c++ but thank you so much ahaha

Its Ok I Understand.......
Even I was not having the knowledge in the beginning when I just started programming....
You will get the idea later on.....

If the solution file is satisfactory than Please don't forget to RATE the Answer.
It will hardly take few seconds to RATE my Answer

Thank You and Have a Good Day.