## MooseObject basics

- All objects in MOOSE inherit from [`MooseObject`](http://www.mooseframework.org/docs/doxygen/moose/classMooseObject.html)
- Therefore, every object that is created by a user to describe their problem has the same basic structure, this basic structure is given in the following example. (*Note, this is not valid MOOSE code.*)

[](---)

## MyObject.h

```cpp
#ifndef MYOBJECT_H 
#define MYOBJECT_H

#include "BaseClass.h" 

class MyObject;

template<>
InputParameters validParams<MyObject>();

class MyObject : public BaseClass
{ 
public:
  MyObject(const InputParameters & parameters);

protected:
  virtual SomeType inheritedMethod();
};

#endif // MYOBJECT_H
```

[](---)

## MyObject.C

```cpp
#include "MyObject.h"

template<>
InputParameters validParams<MyObject>()
{
  InputParameters params = validParams<BaseClass>(); 
  return params;
}

MyObject::MyObject(const InputParameters & parameters):
    BaseClass(parameters)
{}

SomeType 
MyObject::inheritedMethod() 
{
  // Do Stuff!
}
```