Showing posts with label Study Material. Show all posts
Showing posts with label Study Material. Show all posts

Saturday, 8 October 2016

C++ program to implement Stack Using Vector in STL


/*
Problem Statement: C++ program to implement Stack Using Vector in STL
Author: Pavan R Jaiswal

Options: 
  1: Push Element to Stack
  2: Pop element from stack
  3. Display stack

Note:  We can't traverse (iterate) through stack. Stacks are a type of container adaptor, specifically designed to operate in a LIFO 
 context (last-in first-out), where elements are inserted and extracted only from one end of the container. Elements 
 are pushed/popped from the "back" of the specific container, which is known as the top of the stack. It is not 
 intended for stack to show this behavior, for this we have other containers like vector. In case of vector use push_back()
 and pop_back() functions.

 reverser_iterator class is called in below code to traverse the vector in reverse orde. 
*/

#include "iostream"
#include "vector"
#include "stdlib.h" // used for exit(0)

using namespace std;

class StackUsingVectorSTL{
 public:
  vector<int> pushToStack(vector<int>);
  vector<int> popFromStack(vector<int>);
  void displayStack(vector<int>);
};

Thursday, 6 October 2016

C++ program to implement Sorting Container in STL


/*
Problem Statement: C++ program to implement Sorting Container in STL
Author: Pavan R Jaiswal

Options: 
  1: Add Element to List
  2: Display Sorted List
*/

#include "iostream"
#include "list"
#include "stdlib.h" // used for exit(0)

using namespace std;

class SortingContainerSTL{
 public:
  list<int> addElementToList(list<int>);
  void displaySortedList(list<int>);
};

Wednesday, 5 October 2016

C++ program to implement Map using STL


/*
Problem Statement: C++ program to implement Map using STL
Author: Pavan R Jaiswal

Options: 
  1: Add Element
  2: Delete Element
  3: Display Map
*/

#include "iostream"
#include "map"


using namespace std;

class MapSTL{
 public:
  map<int, string> addElement(map<int,string>);
  map<int, string> deleteElement(map<int,string>); 
  void displayMap(map<int, string>);
};

C++ program to implement List using STL


/*
Problem Statement: C++ program to implement List using STL
Author: Pavan R Jaiswal

Options: 
  1: Add Element At Front
  2: Add Element At Back
  3: Delete Element From Front
  4: Delete Element From Back
  5: Display List
*/

#include "iostream"
#include "list"

using namespace std;

class ListSTL{
 public:
  list<int> addElementAtFront(list<int>);
  list<int> addElementAtBack(list<int>);
  list<int> deleteElementFromFront(list<int>);
  list<int> deleteElementFromBack(list<int>);
  void displayList(list<int>);
};

Tuesday, 4 October 2016

Function template to perform selection sort on integer and float array in C++

/*
Problem Statement: Function template to perform selection sort on integer and float array in C++ 
Author: Pavan R Jaiswal
*/
#include "iostream"
using namespace std;

class SelectionSort{
 public:
 template <typename type> //keyword "typename" can be replaced by keyword "class" 
  type selectionSort(type tarr[5]){
//   cout<<tarr[4];
   int min;
   float temp;
   for(int i=0;i<5;i++){
    min=i;
    for(int j=i+1;j<5;j++){
     if(tarr[min] > tarr[j]){
      min=j;
     }
    }
    temp = tarr[min];
    tarr[min] = tarr[i];
    tarr[i] = temp;
   }
   cout<<"\nSorted array: "<<endl;
   for(int cnt=0; cnt<5; cnt++) 
    cout<<tarr[cnt]<<endl;
  }
};

Function Template in C++


/*
Title: Function template in C++
Author: Pavan R Jaiswal
 
In C++, function templates are functions that serve as a pattern for creating other similar functions. \
The basic idea behind function templates is to create a function without having to specify the exact type(s) 
of some or all of the variables. Instead, we define the function using placeholder types, called template type
parameters.

Problem Statement: Use function template to check greater number from given two numbers
*/
#include "iostream"
using namespace std;

class FunctionTemplate{
 public:
 template <typename type> //keyword "typename" can be replaced by keyword "class" 
  type greaterNumber(type tNum1, type tNum2){
   return (tNum1>tNum2)?tNum1:tNum2;
  }
};

Friday, 25 March 2016

WT Unit 4, 5 6 presentation



Unit 4 IOT Approaches for Empowerment - Click here to download

Unit 5 Identity Management Models in IoT - Click here to download

Unit 6 Trust Management in IoT - Click here to download

Unit 4 Question Bank


1. Explain M2M Service Layer Standardization.
2. Explain the difference between Data Interoperability and Semantic Interoperability.
3. Explain the Importance of Standardization with respect to Internet of Things.
4. Write Short Note on :
a. Organizational Interoperability
b. Eternal Interoperability
5. Write a short note on OGC Sensor Web for IoT.
6. What are the Gaps between IoT standardization, IoT Research, IoT Development and IoT Innovation?
7. What are Current IoT Requirements?
8. Explain in detail the deployment scenario for OGC sensor web enablement.
9. Write short note on:
a. IEEE
b. IETF
c. ITU-T
10. Discuss the Dimensions of Interoperability briefly.
11. Explain the Research Roadmap for IoT Testing Methodologies.
12. Write Short Note on:
a. The Eternal Interoperability
b. The Organizational Interoperability
c. The Semantic Interoperability
d. The Data Interoperability
13. Explain CoAP.

Unit 5 Question Bank


1. Explain identity management. Discuss Identity portrayal in detail.
2. Discuss the difference between Local identity and Network identity
3. What are the security requirements in internet of things?
4. Explain
a. User-centric identity management,
b. Device-centric identity management
c. Hybrid identity management.
5. Write Short note on
a. Federated identity
b. Global web identity
c. Network identity
6. Explain the need of identity management in Internet of Things.

Unit 6 Question Bank


1. Explain the trust management life cycle.
2. Explain the Fuzzy approach for Trust in Internet of Things.
3. Explain the Authentication and Access control policies wrt to IoT.
4. Explain the Web of trust model.
5. Discuss the factors used for calculation of trust in IoT.
6. Write Short Note on Identity Trust Paradigms wrt:
a. Third Party Approach
b. Public key infrastructure
c. Attribute certificates.
7. Explain the difference between Attribute certificate and public key certificate
8. Discuss any two security mechanisms.
9. Write short note on:
a. Web service security
b. SAML Approach