I'm not sure what the question is here, but the basic structure is:
class Computer {
int year;
...
public:
Computer() { // Default constructor
year = -1;
}
Computer (int year, string model) { // Non-default constructor
this.year = year;
...
}
~Computer() { // Destructor
cout << ...;
}
int getYear() { return year; } // Accessor
void setYear(int year) {this.year = year;} // Mutator
...
}