All pastes #707826 Raw Edit

Miscellany

public text v1 · immutable
#707826 ·published 2007-09-23 10:00 UTC
rendered paste body
#include <iostream>
#include "teht4.h"

using namespace std;

Kytkin::Kytkin(){// oletusrakentaja
    bTila_ = false ;
}
Kytkin::Kytkin(bool bTila){  // param. rakentaja
    bTila_ = bTila ;
    cout << "Olio luotu\n" ;
}

Kytkin::~Kytkin(){  // purkaja
    cout << "Olio poistettu\n" ;
}

void Kytkin::Kytke(bool bTila){
    bTila_ = bTila ;
    cout << "Kytketty! " << endl  ;
}
void Kytkin::Katkaise(bool bTila){
    bTila_ = bTila ;
    cout << "Katkaistu! " << endl  ;
}
void Kytkin::Tila(bool bTila){
    bTila_ = bTila;
    if(bTila == false)
        cout << "Kytkinta ei ole kytketty! " << endl;
    else
        cout << "Kytkin kytketty! \n" ;
}