Question
Assignment-11(Classes and Objects) You are given the marks of 5 students each having taken 5 subjects. Each of the marks are in the range 0-100.
Assignment-11(Classes and Objects)
You are given the marks of 5 students each having taken 5 subjects. Each of the
marks are in the range 0-100. You must validate the marks. The validation criteria
is that each of the marks must be greater than or equal to 30. If any of the student
has a score less than thirty then print student has failed and you will not
calculate total marks for that particular student. Your validation must be present
inside the class and must not be in the main function. Using your knowledge of
classes and objects write a c++ program that will calculate the maximum total
score of all the 5 students, the minimum total score of all the 5 students, and the
mean of the total score of all the 5 students. You must have a class for this
program and each of the 5 students is an object.
Input:
The input for the 5 students are as follows:
Student s1: 50, 40,30,60,89
Student s2: 35,45,65,66,100
Student s3: 23, 100, 100, 56, 88
Student s4: 65, 89,99,91,40
Student s5: 90, 78,81,73,45
Your output screen must look like this:
Enter marks for student 1:
50
40
30
60
89
The total marks of student 1 is total
.
..
.
.
.
.
.
So on.. The total marks of student 5 is total.
The maximum of the total score is max
The minimum of the total score is min
The mean of the total score is mean
Make sure your code is well structured, documented and indented. Show the output of
the program for only those input scenarios that are shown below.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started