12 Hailey 80 90 Paul 88 73 April 78 56 Sonya 80 71 John 56 68 Pam 70 72 Oliver 90 95 Eugene 67 79 Harry 81 65 Jessica 56 82 Eileen 98 77 Lily 77 72 } // Complete the class Enter the fileName : data.txt Data from file Hailey 80 90 85 Paul 88 73 80.5 April 78 56 67 75.5 Sonya 80 71 John 56 68 Pam 70 72 62 71 Oliver 90 95 92.5 Eugene 67 70 68.5 Harry 81 65 Jessica 56 82 Eileen 98 77 87.5 Lily 77 72 74.5 Sorted data 73 69 Oliver 90 95 92.5 Eileen 98 77 87.5 Hailey 80 90 85 Paul 88 73 80.5 Sonya 80 71 75.5 Lily 77 72 74.5 Harry 81 65 Pam 70 72 Jessica 56 82 Eugene 67 70 April 78 56 John 56 68 73 71 69 } 68.5 67 62 // Complete the class

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter9: Advanced Array Concepts
Section: Chapter Questions
Problem 2PE
icon
Related questions
Question

Use C++

here is the

data.txt :

12
Hailey 80 90
Paul 88 73
April 78 56
Sonya 80 71
John 56 68
Pam 70 72
Oliver 90 95
Eugene 67 79
Harry 81 65
Jessica 56 82
Eileen 98 77
Lily 77 72
data.txt
12
Hailey 80 90
Paul 88 73
April 78 56
Sonya 80 71
John 56 68
Pam 70 72
Oliver 90 95
Eugene 67 79
Harry 81 65
Jessica 56 82
Eileen 98 77
Lily 77 72
double average;
public:
}
// Complete the class
Oliver 90 95
Eugene 67 70
81 65
Harry
Jessica 56 82
Eileen 98 77
Lily 77 72
Sorted data
Enter the fileName : data. txt
Data from file
Hailey 80 90 85
Paul 88 73 80.5
April 78 56
Sonya 80 71
John 56 68
Pam 70 72
67
75.5
62
71
April 78 56
John 56 68
92.5
68.5
73
69
87.5
74.5
Oliver 90 95 92.5
Eileen 98 77 87.5
Hailey 80 90
Paul 88 73
85
80.5
75.5
74.5
73
71
69
Sonya 80 71
Lily 77 72
Harry 81 65
Pam 70 72
Jessica 56 82
Eugene 67 70 68.5
public:
67
62
// Complete the class
Transcribed Image Text:data.txt 12 Hailey 80 90 Paul 88 73 April 78 56 Sonya 80 71 John 56 68 Pam 70 72 Oliver 90 95 Eugene 67 79 Harry 81 65 Jessica 56 82 Eileen 98 77 Lily 77 72 double average; public: } // Complete the class Oliver 90 95 Eugene 67 70 81 65 Harry Jessica 56 82 Eileen 98 77 Lily 77 72 Sorted data Enter the fileName : data. txt Data from file Hailey 80 90 85 Paul 88 73 80.5 April 78 56 Sonya 80 71 John 56 68 Pam 70 72 67 75.5 62 71 April 78 56 John 56 68 92.5 68.5 73 69 87.5 74.5 Oliver 90 95 92.5 Eileen 98 77 87.5 Hailey 80 90 Paul 88 73 85 80.5 75.5 74.5 73 71 69 Sonya 80 71 Lily 77 72 Harry 81 65 Pam 70 72 Jessica 56 82 Eugene 67 70 68.5 public: 67 62 // Complete the class
In the file 'data.txt', there is information about students - name, C++ score, and Java score. The number 12 in the first
line indicates the number of students.
data.txt
12
Hailey 80 90
Paul 88 73
April 78 56
Sonya 80 71
John 56 68
Pam 70 72
Oliver 90 95
Eugene 67 79
Harry 81 65
Jessica 56 82
Eileen 98 77
lily 77 72
(1) Create a dynamic array and store name, c++, and java score.
name
score
score
information information
private:
name
(2) After storing the name, cpp score, and java score, calculate the average and store it in
the array.
(3) Complete the two classes and write the main function to print out the following result:
class Score
{
int cpp:
int java;
double average;
public:
// Complete the class
Jessica
D: 1.
85
Paul 88 73 80.5
April 78 56
67
75.5
Sonya 80 71
John 56 68
62
70 72
Pam
Oliver 90 95
Eugene 67 70 68.5
71
92.5
Harry 81 65
56 82
00
SESSINGSGE
class Student
{
73
69
private:
Enter the fileName: data. txt
Data from file
Hailey 80 90
name
score
information
string name;
Score* score;
public:
// Complete the class
Transcribed Image Text:In the file 'data.txt', there is information about students - name, C++ score, and Java score. The number 12 in the first line indicates the number of students. data.txt 12 Hailey 80 90 Paul 88 73 April 78 56 Sonya 80 71 John 56 68 Pam 70 72 Oliver 90 95 Eugene 67 79 Harry 81 65 Jessica 56 82 Eileen 98 77 lily 77 72 (1) Create a dynamic array and store name, c++, and java score. name score score information information private: name (2) After storing the name, cpp score, and java score, calculate the average and store it in the array. (3) Complete the two classes and write the main function to print out the following result: class Score { int cpp: int java; double average; public: // Complete the class Jessica D: 1. 85 Paul 88 73 80.5 April 78 56 67 75.5 Sonya 80 71 John 56 68 62 70 72 Pam Oliver 90 95 Eugene 67 70 68.5 71 92.5 Harry 81 65 56 82 00 SESSINGSGE class Student { 73 69 private: Enter the fileName: data. txt Data from file Hailey 80 90 name score information string name; Score* score; public: // Complete the class
Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
File Input and Output Operations
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage