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;
  }
};

Thursday, 18 August 2016

Doubly LinkedList Operations in C++

/*
Title: C++ program to demonstrate doubly linked list.
Author: Pavan Jaiswal
Operations: 
 1. Add nodes to linkedlist at the begining and at the end.
 2. Display the linkedlist.
 All rest operations can be made as per your choice.
 
*/

#include "iostream"
#include "stdlib.h"
using namespace std;

/* structure to hold list */
struct list{
 string name;
 int rollno;
 struct list *next, *prev;
}*first=NULL, *last=NULL, *node=NULL, *start=NULL;

/* class to perform operations */
class LinkedList{
 public:
 /* member function declaration */
  void insertAtBegining(); 
  void insertAtEnd();
  void displayList();
};

Singly LinkedList Operations in C++

/*
Title: Singly linkedlist demonstration in C++
Author: Pavan Jaiswal
Operations: 1. Add node to list
  2. Display list
  Rest operations can added as per your choice. 
*/

#include "iostream"
#include "stdlib.h"

using namespace std;

struct list{
 string name;
 struct list *next;
}*head=NULL, *tail=NULL, *node=NULL;

class SinlgyLinkedList{
 public:
  void addNodeToList();
  void displayList();
};

Wednesday, 27 July 2016

Two days handson workshop on "Basics of Linux" on 6th & 7th Aug, 2016 @ PICT, Pune

Dear Students,

At PICT, Computer Engg Dept, we are organizing two days workshop on “Basics of Linux” on 06th & 07th Aug 2016.

Motivation behind this workshop is to explore Linux operating system. Syllabus of this workshop ensures hands on training which includes hands on Linux utilities, POSIX API programming, inter-process communication constructs, exposure to shell scripting, Linux server administration / configuration, basic building blocks of python, etc.

Interested students can register their name to the mentioned below faculties on or before 02-08-2016.

1) Prof. Virendra Bagade

Mob No. 9763722393

2) Prof. Pavan Jaiswal

Mob No. 9545200881


Online registration link:

https://goo.gl/tycYqz

Thanks.

Monday, 18 July 2016

C++ program to perform addition on complex numbers using operator overloading and friend function

/*
Title:    C++ program to perform addition on complex numbers using operator overloading and friend function
Author: Pavan Jaiswal
FileName: 1ComplexNos.cpp

Description:
    --> Below C++ source code demonstrates addition on complex nos
    --> Here we have used two features of C++ language. That is "Operator Overloading" & "Friend Function"
    --> Operators overloaded are "+", "<<" and ">>"

*/

#include "iostream"
using namespace std;

class ComplexNos{
    private:
        int real, img; // private data members to accept real and imaginary parts of complex nos

    public:
        friend istream & operator >>(istream &, ComplexNos &); // Declaration of friend function >>
        friend ostream & operator <<(ostream &, ComplexNos &); // Declaration of friend function <<

        ComplexNos operator +(ComplexNos); // Declaration of function +
   
};

C++ program to implement calculator functionality

/*

Title: C++ program to implement calculator functionality
Author: Pavan Jaiswal
FileName: 5Calculator.cpp

Description:
    --> Below C++ source code demonstrates calculator to perform basic arithmetic operations
    --> Idea is user will provide expression as in input. Say for eg. 1 + 3.
    --> So depending on operator inputted, respective switch case will be called.
    --> Four different member functions are defined outside the class definition. 

*/

#include "iostream"
using namespace std;

class Calculator{
   
    public:
        /* public member functions of class. Each one of them taking two operands as an input */
        float addition(float num1, float num2);
        float subtraction(float num1, float num2);
        float multiplication(float num1, float num2);
        float division(float num1, float num2);

};

Tuesday, 12 July 2016

C++ program to demonstrate friend funtion

/*
Title:     C++ Program to demonstrate friend funtion
Author: Pavan Jaiswal
FileName: 3Friendfunction.cpp

Description:
    --> There would be a requirement sometime where you are suppose to access private data member outside the class scope.
    --> Friend function is a one of the solutions. It allows to access private data members of a class.
    --> In the below source code we have one class which have one private data member, one member function and one friend function.
    --> Idea is to set value to class data member through a member function and to print value of it through a friend function.
*/


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