Get Writing Help
WhatsApp
    ✍ ️Get Free Writing Help
WhatsApp

// (a) print the name and courseCode of the dynamically created course above to screen //…


  Write My Assignment FREE

Homework Help Question & Answers

// (a) print the name and courseCode of the dynamically created course above to screen //…

// (a) print the name and courseCode of the dynamically created course above to screen // …

// (b) change the value of courseCode of the dynamically created course above to “BIO 101” // …

// (c) print the name and code of the dynamically created course above again on the screen // … //

#include #include using namespace std; class courseType { private: string name; string courseCode; public: courseType(string theName = “Default name”, string theCode= “Default code”) { name = theName; courseCode = theCode; } string getName() const { return name; } string getCode() const { return courseCode; } void setName(string newName) {name = newName; } void setCode(string newCode) {courseCode = newCode; } }; int main() { // creating one course dynamically courseType *coursePtr = new courseType(“Biology I”);

// (a) print the name and courseCode of the dynamically created course above to screen // …

// (b) change the value of courseCode of the dynamically created course above to “BIO 101” // …

// (c) print the name and code of the dynamically created course above again on the screen // … // de-allocating memory delete coursePtr; system(“pause”); return 0; }

0 0
Add a comment
Plagiarism Free Assignment Help

Expert Help With This Assignment — On Your Terms

Native UK, USA & Australia writers Deadline from 3 hours 100% Plagiarism-Free — Turnitin included Unlimited free revisions Free to submit — compare quotes
    Write My Assignment FREE     Get A Free Quote →
Limited Offer     Get 25% off your first order — use code STUDYLINK25 at checkout    Claim Now
 
Don`t copy text!