Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Gruppe44-PROG1003-2022
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Blakli
Gruppe44-PROG1003-2022
Commits
3d600093
Commit
3d600093
authored
Mar 26, 2022
by
Andreas Blakli
Browse files
Options
Downloads
Patches
Plain Diff
La til:
lesData() func. skrivData() func. i buss.cpp og deklarasjoner i buss.h.
parent
68729e9f
Branches
main
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
buss.cpp
+27
-2
27 additions, 2 deletions
buss.cpp
buss.h
+6
-0
6 additions, 0 deletions
buss.h
with
33 additions
and
2 deletions
buss.cpp
+
27
−
2
View file @
3d600093
#include
"buss.h"
#include
"buss.h"
B
us
s
::
Buss
()
{
us
ing
namespace
std
;
Buss
::
Buss
()
:
Rute
()
{
}
}
Buss
::~
Buss
()
{
Buss
::~
Buss
()
{
}
void
Buss
::
lesData
()
{
int
valg
;
// cout << "\nAntall sitteplasser: ";
antallSitteplasser
=
lesInt
(
"Antall sitteplasser"
,
MIN_ANTALL_SITTEPLASSER
,
MAX_ANTALL_SITTEPLASSER
);
andtallStaplasser
=
lesInt
(
"Antall ståplasser"
,
MIN_ANTALL_STAPLASSER
,
MAX_ANTALL_STAPLASSER
);
do
{
valg
=
lesChar
(
"Leddbuss (J/n)"
);
}
while
(
valg
!=
'J'
&&
valg
!=
'N'
);
if
(
valg
==
'J'
)
leddbuss
=
true
;
else
leddbuss
=
false
;
}
void
Buss
::
skrivData
()
{
cout
<<
"
\n
Antall sitteplasser: "
<<
antallSitteplasser
<<
'\n'
<<
"Antall ståplasser:"
<<
andtallStaplasser
<<
'\n'
<<
"Er leddbuss: "
;
if
(
leddbuss
)
cout
<<
"Ja"
;
else
cout
<<
"Nei"
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
buss.h
+
6
−
0
View file @
3d600093
#ifndef __BUSS_H
#ifndef __BUSS_H
#define __BUSS_H
#define __BUSS_H
#include
<iostream>
#include
"rute.h"
#include
"rute.h"
#include
"lesData3.h"
#include
"konstanter.h"
class
Buss
:
public
Rute
{
class
Buss
:
public
Rute
{
private:
private:
...
@@ -12,6 +16,8 @@ class Buss : public Rute {
...
@@ -12,6 +16,8 @@ class Buss : public Rute {
public:
public:
Buss
();
Buss
();
virtual
~
Buss
();
virtual
~
Buss
();
void
lesData
();
void
skrivData
();
};
};
#endif //__BUSS_H
#endif //__BUSS_H
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment