Skip to content
Snippets Groups Projects
Commit 2a35a2f0 authored by Andreas Blakli's avatar Andreas Blakli
Browse files

La til:

lesData() func.
skrivData() func.
i bane.cpp og la til deklarasjoner i bane.h.
parent 08f03e5c
Branches
No related tags found
No related merge requests found
#include "bane.h"
Bane::Bane() {
using namespace std;
Bane::Bane() : Rute() {
}
Bane::~Bane() {
}
void Bane::lesData() {
antallVogner = lesInt("Antall vogner", MAX_ANTALL_VOGNER, MIN_ANTALL_VOGNER);
baneLengde = lesInt("Banelengde", MIN_BANELENGDE, MAX_BANELENGDE);
}
void Bane::skrivData() {
cout << "\nAntall vogner: " << antallVogner << '\n'
<< "Banelengde: " << baneLengde;
}
\ No newline at end of file
#ifndef __BANE_H
#define __BANE_H
#include <iostream>
#include "rute.h"
#include "konstanter.h"
#include "lesData3.h"
class Bane : public Rute {
private:
......@@ -11,6 +15,8 @@ class Bane : public Rute {
public:
Bane();
virtual ~Bane();
void lesData();
void skrivData();
};
#endif // __BANE_H
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment