point me in the right direction - Exam/quiz etc result calculating programme

Reply

Join Date: Dec 2006
Posts: 2
Reputation: l36963 is an unknown quantity at this point 
Solved Threads: 0
l36963 l36963 is offline Offline
Newbie Poster

point me in the right direction - Exam/quiz etc result calculating programme

 
0
  #1
Jan 2nd, 2007
Hi,
I am pretty new to C/C++, and would like some tips on writing the code fo my first 'try' I am trying to write a programme that marks exams and such and calculates grades. I am not looking for somebody to write it for me, well if you want to, haha, but just maybe a point in the right direction, or a few snippits of code to help me along the way. I have a personal tutor who set me this task, and told me to get help where needed, as i want to go into a new career, and want to learn quickly, so your help would be much appreciated. there is a scenario;

Exam and coursework components of the assessment carry a maximum of 50 marks. Pass or fail are determined by:

Combined component total of 40% or more in order to Pass.

Minimum for each component is 15% pass

39% is moderated to 40% and a ‘Moderated Pass’ is awarded.

40% or more overall but minimum component mark not achieved ‘Technical Fai’l of 39% (which is NOT moderated to 40%);

Grades are awarded on marks that fall into the following categories:
Mark - 100-70 69-50 49-40 38-0
Grade - A B C Fail

Thanks in advance for the help.
Last edited by l36963; Jan 2nd, 2007 at 5:54 am. Reason: forgot something
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 482
Reputation: Bench has a spectacular aura about Bench has a spectacular aura about Bench has a spectacular aura about 
Solved Threads: 47
Bench's Avatar
Bench Bench is offline Offline
Posting Pro in Training

Re: point me in the right direction - Exam/quiz etc result calculating programme

 
0
  #2
Jan 2nd, 2007
Which language are you learning, C or C++? (The two languages are very different) and how far have you managed to get with the problem? you're likely to get more useful feedback if you post your attempt at a solution so far.

One way to begin with a task like this is break everything down is to bite-sized pieces. Often it helps to write some kind of informal pseudocode. (If not in a text editor, then on a sheet of paper)

certain parts of the problem should be very straightforward, such as converting a number of marks out of 50 into a percentage.

Other parts of the problem, such as determining the pass/fail status of a student will need a bit more thought - and, depending how much of the language you know, there are different ways you could solve it (You probably want to break the solution down into several functions, to make life easier, and avoid repeating code).
¿umop apisdn upside down?
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 2
Reputation: l36963 is an unknown quantity at this point 
Solved Threads: 0
l36963 l36963 is offline Offline
Newbie Poster

Re: point me in the right direction - Exam/quiz etc result calculating programme

 
0
  #3
Jan 2nd, 2007
To be honest i don't know to much of the language yet, i jst started learning, it's c++ language, i'm finding it slightly difficult, i have books to help, but i wanted a bit more practical advice, the books help with input of the values, but not so much how to make the programme calculate, i.e. the pass/fail, moderating etc... that seems quite a task to me.
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 482
Reputation: Bench has a spectacular aura about Bench has a spectacular aura about Bench has a spectacular aura about 
Solved Threads: 47
Bench's Avatar
Bench Bench is offline Offline
Posting Pro in Training

Re: point me in the right direction - Exam/quiz etc result calculating programme

 
0
  #4
Jan 2nd, 2007
For converting from a mark into a grade, you should look up If/Else blocks in your book.

For other parts of the program, one approach you could use may be to store a true/false value (a boolean value) for whether or not the assessment has been passed.

here's some pseudocode snippets, based on your description of the problem-


Has the student achieved the minimum for both components?
 assume the student has passed until we find out they've failed..
assessment passed = true;
if ( Exam mark is below the threshold OR Coursework mark is below the threshold )
    assessment passed = false
end if

Has the student passed both components and achieved 39%?
  1. if ( assessment passed is true, AND overall mark is 39% )
  2. adjust overall mark to 40%
  3. end if

Has the student achieved over 40% but failed one of the components?
  1. if ( assessment passed is false, AND overall mark is 40% or more )
  2. adjust overall mark to 39%
  3. end if

Try implementing these in C++ - After this, you should be in a position to calculate the final grade.

The best thing you can do is have a go at it and post your code here if you get stuck.
Last edited by Bench; Jan 2nd, 2007 at 11:04 am.
¿umop apisdn upside down?
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 3,114
Reputation: WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of 
Solved Threads: 281
Moderator
WaltP's Avatar
WaltP WaltP is offline Offline
Posting Sensei

Re: point me in the right direction - Exam/quiz etc result calculating programme

 
0
  #5
Jan 2nd, 2007
Originally Posted by l36963 View Post
To be honest i don't know to much of the language yet, i jst started learning, it's c++ language, i'm finding it slightly difficult, i have books to help, but i wanted a bit more practical advice, the books help with input of the values, but not so much how to make the programme calculate, i.e. the pass/fail, moderating etc... that seems quite a task to me.
You need to take Bench's advice:


Originally Posted by Bench View Post
One way to begin with a task like this is break everything down is to bite-sized pieces.
In other words, can you input values correctly? Just do that step. Then move to the next step.

Ask specific questions and post the code that is giving you problems and we can help you correct it.

Originally Posted by Bench View Post
You probably want to break the solution down into several functions, to make life easier, and avoid repeating code
Just have main() call functions and each function does one step.
The 3 Laws of the Procrastination Society:
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC