reate a program that takes in a student first name and average mark obtained, the system should the group the students using the first vowel in their name. For example if the student name is Jena, then the student belongs to group E and if the name was Jack then the student belongs to group A[HINT: Make use of the indexOf() and contains() methods from the string class]. The program should further categorize the mark is follows:
Create a program that takes in a student first name and average mark obtained, the system should the group the students using the first vowel in their name. For example if the student name is Jena, then the student belongs to group E and if the name was Jack then the student belongs to group A[HINT: Make use of the indexOf() and contains() methods from the string class]. The program should further categorize the mark is follows:
Marks obtained |
Grade Level |
Message |
80 – 100 |
1 |
Magnificent!! |
70 – 79 |
2 |
Excellent!! |
60 – 69 |
3 |
Good work!! |
50 – 59 |
4 |
Good!! |
0 – 49 |
0 |
Fail – Try again next Year!! |
Greater than 100 or less than 0 |
X |
Invalid Marks!!, Marks too high. Or Invalid Marks!!, Negative marks not allowed. |
Sample run 1:
Enter student full names: Johnathan
Enter average mark obtained: 88
Output: Hi Johnathan, you were placed in group O
Grade Level: 1
Comment: Magnificent!!
Sample run 2:
Enter student full names: Ellan
Enter 3 marks separated by spaces: 200
Output: Hi Ellan, you were placed in group E
Grade Level: X
Comment: Invalid Marks!!, Marks too high.
Step by step
Solved in 3 steps with 1 images