elp me for solution..
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Help me for solution..
![Design a struct personalInfo with components id, and name of type string.
Design a class student with private data member's person (struct variable of type personallnfo),
mumberOfCourses (of type integer), average (of type float), and marks[ ] an array of student's marks of
type integer. The class also has the member functions set( ), getPerson(), print( ), findAverage( ).
getAverage( ), and a parameterized constructor with default value 1 for the number of courses.
Implement the member functions of the class student.
The member function find.Average( ) is used to calculate the average mark for each student.
Write a driver that does the following:
Declares the array section[ ] of objects of student type.
Reads the number of students.
Reads information for each student from the file student.txt.
Calls the user-defined function
int maxAveragelndex(int, student [ ])
Prints the id and name of the student with the maximum average.
Student.txt:
1463491
137000s
5437330
2600004
1300002 Sadig
Ali
72 65 81 85
91 82 94 75 87
68 72 63
4 52 83 74 66
2 72 61
Yousef
Amna
Abrer
Sample input / output:
Student Ali with id 1463491 has average 75.75 of 4 courses.
Student Yousef with id 1370005 has average 85.8 of 5 courses.
Student Amna with id 5437330 has average 67.6667 of 3 courses.
Student Abrar with id 2600004 has average 68.75 of 4 courses.
Student Sadiq with id 1300002 has average 66.5 of 2 courses.
Student 1370005 Yousef has the maximum average.
45342](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F78835129-532c-4841-840b-616be83367c3%2F5f4677e5-4f3e-4ba3-b0e6-74ced1f41099%2Fw9sq6ed_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Design a struct personalInfo with components id, and name of type string.
Design a class student with private data member's person (struct variable of type personallnfo),
mumberOfCourses (of type integer), average (of type float), and marks[ ] an array of student's marks of
type integer. The class also has the member functions set( ), getPerson(), print( ), findAverage( ).
getAverage( ), and a parameterized constructor with default value 1 for the number of courses.
Implement the member functions of the class student.
The member function find.Average( ) is used to calculate the average mark for each student.
Write a driver that does the following:
Declares the array section[ ] of objects of student type.
Reads the number of students.
Reads information for each student from the file student.txt.
Calls the user-defined function
int maxAveragelndex(int, student [ ])
Prints the id and name of the student with the maximum average.
Student.txt:
1463491
137000s
5437330
2600004
1300002 Sadig
Ali
72 65 81 85
91 82 94 75 87
68 72 63
4 52 83 74 66
2 72 61
Yousef
Amna
Abrer
Sample input / output:
Student Ali with id 1463491 has average 75.75 of 4 courses.
Student Yousef with id 1370005 has average 85.8 of 5 courses.
Student Amna with id 5437330 has average 67.6667 of 3 courses.
Student Abrar with id 2600004 has average 68.75 of 4 courses.
Student Sadiq with id 1300002 has average 66.5 of 2 courses.
Student 1370005 Yousef has the maximum average.
45342
![ame of type string.
person (struct variable of type personallnfo).
oat), and marks ) an array of student's marks of
s ser ). getPerson( ), prini ). findAverage( ),
ault value 1 for the number of courses.
e the average mark for each student.
m average.
student - Notepad
File Edit Format View Help
1463491 Ali
4 72 65 81 85
1370005 Yousef 5 91 82 94 75 87
3 68 72 63
4 52 83 74 66
2 72 61
5437330 Amra
2600004 Abrar
1300002 Sadiq
average 7!
as averagi
average
s average
s average
naximum avi](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F78835129-532c-4841-840b-616be83367c3%2F5f4677e5-4f3e-4ba3-b0e6-74ced1f41099%2Fg3gz8vcm_processed.jpeg&w=3840&q=75)
Transcribed Image Text:ame of type string.
person (struct variable of type personallnfo).
oat), and marks ) an array of student's marks of
s ser ). getPerson( ), prini ). findAverage( ),
ault value 1 for the number of courses.
e the average mark for each student.
m average.
student - Notepad
File Edit Format View Help
1463491 Ali
4 72 65 81 85
1370005 Yousef 5 91 82 94 75 87
3 68 72 63
4 52 83 74 66
2 72 61
5437330 Amra
2600004 Abrar
1300002 Sadiq
average 7!
as averagi
average
s average
s average
naximum avi
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 5 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY