Nice simple model.

/*
	Counter
	Keeps track of a count allows increment and decrement
*/

//framework - no edit needed
let superClass = class {};
try { superClass = Model; } catch(ex) {}


class Counter extends superClass {
	/*ivars:
	count - track the count	*/
	
	//---------------------------------
	
	constructor() {
		super();
		this.count = 0;
		this.log = null;
	}
	
	//---------------------------------
	//Getters
	
	getCount() {
		return this.count;
	}
	
	getLog() {
		return this.log;
	}
	
	//---------------------------------
	//Getters
	
	setCount(newCount) {
		this.count = newCount;
		this.log = `set count to ${this.count}`;
	}
	
	//---------------------------------
	//Actions
	
	increment() {
		this.count++;
		this.log = `incremented count to ${this.count}`;
	}
	
	decrement() {
		this.count--;
		this.log = `decremented count to ${this.count}`;
	}
	
	//---------------------------------
	
	toString() {
		return `count is ${this.count}`;
	}
	
}


//--------------------------------
//Playing

function prn(o) { console.log(o); }

const counter = new Counter();
prn(counter);
counter.increment();
prn(counter);
counter.decrement();
counter.decrement();
prn(counter);