Main

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

BTP-Workshops/main.cpp at main · Seneca-244200/BTP-Workshops https://github.com/Seneca-244200/BTP-Workshops/blob/main/WS02/l...

Seneca-244200 / BTP-Workshops Public

Code Issues Pull requests Actions Projects Security Insights

main

BTP-Workshops / WS02 / lab / main.cpp

fardad Workshop 2 History

1 contributor

89 lines (68 sloc) 2.64 KB

1 /***********************************************************************
2 // OOP244 Workshop 2 p1: tester program
3 //
4 // File main.cpp
5 // Version 1.0
6 // Date Fall 2022
7 // Author Yosef Ashibani
8 // Description
9 //
10 // Revision History
11 // -----------------------------------------------------------
12 // Name Date Reason
13 //
14 /////////////////////////////////////////////////////////////////
15 ***********************************************************************/
16
17 // Please don't change this file
18 // This file is to test your full program
19
20 #include<iostream>
21 #include "Package.h"
22
23 using namespace std;
24 using namespace sdds;
25 const bool APP_OS_WINDOWS = true;
26
27 int main() {
28

1 of 3 2023-01-22, 11:02 a.m.


BTP-Workshops/main.cpp at main · Seneca-244200/BTP-Workshops https://github.com/Seneca-244200/BTP-Workshops/blob/main/WS02/l...

29 loadTraces();
30 cout << "Records were retrieved successfully" << endl;
31
32 grouptTraces();
33 cout << "Data records were grouped by the user id successfully" << endl;
34
35 cout<< "User id, timeinhours, Fctime, Fwifitime, Package Name" << endl
36 << "....................................................." << endl;
37
38 display();
39 cout << "\nData was successfully printed" << endl;
40
41 deallocateMemory();
42 cout << "Dynamically allocated memory was successfully deallocated"<<endl;
43 return 0;
44 }
45
46
47
48 /* Sample data file
49 *
50 User id, timeinhours, Fctime, Fwifitime, Package Name
51 ------- ----------- ------ --------- -------------------
52 2 0.030551111 1989 107995 com.android.chrome
53 8 6.151203056 16928911 5215420 com.android.chrome
54 8 6.151203056 16928911 5215420 com.android.chrome
55 1 1.065473889 3777966 57740 com.android.mms
56 8 0.040814444 146932 0 com.android.mms
57 3 0.270954722 0 975437 com.android.phone
58 1 0.010256389 13826 23097 com.android.settings
59 2 0.001665556 0 5996 com.android.settings
60 3 0.008332778 0 29998 com.baidu.baidulife
61
62
63 */
64
65
66 /* Sample execution
67
68 Records were retrieved successfully
69 Data records were grouped by the user id successfully
70 User id, timeinhours, Fctime, Fwifitime, Package Name
71 .....................................................
72 0, 1.49325, 369926, 5005762, com.tencent.mm
73 0, 1.35947, 172756, 4721320, com.tencent.mm
74 0, 1.66986, 1221, 6010276, com.UCMobile
75 5, 1.60287, 5722288, 48042, com.sina.weibo
76 5, 1.92426, 260011, 6667309, com.tencent.mm

2 of 3 2023-01-22, 11:02 a.m.


BTP-Workshops/main.cpp at main · Seneca-244200/BTP-Workshops https://github.com/Seneca-244200/BTP-Workshops/blob/main/WS02/l...

77 5, 1.47877, 2089902, 3233672, com.UCMobile


78 9, 1.02618, 288007, 3406229, com.digiplex.game
79 9, 1.23554, 59991, 4387945, com.tencent.mm
80 9, 12.9425, 2190642, 44402341, com.tencent.mm
81 9, 1.21251, 2544077, 1820967, com.tencent.qqmusic
82 .....................................................
83
84 Data was successfully printed
85 Dynamically allocated memory was successfully deallocated
86
87 */
88
89

Give feedback

3 of 3 2023-01-22, 11:02 a.m.

You might also like