Bloomberg Case in the News, Microsoft Pays $26 Billion for LinkedIn in Biggest Deal Yet
Using the information in the article alone, how do you believe Microsoft is currently organized?
Solution
Microsoft acquired LinkedIn in a deal that was biggest in the technology industry. It has helped
the company enter into the social media that can serve multiple purpose to the company. It will
not only help the Microsoft to promote their in-house products & service to the qualified user
base, but also it will identify the candidates suitable for different projects. Besides, it will also
serve the function of customer relationship management. In this way, the Microsoft is organized
into the different business vertical such as cloud computing, windows & office solutions and
computing among the others. Here, each business vertical serves the objectives of other verticals
also. It means that one vertical is utilizing internal resources to come out with their own products
and services. It is also with social media vertical with the acquisition of LinkedIn.
Moreover, there is an autonomy in decision making and process implementation as it is the case
with the LinkedIn is having its own team, process originality and cultural autonomy despite the
acquisition. These verticals are under the umbrella structure of the company Microsoft..
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Change the driver file (the main .cpp) so that it asks the user to e.pdf
1. Change the driver file (the main .cpp) so that it asks the user to enter the values, then prints them,
reverses them, and prints them again. DO NOT USE THE revprint2 function that is in the code!
LinkListImp.cpp
//----- List.cpp -----
#include
using namespace std;
#include "linkedlist.h"
//-- Definition of the class constructor
List::List()
: first(0), mySize(0)
{ }
//-- Definition of the copy constructor
List::List(const List & origList)
{
mySize = origList.mySize;
first = 0;
if (mySize == 0) return;
List::NodePointer origPtr, lastPtr;
first = new Node(origList.first->data); // copy first node
lastPtr = first;
origPtr = origList.first->next;
while (origPtr != 0)
{
lastPtr->next = new Node(origPtr->data);
origPtr = origPtr->next;
lastPtr = lastPtr->next;
}
}
//-- Definition of the destructor
inline List::~List()
{
List::NodePointer prev = first,
ptr;
while (prev != 0)
{
2. ptr = prev->next;
delete prev;
prev = ptr;
}
}
// Definition of empty()
bool List::empty()
{
return mySize == 0;
}
//-- Definition of the assignment operator
const List & List::operator=(const List & rightSide)
{
mySize = rightSide.mySize;
first = 0;
if (mySize == 0) return *this;
if (this != &rightSide)
{
this->~List();
List::NodePointer origPtr, lastPtr;
first = new Node(rightSide.first->data); // copy first node
lastPtr = first;
origPtr = rightSide.first->next;
while (origPtr != 0)
{
lastPtr->next = new Node(origPtr->data);
origPtr = origPtr->next;
lastPtr = lastPtr->next;
}
}
return *this;
}
//-- Definition of insert()
void List::insert(ElementType dataVal, int index)
{
if (index < 0 || index > mySize)
3. {
cerr << "Illegal location to insert -- " << index << endl;
return;
}
mySize++;
List::NodePointer newPtr = new Node(dataVal),
predPtr = first;
if (index == 0)
{
newPtr->next = first;
first = newPtr;
}
else
{
for (int i = 1; i < index; i++)
predPtr = predPtr->next;
newPtr->next = predPtr->next;
predPtr->next = newPtr;
}
}
//-- Definition of erase()
void List::erase(int index)
{
if (index < 0 || index >= mySize)
{
cerr << "Illegal location to delete -- " << index << endl;
return;
}
mySize--;
List::NodePointer ptr,
predPtr = first;
if (index == 0)
{
ptr = first;
first = ptr->next;
delete ptr;
4. }
else
{
for (int i = 1; i < index; i++)
predPtr = predPtr->next;
ptr = predPtr->next;
predPtr->next = ptr->next;
delete ptr;
}
}
//-- Definition of search()
int List::search(ElementType dataVal)
{
int loc;
List::NodePointer tempP = first;
for (loc = 0; loc < mySize; loc++)
if (tempP->data == dataVal)
return loc;
else
tempP = tempP->next;
return -1;
}
//-- Definition of display()
void List::display(ostream & out) const
{
NodePointer ptr = first;
while (ptr != 0)
{
out << ptr->data << " ";
ptr = ptr->next;
}
}
void List::revPrint(ostream & out)
{
reverse();
5. display(out);
reverse();
}
void List::revPrint2(ostream &out, NodePointer ptr)
{
out << "Inside revPrint2 ";
static List::NodePointer point = first;
out << point->data << endl;
if (point != NULL)
{
out << "Inside if statement ";
revPrint2(out, point->next);
out << point->data;
}
}
//-- Definition of the output operator
ostream & operator<<(ostream & out, const List & aList)
{
aList.display(out);
return out;
}
//-- Definition of nodeCount()
int List::nodeCount()
{ // or simply, { return mySize; }
int count = 0;
List::NodePointer ptr = first;
while (ptr != 0)
{
count++;
ptr = ptr->next;
}
return count;
}
//-- Definition of reverse()
void List::reverse()
{
6. }
//-- Definition of ascendingOrder()
bool List::ascendingOrder()
{
if (mySize <= 1)
//empty or one element list
return true;
//else
NodePointer prevP = first,
tempP = first->next;
while (tempP != 0 && prevP->data <= tempP->data)
{
prevP = tempP;
tempP = tempP->next;
}
if (tempP != 0)
return false;
// else
return true;
}
linkedlist.cpp
#include
using namespace std;
#include "linkedlist.h"
int main()
{
List mylist;
for (int i = 0; i < 6; i++)
mylist.insert(i * 2, i);
mylist.display(cout);
cout << endl;
mylist.revPrint(cout);
cout << endl;
cout << mylist;
7. }
linkedlist.h
//----- List.h -----
#ifndef LINKEDLIST
#define LINKEDLIST
#include
using namespace std;
typedef int ElementType;
class List
{
private:
class Node
{
public:
ElementType data;
Node * next;
Node()
: next(0)
{ }
Node(ElementType dataValue)
: data(dataValue), next(0)
{ }
}; //--- end of Node class
typedef Node * NodePointer;
public:
//------ List OPERATIONS
List();
List(const List & origList);
~List();
const List & operator=(const List & rightSide);
bool List::empty();
void insert(ElementType dataVal, int index);
void erase(int index);
int search(ElementType dataVal);
8. void display(ostream & out) const;
void revPrint(ostream & out);
void revPrint2(ostream &out, NodePointer ptr = NULL);
int nodeCount();
void reverse();
bool ascendingOrder();
private:
//------ DATA MEMBERS
NodePointer first ;
int mySize;
}; //--- end of List class
ostream & operator<<(ostream & out, const List & aList);
//istream & operator>>(istream & in, List & aList);
#endif
Solution
////----- List.cpp -----
//added reverse functionality
#include
using namespace std;
#include "linkedlist.h"
//-- Definition of the class constructor
List::List()
: first(0), mySize(0)
{ }
//-- Definition of the copy constructor
List::List(const List & origList)
{
mySize = origList.mySize;
first = 0;
if (mySize == 0) return;
List::NodePointer origPtr, lastPtr;
first = new Node(origList.first->data); // copy first node
lastPtr = first;
origPtr = origList.first->next;
9. while (origPtr != 0)
{
lastPtr->next = new Node(origPtr->data);
origPtr = origPtr->next;
lastPtr = lastPtr->next;
}
}
//-- Definition of the destructor
inline List::~List()
{
List::NodePointer prev = first,
ptr;
while (prev != 0)
{
ptr = prev->next;
delete prev;
prev = ptr;
}
}
// Definition of empty()
bool List::empty()
{
return mySize == 0;
}
//-- Definition of the assignment operator
const List & List::operator=(const List & rightSide)
{
mySize = rightSide.mySize;
first = 0;
if (mySize == 0) return *this;
if (this != &rightSide)
{
this->~List();
List::NodePointer origPtr, lastPtr;
first = new Node(rightSide.first->data); // copy first node
lastPtr = first;
10. origPtr = rightSide.first->next;
while (origPtr != 0)
{
lastPtr->next = new Node(origPtr->data);
origPtr = origPtr->next;
lastPtr = lastPtr->next;
}
}
return *this;
}
//-- Definition of insert()
void List::insert(ElementType dataVal, int index)
{
if (index < 0 || index > mySize)
{
cerr << "Illegal location to insert -- " << index << endl;
return;
}
mySize++;
List::NodePointer newPtr = new Node(dataVal),
predPtr = first;
if (index == 0)
{
newPtr->next = first;
first = newPtr;
}
else
{
for (int i = 1; i < index; i++)
predPtr = predPtr->next;
newPtr->next = predPtr->next;
predPtr->next = newPtr;
}
}
//-- Definition of erase()
void List::erase(int index)
11. {
if (index < 0 || index >= mySize)
{
cerr << "Illegal location to delete -- " << index << endl;
return;
}
mySize--;
List::NodePointer ptr,
predPtr = first;
if (index == 0)
{
ptr = first;
first = ptr->next;
delete ptr;
}
else
{
for (int i = 1; i < index; i++)
predPtr = predPtr->next;
ptr = predPtr->next;
predPtr->next = ptr->next;
delete ptr;
}
}
//-- Definition of search()
int List::search(ElementType dataVal)
{
int loc;
List::NodePointer tempP = first;
for (loc = 0; loc < mySize; loc++)
if (tempP->data == dataVal)
return loc;
else
tempP = tempP->next;
return -1;
}
12. //-- Definition of display()
void List::display(ostream & out) const
{
NodePointer ptr = first;
while (ptr != 0)
{
out << ptr->data << " ";
ptr = ptr->next;
}
}
void List::revPrint(ostream & out)
{
reverse();
display(out);
reverse();
}
void List::revPrint2(ostream &out, NodePointer ptr)
{
out << "Inside revPrint2 ";
static List::NodePointer point = first;
out << point->data << endl;
if (point != NULL)
{
out << "Inside if statement ";
revPrint2(out, point->next);
out << point->data;
}
}
//-- Definition of the output operator
ostream & operator<<(ostream & out, const List & aList)
{
aList.display(out);
return out;
}
//-- Definition of nodeCount()
int List::nodeCount()
13. { // or simply, { return mySize; }
int count = 0;
List::NodePointer ptr = first;
while (ptr != 0)
{
count++;
ptr = ptr->next;
}
return count;
}
//-- Definition of reverse()
//added by chegg EA
void List::reverse()
{
static List::NodePointer current,next,prev;
prev = NULL;
current = first;
while (current != NULL)
{
next = current->next;
current->next = prev;
prev = current;
current = next;
}
first= prev;
}
//-- Definition of ascendingOrder()
bool List::ascendingOrder()
{
if (mySize <= 1)
//empty or one element list
return true;
//else
NodePointer prevP = first,
tempP = first->next;
14. while (tempP != 0 && prevP->data <= tempP->data)
{
prevP = tempP;
tempP = tempP->next;
}
if (tempP != 0)
return false;
// else
return true;
}
------------------------------------------------------------------------
// List.h
this file unchanged
---------------------------------------------------------------
//main.cpp
#include
using namespace std;
#include "linkedlist.h"
int main()
{
List mylist;
int num;
for (int i = 0; i < 6; i++)
{
//mylist.insert(i * 2, i);
//added by chegg EA,ask for user input
cin >> num;
mylist.insert(num, i);
}
cout << "mylist: ";
mylist.display(cout);
cout << endl;
//mylist.revPrint(cout);
//added by chegg EA,reverse the list
mylist.reverse();
//added by chegg EA, print the reversed list