Define a Student class and its child class HS_Student and MS_Student. ◆ HS_Student: name (string), grade (int), activity (string) MS_Student: name (string), grade (int), mathScore (int), scienceScore (int) ◆ Create two dynamic arrays - one for HS_Student, the other for MS_Student. Output . . MS_Student: Average of math and science scores for each grade level HS_Student: Number of students in the same activity in each grade Problem 2. MS.txt Paul 6 80 90 Oliver 7 82 79 Eugene 8 70 80 Tom 8 89 93 Sue 7 79 82 Harry 8 68 78 Tim 8 90 76 Eileen 7 83 79 Suzy 8 90 90 Erin 7 66 77 April 6 70 80 Jennifer 8 79 81 Eric 7 60 68 Brian 6 82 71 HS.txt Alice 10 swimming Paul 11 band Cindy 10 soccer Hailey 10 swimming Ara 9 wrestling Sally 9 band Peter 9 polo Jenny 11 band Tammy 10 band Robert 12 polo Pam 11 soccer Eve 10 polo Jessica 9 soccer David 9 swimming Sandy 9 band Olivia 9 band Phoebe 10 soccer Ken 10 soccer Bill 11 band Dolly 11 band CSOLABLE High School Students Grade 9 swimming: 1 band: 3 polo 1 wrestling 1 soccer 1 Grade 10 swimming : 2 band: 1 polo 1 soccer : 3 Grade 11 band: 4 soccer 1 Grade 12 polo 1 Middle School Students 6th grade 77.33 80.33 7th grade : 74.00 77.00 8th grade : 81.00 83.00

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 12PE
icon
Related questions
Question

Use C++

Define a Student class and its child class HS_Student and MS_Student.
◆ HS_Student: name (string), grade (int), activity (string)
◆MS_Student: name (string), grade (int), mathScore (int), scienceScore (int)
◆ Create two dynamic arrays - one for HS_Student, the other for
MS_Student.
◆ Output
MS_Student: Average of math and science scores for each grade level
HS_Student: Number of students in the same activity in each grade
Problem 2.
MS.txt
Paul 6 80 90
Oliver 7 82 79
Eugene 8 70 80
Tom 8 89 93
Sue 7 79 82
Harry 8 68 78
Tim 8 90 76
Eileen 7 83 79
Suzy 8 90 90
Erin 7 66 77
April 6 70 80
Jennifer 8 79 81
Eric 7 60 68
Brian 6 82 71
HS.txt
Alice 10 swimming
Paul 11 band
Cindy 10 soccer
Hailey 10 swimming
Ara 9 wrestling
Sally 9 band
Peter 9 polo
Jenny 11 band
Tammy 10 band
Robert 12 polo
Pam 11 soccer
Eve 10 polo
Jessica 9 soccer
David 9 swimming
Sandy 9 band
Olivia 9 band
Phoebe 10 soccer
Ken 10 soccer
Bill 11 band
Dolly 11 band
CS-003LABLE
High School Students
Grade 9
swimming : 1
band 3
polo 1
wrestling 1
soccer 1
Grade 10
swimming : 2
band 1
polo 1
soccer : 3
Grade 11
band: 4
soccer : 1
Grade 12
polo 1
Middle School Students
6th grade 77.33 80.33
7th grade 74.00 77.00
8th grade : 81.00 83.00
Transcribed Image Text:Define a Student class and its child class HS_Student and MS_Student. ◆ HS_Student: name (string), grade (int), activity (string) ◆MS_Student: name (string), grade (int), mathScore (int), scienceScore (int) ◆ Create two dynamic arrays - one for HS_Student, the other for MS_Student. ◆ Output MS_Student: Average of math and science scores for each grade level HS_Student: Number of students in the same activity in each grade Problem 2. MS.txt Paul 6 80 90 Oliver 7 82 79 Eugene 8 70 80 Tom 8 89 93 Sue 7 79 82 Harry 8 68 78 Tim 8 90 76 Eileen 7 83 79 Suzy 8 90 90 Erin 7 66 77 April 6 70 80 Jennifer 8 79 81 Eric 7 60 68 Brian 6 82 71 HS.txt Alice 10 swimming Paul 11 band Cindy 10 soccer Hailey 10 swimming Ara 9 wrestling Sally 9 band Peter 9 polo Jenny 11 band Tammy 10 band Robert 12 polo Pam 11 soccer Eve 10 polo Jessica 9 soccer David 9 swimming Sandy 9 band Olivia 9 band Phoebe 10 soccer Ken 10 soccer Bill 11 band Dolly 11 band CS-003LABLE High School Students Grade 9 swimming : 1 band 3 polo 1 wrestling 1 soccer 1 Grade 10 swimming : 2 band 1 polo 1 soccer : 3 Grade 11 band: 4 soccer : 1 Grade 12 polo 1 Middle School Students 6th grade 77.33 80.33 7th grade 74.00 77.00 8th grade : 81.00 83.00
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 11 images

Blurred answer
Knowledge Booster
User Defined DataType
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning