I am stuck doing this assignment given for monday ...i am at the do while coding (already did the interface ...) anw here it is :

Candidates for employment by a security organization have to undergo a medical test in which sight, hearing and mobility are tested. In each of these three tests, a candidate is given a score on a scale running from 0 to 89 inclusive. These scores are then converted to grades going from 1 (very poor) to 9 (excellent) with 1 corresponding to scores between 0 and 9 inclusive, 2 corresponding to scores between 10 and 19 inclusive, 3 corresponding to scores between 20 and 29, and so on. Using the medical tests, the organization makes a decision on the deployment of each candidate:

1. Accept for Ordinary duties:
• Grade 5 or higher in all three tests
• Or At least grade 7 in Mobility and in one other test and at least grade 4 in the remaining test.
• Or At least grade 8 in Mobility and at least grade 4 in the other two tests.

2. Accept for Special duties:
• Eligible to be accepted for ordinary duties, and at least grade 8 in at least two tests

3. Reject:
• All other candidates.

Write a program to read ID, Sight, Hearing and Mobility for 10 candidates, convert the scores into grades and output for each candidate the ID together with the three grades (not scores) and deployment. Deployment should be shown as “Ordinary”, “Special” or “Reject”.
The final output should contain the total number of candidates, the number of candidates in each category and the average in each category.

plz if someone knows how to solve this problem, show me how

Show us what you have done so far.

This is a picture of the GUI , as for the coding mine is all wrong , but all i know is that it should have a "while" with a counter and a msg box showing the results as asked

Show us what you have done so far.

i showed :)))

What you've showed is no effort at all.
Try to solve it on your own and come back with a problem, not a request for the solution. You are supposed to learn from this.

What you've showed is no effort at all.
Try to solve it on your own and come back with a problem, not a request for the solution. You are supposed to learn from this.

I have tried with the do while and if statements, and used the counter += 1 till 10 but the msg box won't let me put the new candidates , it just keeps on showing 10 time then close .... what i showed is the GUI so that someone can show me a way of doing it and by that learning ...

Write it out in English (pseudo-code) first and it may be clearer. For example, start with

If candidate is 5 or higher in mobility and 5 or higher in hearing and 5 or higher in sight or candidate is 7 or higher in mobility and 7 or higher in hearing and sight and 4 or higher in hearing and sight, etc

and put "(" and ")" around sections to avoid ambiguity. By that I mean you don't want to confuse

a or (b and c)

with

(a or b) and c

which could give different results. Once you have the English then you can try to convert it to code. Once you have determined if a candidate is fit for ordinary duties (save it in a boolean variable named "ordinary"), then you can test for special duties. But like adam k said, you have to show some effort.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.