Coverage Report: Coaster
File: Rollercoaster.cpp
show more
show less
From
All Files
Location
C:\Testwell\Coaster\CoasterCode\Rollercoaster.cpp
MC/DC
100%
6 / 6
Statement
100%
15 / 15
True
Highlight:
All
MC/DC
Statement
False
Source & Details
Show Code:
Outside Functions
Show Coverage Details:
Single Probe Descriptions
Condition Blocks
True-False-Tables
MC/DC Blocks
Rollercoaster.cpp
All Files
1
// Rollercoaster.cpp : This file contains function "main".
2
// Within this file the app starts and ends
3
4
#include <iostream>
5
#include <string>
6
7
#include "Kermisvisitor.h"
8
#include "TicketApp.h"
9
10
#include "PassengerScan.h"
11
#include "PriceCalculation.h"
12
13
using
namespace
std;
14
15
int
main()
1
FUNCTION main()
16
{
17
Kermisvisitor passenger;
18
TicketApp myApp;
19
20
myApp.showInstruction();
21
22
do
do
23
{
24
myApp.ask4Input(
"Passenger's first name: "
);
25
cin >> passenger.FirstName;
26
27
myApp.ask4Input(
"How old is "
+ passenger.FirstName +
"(e.g.: 47)? "
);
28
cin >> passenger.Age;
29
30
myApp.ask4Input(
"How tall is "
+ passenger.FirstName +
" (e.g.: 1.83)? "
);
31
cin >> passenger.BodyHeight;
32
33
if
(hasAdmission(passenger.BodyHeight, passenger.Age))
3
1
if (hasAdmission ( passenger . BodyHeight , passenger . Age ))
34
{
35
myApp.reportPrice(passenger, calcPrice(passenger.Age));
36
}
37
else
else
38
{
39
myApp.reportRefusal(passenger);
40
}
41
}
while
(myApp.shallProceed());
3
1
do-while (myApp . shallProceed ( ))
42
43
myApp.sayGoodBye();
44
return
0;
1
return 0
45
}
function end
Overview
❮❮
❮
All Files
PassengerScan.cpp
PriceCalculation.cpp
Rollercoaster.cpp
TicketApp.cpp
Select File
❯
❯❯