Mainframes run the world
Despite the excitement that has surrounded the Web and new programming models like Java and J2EE (as well as Microsoft’s .NET), older, less ‘trendy’ technologies account for the vast bulk of computer processing today.
IBM and the mainframe
IBM is the leading mainframe vendor, with over 70% market share. Therefore, while this report covers the global mainframe market – it is largely dominated by IBM.
IBM is committed to its mainframe technology
the recent release of the z/os demonstrated the fact that IBM is committed to supporting its existing clients and sees a long-term future in the platform. IBM has invested well over $1 billion in developing the z/os .
The future of the mainframe
This reports says that over the next five years the number of individual mainframe machines will fall, but the total number of deployed MIPS will continue to rise.
Monday, December 10, 2018
Saturday, November 17, 2018
Decorator Design Pattern C++
In object-oriented programming, the decorator pattern is a design pattern that allows behavior to be added to an individual object, dynamically, without affecting the behavior of other objects from the same class.
#include<iostream>
using namespace std;
class pizza{
public:
virtual string getdescription() =0;
virtual int price() = 0;
};
class plainpizaa:public pizza{
public:
virtual string getdescription()
{
return "plain pizza";
}
virtual int price()
{
return 5;
}
};
class pizzaDecorator:public pizza{
protected:
pizza *m_pPizza;
public:
pizzaDecorator(pizza *_piza):m_pPizza(_piza){}
virtual string getdescription()
{
return m_pPizza->getdescription();;
}
virtual int price()
{
return m_pPizza->price();
}
};
class tomato:public pizzaDecorator
{
public:
tomato(pizza *_pizza)
:pizzaDecorator(_pizza){}
string getdescription()
{
string temp = m_pPizza->getdescription();
temp +="Tomato";
return temp;
}
int price()
{
return m_pPizza->price() + 2;
}
};
class cheese:public pizzaDecorator
{
public:
cheese(pizza *_pizza)
:pizzaDecorator(_pizza){}
string getdescription()
{
string temp = m_pPizza->getdescription();
temp +="cheese";
return temp;
}
int price()
{
return m_pPizza->price() + 1;
}
};
int main()
{
pizza *p = new tomato(new cheese(new plainpizaa()));
cout<<p->price();
return 0;
}
Command design pattern in C++
Definition By Wiki:
Command pattern. In object-oriented programming, the command pattern is a behavioral design pattern in which an object is used to encapsulate all information needed to perform an action or trigger an event at a later time.
There are 2 examples in the below given code one with the device and other with stock buy,sell order
// cmd pattern decouples the commands and the underlying object
// you just need to pass the underlying concrete object on which you want to call the command
// to the command concrete object
//
#include<iostream>
using namespace std;
//#define TV_EXAMPLE
#define STOCK_ORDER
#ifdef TV_EXAMPLE
class cmd{
public:
virtual void execute()=0;
};
class device{
public:
virtual void on() = 0;
virtual void off() = 0;
//virtual void volincrease() = 0;
//virtual void voldcrease() = 0;
};
class tv:public device{
public:
void on()
{
cout<<"TV on";
}
void off()
{
cout<<"TV off";
}
};
class on:public cmd{
public:
on(device *_d):d(_d){}
device *d;
void execute()
{
d->on();
}
};
class off:public cmd{
public:
off(device *_d):d(_d){}
device *d;
void execute()
{
d->off();
}
};
Sunday, November 11, 2018
Popular Posts
-
Hi Guys I was asked this question in some interview and find it interesting .Please check the below given program and do suggest me i...
-
Please read the below given code. If you don't want to calculate the string lenth before the string reversal then you ...
-
GDG is a group of datasets that are related to each other chronologically or functionally.Each of the dataset is called a generation number....
-
CONDITION name is identified with special level ‘88’. A condition name specifies the value that a field can contain and used as abbreviat...
-
There are four divisions in a COBOL program and the data division is an optional one. 1.Identification Division. 2.Environment Division. ...
-
DISPLAY Default. Number of bytes required equals to the size of the data item.If we don't mention anything then default Usage is Disp...
-
SYNC clause is specified with COMP, COMP-1 and COMP-2 items. These items are expected to start at half/full/double word boundaries for fa...
-
In object-oriented programming, the decorator pattern is a design pattern that allows behavior to be added to an individual object, dy...
-
JCL (Job Control Language) is used to DEFINE and CONTROL the JOB to the operating system. Definition involves definition of the programs...