aboutsummaryrefslogtreecommitdiff
path: root/oop2w6/Resistor.cpp
blob: 9299db972630d6dda775984edc4fae2418185cc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "Resistor.h"

Resistor::Resistor(double value, double tolerance) {
	this->resistance = value;
	this->tolerance = tolerance;
}

double Resistor::getValue() {
	return resistance;
}

double Resistor::getTolerance() {
	return tolerance;
}

void Resistor::accept(Visitor& visitor) {
	visitor.visit(*this);
}