Question
please complete the items that say Change Here Thank you, typed answers only please here is text to fill out if you want : int
please complete the items that say "Change Here" Thank you, typed answers only please
here is text to fill out if you want :
int main() {
classSection class1("Beginning Programming", 12345);
classSection class2("Programming I", 13579);
// (2.5 points) Declare and initialize the pointer pclass1 to the address of class1 and pclass2 to the address of class2
classSection *pclass1 = &class1;
classSection *pclass2 = &class2;
// (2.5 points) Set the numberOfStudents field of class1 to 30 using class. access method
class1.numberOfStudents = 30;
// (2.5 points) Set the numberOfStudents field of class2 to 25 using pointer-> access method
class2.numberOfStudents = 25;
// (2.5 points) Change the CRN field of class2 to 24680 using dereference operator* with pointer
// and . access method
"(Change Here)" = 24680;
// (2.5 points) Set the averageScore of class1 to 87.5 with class. access method with the help of
// setAverageScore function
"(Change Here)"setAverageScore(87.5);
// (2.5 points) Set the averageScore of class2 to 82.0 with pointer-> access method with the help
// of setAverageScore function
"(Change Here)"setAverageScore(82.0);
// (2.5 points) Print the averageScore of class1 with pointer-> access method and with the help of
// getAverageScore function
cout
// (2.5 points) Print the averageScore of class2 using dereference operator* with pointer and . access
// method and with the help of getAverageScore function
cout
return 0;
}
#include
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started