-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.h
More file actions
133 lines (122 loc) · 3.95 KB
/
Program.h
File metadata and controls
133 lines (122 loc) · 3.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#ifndef MAINPROGRAM_H
#define MAINPROGRAM_H
#include<iostream>
#include <string>
#include <fstream>
#include "date.h"
#include "time.h"
#include "Vector.h"
#include "bst.h"
#include <map>
using namespace std;
typedef struct // global variable
{
date d; // date class over composition
time t; // time class over composition
float speed; // float variable named speed
float SolarRadiation; //float variable SolarRadiation
}WindLogType; // name of the struct
class Program
{
public:
/**
* @class Program
* @brief Contains all the methods for the program to run and input the data
*
* Default constructor and non-default constructor are to be used in this date header.
*
* run method will be invoked and run in the main.
* menu void method is to be show the menu option and take a input from the user.
* maxWindSpeed method is to calculate the max wind speed from the data
* AvgWindSpeed method is to calculate the average wind speed from the data
* TotalSolarRadiation method is to calculate te total solar radiation
* SwitchMonthStatement method to swap the month name with the number input
*
*
* @author Aung Aye Than
* @version 01
* @date 20/02/2016
*
* @author Aung Aye Than
* @version 02
* @date 28/02/2016 Error checking and adding doxygen comments.
*
*
*
*
* @bug There aren't any bugs in the data headers. Everything tested out correctly.
*
*/
Program();
/**
* @brief run () method
*
* The method which will get invoked and run inside the main
* It contains menu every option method inside to run the program
*
* @return void
*/
void run();
/**
* @brief menu () method
*
* The method which contain menu option for the program
* It contains every option method inside for the user to choose
*
* @return Vector<WindLogType>windlog - parameter for vector template named windlog
*/
void menu(map<int, Vector<WindLogType> >myMap);
/**
* @brief menu () method
*
* The method which contain menu option for the program
* It contains every option method inside for the user to choose
*
* @return void
* @param Vector<WindLogType>windlog - parameter for vector template named windlog
*/
void maxWindSpeed (map<int, Vector<WindLogType> >myMap);
/**
* @brief maxWindSpeed () method
*
* The method which will find max wind speed depending on the user input year and month
*
* @return void
* @param Vector<WindLogType>windlog - parameter for vector template named windlog
*/
void AvgWindSpeed (map<int, Vector<WindLogType> >myMap);
/**
* @brief TotalSolarRadiation () method
*
* The method which will find average wind speed depending on the user input year.
*
* @return void
* @param Vector<WindLogType>windlog - parameter for vector template named windlog
*/
void TotalSolarRadiation (map<int, Vector<WindLogType> >myMap);
/**
* @brief printAvgWindSpeed_TotalSR_toCSV () method
*
* The method which will print out the average windspeed and total solar radiation to the csv output file
*
* @return void
* @param Vector<WindLogType>windlog - parameter for vector template named windlog
*/
void printAvgWindSpeed_TotalSR_toCSV(map<int, Vector<WindLogType> >myMap);
/**
* @brief SwitchMonthStatement () method
*
* The method which will print out the month name by swapping with the number input file
*
* @return string
* @param inputyear - int parameter to get the month from the user
*/
string SwitchMonthStatement(int inputyear);
void MaxSolarRadiation(map<int, Vector<WindLogType> >myMap);
void TestProgramForAllMethod (map<int, Vector<WindLogType> >myMap);
private:
Vector<WindLogType>windlog; //vector
map<int, Vector<WindLogType> >myMap;
map <int, Vector<WindLogType> >::iterator record;
};
#endif