Currently learning object orientated programming, This programme gets 2 test scores from 3 students and outputs weather or not the student who's name the user typed in passed the year.
I'm having a problem with my bool function at the very end of the programme. The first bool function checks to see if the students name exists. If it does exist, then it goes into a second bool function to see if the students mark is above 80 or not.
Example.
The 3 students and there results for two exams
William = 56 67
Shane = 66 34
Harry = 15 10
If I type in William then the programme works and it says "This student passed"
If I type in Harry then the programme doesn't work and it says "This student doesn't exist"
There seems to be a problem when the bool function that checks to see if the student passed is false. Why is this?
#NOTE# The two bool functions are located in my classes .cpp file. The code that isn't relevant to the question is just to make the programme easier to understand.
At first glance:
--> where do you declare "list"?
--> what's the point of having a member method ("IsAFail()") that only evaluates a value passed from outside the class? Is it possible that "mark" is also a class property?
Very hard giving any suggestion without a compilable code!