◆ Define a Student class and its child class HS_Student and MS_Student.

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...
icon
Related questions
Question

Use C++

- Define a **Student** class and its child classes **HS_Student** and **MS_Student**.
- **HS_Student**: 
  - Attributes:
    - `name` (string)
    - `grade` (int)
    - `activity` (string)
- **MS_Student**:
  - Attributes:
    - `name` (string)
    - `grade` (int)
    - `mathScore` (int)
    - `scienceScore` (int)
    
- Create two dynamic arrays: 
  - One for **HS_Student**
  - Another for **MS_Student**

- **Output**:
  - For **MS_Student**: Calculate the average of math and science scores for each grade level.
  - For **HS_Student**: Determine the number of students participating in the same activity for each grade level.
Transcribed Image Text:- Define a **Student** class and its child classes **HS_Student** and **MS_Student**. - **HS_Student**: - Attributes: - `name` (string) - `grade` (int) - `activity` (string) - **MS_Student**: - Attributes: - `name` (string) - `grade` (int) - `mathScore` (int) - `scienceScore` (int) - Create two dynamic arrays: - One for **HS_Student** - Another for **MS_Student** - **Output**: - For **MS_Student**: Calculate the average of math and science scores for each grade level. - For **HS_Student**: Determine the number of students participating in the same activity for each grade level.
**Problem 2: Data Analysis and Summary**

The task involves analyzing data from two text files, *MS.txt* and *HS.txt*, detailing student scores and high school student activities.

### *MS.txt* (Middle School Scores)

- **Paul**: 6th Grade - Scores: 80, 90, 70
- **Oliver**: 7th Grade - Scores: 82, 79
- **Eugene**: 8th Grade - Scores: 70, 80
- **Tom**: 8th Grade - Scores: 89, 93
- **Sue**: 7th Grade - Scores: 79, 82
- **Harg**: 6th Grade - Scores: 80, 76
- **Tim**: 8th Grade - Scores: 90, 76
- **Eileen**: 7th Grade - Scores: 77, 59
- **Suzy**: 8th Grade - Scores: 90
- **Erin**: 6th Grade - Scores: 79
- **April**: 6th Grade - Scores: 70, 80
- **Jennifer**: 8th Grade - Scores: 79, 81
- **Eric**: 7th Grade - Scores: 60, 68
- **Brian**: 6th Grade - Scores: 82, 71

### *HS.txt* (High School Activities)

- **Alice**: Grade 10, Swimming
- **Paul**: Grade 11, Band
- **Cindy**: Grade 10, Soccer
- **Hailey**: Grade 10, Swimming
- **Ara**: Grade 9, Wrestling
- **Sally**: Grade 9, Band
- **Peter**: Grade 9, Polo
- **Jenny**: Grade 11, Band
- **Tammy**: Grade 10, Band
- **Robert**: Grade 12, Polo
- **Pam**: Grade 11, Soccer
- **Eve**: Grade 10, Polo
- **Jessica**: Grade 9, Soccer
- **David**: Grade 9, Swimming
- **Sandy**: Grade 9, Band
- **Olivia**: Grade 9, Band
- **Phoebe
Transcribed Image Text:**Problem 2: Data Analysis and Summary** The task involves analyzing data from two text files, *MS.txt* and *HS.txt*, detailing student scores and high school student activities. ### *MS.txt* (Middle School Scores) - **Paul**: 6th Grade - Scores: 80, 90, 70 - **Oliver**: 7th Grade - Scores: 82, 79 - **Eugene**: 8th Grade - Scores: 70, 80 - **Tom**: 8th Grade - Scores: 89, 93 - **Sue**: 7th Grade - Scores: 79, 82 - **Harg**: 6th Grade - Scores: 80, 76 - **Tim**: 8th Grade - Scores: 90, 76 - **Eileen**: 7th Grade - Scores: 77, 59 - **Suzy**: 8th Grade - Scores: 90 - **Erin**: 6th Grade - Scores: 79 - **April**: 6th Grade - Scores: 70, 80 - **Jennifer**: 8th Grade - Scores: 79, 81 - **Eric**: 7th Grade - Scores: 60, 68 - **Brian**: 6th Grade - Scores: 82, 71 ### *HS.txt* (High School Activities) - **Alice**: Grade 10, Swimming - **Paul**: Grade 11, Band - **Cindy**: Grade 10, Soccer - **Hailey**: Grade 10, Swimming - **Ara**: Grade 9, Wrestling - **Sally**: Grade 9, Band - **Peter**: Grade 9, Polo - **Jenny**: Grade 11, Band - **Tammy**: Grade 10, Band - **Robert**: Grade 12, Polo - **Pam**: Grade 11, Soccer - **Eve**: Grade 10, Polo - **Jessica**: Grade 9, Soccer - **David**: Grade 9, Swimming - **Sandy**: Grade 9, Band - **Olivia**: Grade 9, Band - **Phoebe
Expert Solution
steps

Step by step

Solved in 4 steps with 9 images

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
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…
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)
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
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY