class MyClass {
// private variables or attributes
int variable1;
float variable2;
public:
// constructor or initializer method
MyClass(int arg1, float arg2) {
variable1 = arg1;
variable2 = arg2;
}
// instance method
void instance_method() {
std::cout << "Instance method called." << std::endl;
}
// getter method
int get_variable1() const {
return variable1;
}
// setter method
void set_variable1(int arg) {
variable1 = arg;
}
// static method
static void static_method() {
std::cout << "Static method called." << std::endl;
}
};