Instructions Chapter 9 defined the struct studentType to implement the basic properties of a student. Define the class studentType with the same components as the struct studentType, and add member functions to manipulate the data members. (Note that the data members of the class studentType must be private.) Write a program to illustrate how to use the class studentType. Struct studentType: struct studentType { string firstName; string lastName; char courseGrade; int testScore; int programmingScore; double GPA; }; An example of the program is shown below: Name: Sara Spilner Grade: A Test score: 89 Programming score: 92 GPA: 3.57 *************** I am using the system mindtap. I have 3 file names to fill in. -main.cpp -studentType.h -studentTypeImp.cpp Thank you !!

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Instructions

Chapter 9 defined the struct studentType to implement the basic properties of a student. Define the class studentType with the same components as the struct studentType, and add member functions to manipulate the data members. (Note that the data members of the class studentType must be private.)

Write a program to illustrate how to use the class studentType.

Struct studentType:

struct studentType { string firstName; string lastName; char courseGrade; int testScore; int programmingScore; double GPA; };

An example of the program is shown below:

Name: Sara Spilner Grade: A Test score: 89 Programming score: 92 GPA: 3.57 ***************

I am using the system mindtap.

I have 3 file names to fill in.

-main.cpp

-studentType.h

-studentTypeImp.cpp

Thank you !!

 

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

I did it, and I'm still getting a zero.

I am also getting a lot of errors.

← → C ✰ng.cengage.com/static/nb/ui/evo/index.html?deploymentid=578112231052710652066970841&eISBN=9781337274715&id=1652826606&snapshotld=3227491&
CENGAGE MINDTAP
Programming Exercise 10-1
Lol
E
20
Tasks
The program is able to initialize
objects of type studentType
without error.
student Type 's getter and setter
for firstName member variable
work as expected
student Type 's getter and setter
for lastName member variable
work as expected.
student Type 's getter and setter
for courseGrade member
variable work as expected.
student Type 's getter and setter
Run checks
Submit 0%
main.cpp
1 #include "stdafx.h"
2 #include <iostream>
3 #include <iomanip>
4 #include <string>
5 #include "studentType.h"
studentType.h
6 using namespace std;
7 int main() {
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
studentTypelmp.cpp
student Type student1;
student Type student2("Brian", "Johnson", 85, 95,3.89);
studentType student3, student4;
string fName, 1Name;
int test, programming;
cin >> fName
cout << "
double currentGPA;
// Input for student 3 (student
cout << "Input for student three:" << endl;
cout << " Enter student's first and last name: ";
| +
cin >> test >> programming;
cout << "
>> 1Name;
Enter student's test and programming sc
Enter student's current GPA: ";
cin >> currentGPA;
cout << endl;
student3.setData(fName, 1Name, test, programming, cu
Q Search this course
> Terminal
X
+
?
sandbox $
sandbox $
sandbox $ g++ -Wall -std=c++0x
main.cpp studentType.h studentT
ypeImp.cpp
directory
sandbox $
main.cpp:1:10: fatal error: std
afx.h: No such file or director
у
X
#include "stdafx.h"
se me me me me me.
compilation terminated.
student TypeImp.cpp:1:10: fatal
error: stdafx.h: No such file o
I directory
#include "stdafx.h"
Ana na na na na na na
compilation terminated.
sandbox $ ./a.out
bash: ./a.out: No such file or
Vivian ✓
⠀
A-Z
(((
bongo
Transcribed Image Text:← → C ✰ng.cengage.com/static/nb/ui/evo/index.html?deploymentid=578112231052710652066970841&eISBN=9781337274715&id=1652826606&snapshotld=3227491& CENGAGE MINDTAP Programming Exercise 10-1 Lol E 20 Tasks The program is able to initialize objects of type studentType without error. student Type 's getter and setter for firstName member variable work as expected student Type 's getter and setter for lastName member variable work as expected. student Type 's getter and setter for courseGrade member variable work as expected. student Type 's getter and setter Run checks Submit 0% main.cpp 1 #include "stdafx.h" 2 #include <iostream> 3 #include <iomanip> 4 #include <string> 5 #include "studentType.h" studentType.h 6 using namespace std; 7 int main() { 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 studentTypelmp.cpp student Type student1; student Type student2("Brian", "Johnson", 85, 95,3.89); studentType student3, student4; string fName, 1Name; int test, programming; cin >> fName cout << " double currentGPA; // Input for student 3 (student cout << "Input for student three:" << endl; cout << " Enter student's first and last name: "; | + cin >> test >> programming; cout << " >> 1Name; Enter student's test and programming sc Enter student's current GPA: "; cin >> currentGPA; cout << endl; student3.setData(fName, 1Name, test, programming, cu Q Search this course > Terminal X + ? sandbox $ sandbox $ sandbox $ g++ -Wall -std=c++0x main.cpp studentType.h studentT ypeImp.cpp directory sandbox $ main.cpp:1:10: fatal error: std afx.h: No such file or director у X #include "stdafx.h" se me me me me me. compilation terminated. student TypeImp.cpp:1:10: fatal error: stdafx.h: No such file o I directory #include "stdafx.h" Ana na na na na na na compilation terminated. sandbox $ ./a.out bash: ./a.out: No such file or Vivian ✓ ⠀ A-Z ((( bongo
Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Software Development
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education