#Homework help pls

9 messages · Page 1 of 1 (latest)

neat stratus
#

need help with writing the overloading functions and understading the struct appointement

twin estuaryBOT
#

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

Screenshots!

Your message appears to contain screenshots but no code. Please send code and error messages in text instead of screenshots if applicable!

neat stratus
#

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;
}

};

twin estuaryBOT
#
Winsock
We Don't Do Your Homework

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.

#
How to Format Code on Discord
Markup

```cpp
int main() {}
```

Result
int main() {} ```
empty marsh
#

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

Guru99

What is a Struct in C++? A STRUCT is a C++ data structure that can be used to store together elements of different data types. In C++, a structure is a user-defined data type. The structure creates a

#

You're also not specifying what exactly you don't understand with the appointments. That would enable us to help you more efficiently. 👌🏻