#Homework help pls
9 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
@neat stratus
Your message appears to contain screenshots but no code. Please send code and error messages in text instead of screenshots if applicable!
class Customer : public Person
{
private:
int MechanicID;
struct Appointement{}; //fix this
public:
Customer()
{
MechanicID=12334;
}
int getMechanicID()
{
return MechanicID;
}
void setMechanicID(int M)
{
MechanicID = M;
}
Customer operator==(const Customer& c)
{
Customer customer;
Customer customer2;
if ()
{
}
//finish this
}
Customer operator>(const Customer& c)
{
//finish this
}
//add Other overloading function
};
class Person
{
private:
string Name;
int ID;
int age;
public:
Person()
{
Name = "";
ID = 0;
age = 0;
}
struct Appointement
{
int hours[12];
int minutes[60];
};
string getName()
{
return Name;
}
void setName(string n)
{
Name = n;
}
int getAge()
{
return age;
}
void setAge(int a)
{
age = a;
}
int getID()
{
return ID;
}
void setID(int i)
{
ID = i;
}
void printInfo()
{
cout << "Name: " << Name << " Age: " << age << " ID: " << ID << endl;
}
};
Welcome to Together C & C++ 👋
We won't do your homework for you (#rules) but we are happy to help you learn and point you in the right direction.
Please send what you have so far and ask a specific question.
```cpp
int main() {}
```
int main() {} ```
I think you should read or watch some videos of how to do it before asking on how to overload methods and create structs. I recommend these: https://www.youtube.com/watch?v=mS9755gF66w&ab_channel=TheCherno and https://www.guru99.com/cpp-structures.html
Patreon ► https://patreon.com/thecherno
Twitter ► https://twitter.com/thecherno
Instagram ► https://instagram.com/thecherno
Discord ► https://discord.gg/R2t97wf
Operators Reference ► http://en.cppreference.com/w/cpp/language/operators
Series Playlist ► https://www.youtube.com/playlist?list=PLlrATfBNZ98dudnM48yfGUldqGD0S4FFb
Gear I use:
------...
You're also not specifying what exactly you don't understand with the appointments. That would enable us to help you more efficiently. 👌🏻