Main
Main
Main
main
1 contributor
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
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
Give feedback