subject

Assign courseStudent's name with Smith, age with 20, and ID with 9999. Use the print member function and a separate cout statement to output courseStudents's data. End with a newline. Sample output from the given program: #include
#include
using namespace std;
class PersonData {
public:
void SetName(string userName) {
lastName = userName;
};
void SetAge(int numYears) {
ageYears = numYears;
};
// Other parts omitted
void PrintAll() {
cout << "Name: " << lastName;
cout << ", Age: " << ageYears;
};
private:
int ageYears;
string lastName;
};
class StudentData: public PersonData {
public:
void SetID(int studentId) {
idNum = studentId;
};
int GetID() {
return idNum;
};
private:
int idNum;
};
int main() {
StudentData courseStudent;
/* Your solution goes here */
return 0;
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:30
You need to write some code that responds to a text change in a jtextfield. how can you do that? create a class that implements the interface actionlistener and override the method textfieldchanged create a class that extends the superclass actionlistener and override the method actionperformed create a class that implements the interface actionlistener and override the method actionperformed create a class that extends the superclass actionlistener and override the method textfieldchanged
Answers: 2
question
Computers and Technology, 23.06.2019 13:00
Which of the following statements is false? a. a class can directly inherit from class object. b. if the class you're inheriting from declares instance variables as private, the inherited class can access those instance variables directly. c. a class's instance variables are normally declared private to enforce good software engineering. d. it's often much more efficient to create a class by inheriting from a similar class than to create the class by writing every line of code the new class requires.
Answers: 3
question
Computers and Technology, 23.06.2019 15:20
An ou structure in your domain has one ou per department, and all the computer and user accounts are in their respective ous. you have configured several gpos defining computer and user policies and linked the gpos to the domain. a group of managers in the marketing department need different policies that differ from those of the rest of the marketing department users and computers, but you don't want to change the top-level ou structure. which of the following gpo processing features are you most likely to use? a, block inheritance b, gpo enforcement c, wmi filtering d, loopback processing
Answers: 3
question
Computers and Technology, 24.06.2019 12:30
Do you think media is stereotype ? and why?
Answers: 1
You know the right answer?
Assign courseStudent's name with Smith, age with 20, and ID with 9999. Use the print member function...
Questions
question
Social Studies, 27.10.2021 09:50
question
Mathematics, 27.10.2021 09:50
question
Mathematics, 27.10.2021 09:50
question
Mathematics, 27.10.2021 09:50
Questions on the website: 13722362