Question
I have programming homework to write a code for an online shop, the questions in the homework tells me what to do step by step
I have programming homework to write a code for an online shop, the questions in the homework tells me what to do step by step but I reached to a question where they asked me :how can I write a code for a private pointer attribute in class X to an object of class Z. and I couldn't answer bellow is the code so far:
#include { set_model(m); set_netPrice(n); original=o; } virtual ~Accessory() { cout<<"~Accessory"< } }; //ANSWER 3 enum class OperatingSystem { unknown, android, iOS, macOS, linux, proprietary, unix, windows }; ostream& operator<<(ostream& out, const OperatingSystem& os) { string osS; switch(os) { case OperatingSystem::unknown: { osS="unknown OS"; break; } case OperatingSystem::android: { osS="Android OS"; break; } case OperatingSystem::iOS: { osS="iOS"; break; } case OperatingSystem::macOS: { osS="MacOS"; break; } case OperatingSystem::proprietary: { osS="proprietary OS"; break; } case OperatingSystem::unix: { osS="Unix OS"; break; } case OperatingSystem::linux: { osS="linux OS"; break; } case OperatingSystem::windows: { osS="MS Windows OS"; break; } } } //ANSWER 4 class Device : public Article { private: int main_memory; string os; public: Device(string m,double n,int mm,double t,string ops=unknown):Article(string m,double n, double t) { set_model(m); os.assign(ops); set_netPrice(n); main_memory=mm; } virtual ~Device() { cout<<"~device()"<
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