Write a C++ program to find whether the student is eligible based on marks, attendance, or both. Include the following three functions in the Main.cpp file Function name Function Description bool isEligibleBasedOnMarks() This function returns true if marksPercentage is within criteria else returns false. Include the default argument “int marksPercentage=90” bool isEligibleBasedOnAttendance() This function returns true if attendancePercentage is within criteria else returns false. Include the default argument “int attendancePercentage=100” bool isEligibleBasedOnMarksAndAttendance() This function returns true if marksPercentage and attendancePercentage are within criteria else returns false. Include the default argument “int marksPercentage=90, int attendancePercentage=100”
STRICTLY FOLLOW QUESTIONS AND TEMPLATES. MAKE CODE ACCORDING TO THE TEMPLATE PROVIDE AT THE END OF THE QUESTION. MATCH INPUT AND OUTPUT AS IT IS.
----------------Start-----------------
Write a C++ program to find whether the student is eligible based on marks, attendance, or both.
Include the following three functions in the Main.cpp file
Function name | Function Description |
bool isEligibleBasedOnMarks() | This function returns true if marksPercentage is within criteria else returns false. Include the default argument “int marksPercentage=90” |
bool isEligibleBasedOnAttendance() | This function returns true if attendancePercentage is within criteria else returns false. Include the default argument “int attendancePercentage=100” |
bool isEligibleBasedOnMarksAndAttendance() | This function returns true if marksPercentage and attendancePercentage are within criteria else returns false. Include the default argument “int marksPercentage=90, int attendancePercentage=100” |
Input Format:
Get the details of student 1 with no default values.
Get the details of student 2 with the default value for attendance percentage
Get the details of student 2 with the default value for both marks and attendance percentage
Output Format:
Refer sample input and output for formatting specifications.
Sample Input and Output Format:
[All text in bold corresponds to input and the rest corresponds to output]
Details of student 1(no default values)
Enter the percentage of marks
90
Enter the percentage of attendance
98
Student 1 is eligible based on marks
Student 1 is eligible based on attendance
Student 1 is eligible based on marks and attendance
Details of student 2(default value for attendance percentage)
Enter the percentage of marks
76
Student 2 is not eligible based on marks
Student 2 is eligible based on attendance
Student 2 is not eligible based on marks and attendance
Details of student 3(default value for both marks and attendance percentage)
Student 3 is eligible based on marks
Student 3 is eligible based on attendance
Student 3 is eligible based on marks and attendance
------------------end----------------
IN ATTACH IMAGE TEMPLATE IS PROVIDED FOR THE " MAIN.CPP ". KINDLY CHECK BEFORE MAKING CODE
Step by step
Solved in 4 steps with 5 images