Part 2: What is the difference between historical analytics or predictive analytics in detail and provide some example?
In: Computer Science
Design and implement a program that reads a series of 10 integers from the user and prints their average. Read each input value as a string, then attempt to convert it to an integer using the Integer.parseInt method. If this process throws a NumberFormatException (meaning that the input is not a valid integer), display an appropriate error message and prompt for the number again. Continue reading values until 10 valid integers have been entered.
In: Computer Science
What is the CSI Effect? This phenomenon has impacted the criminal justice system as a whole. The largest impacts are in law enforcement and the courts. Describe the negative and positive effects this phenomenon has had on the criminal justice system.
This is a criminal justice subject
In: Psychology
Crank Ltd Crank has been in business since the 1920’s and have three locations in the UK. Their Head Office and main manufacturing site is in Leicester. This site makes complex tubular assemblies for defence organisations, oil and gas and transportation. There is a site at Southampton making tubular shafts for golf clubs, and a site in Glasgow manufacturing aerospace Duct assemblies up to 8″ diameter. The procurement organisation is currently decentralised. At Leicester, there is a Purchasing Manager, whereas at Southampton and Glasgow, each site has a Chief Buyer in charge of small procurement teams. There is a new Chief Executive of Crank who fervently believes that he needs a new approach for the Group in the way procurement is structured. Over the past month, he has, quietly, been obtaining some salient facts.
The more important ones are
• Each site operates as a ‘Profit Centre’ and the Site Director has to deliver a targeted Return on Capital Employed;
• There are no Group purchase contracts;
• Five major purchases account for 61% of total Group expenditure – they are all raw material including different specifications of tubing;
• There are more than 40 suppliers for the five major purchases; • No formal tendering has taken place, on any site, for more than two years;
• Capital equipment is purchased by the Group Chief Engineer;
• The company has embraced modern logistics practices including JIT and OTIF (On Time In Full);
• There is no savings plan for purchasing;
• The purchasing teams do not liaise.
The Chief Executive intends to consider an alternative purchasing structure that can deliver benefits for the Group and each operational site. On the basis of your knowledge and the salient facts above what advice could you give him?
Tasks
(c) What alternative structures could be considered?
(d) What are the potential obstacles to change?
(e) What business benefits could accrue from a changed purchasing structure?
In: Operations Management
A tank with a capacity of 90L originally contains 50L of brine with the concentration of 1g of salt per liter of water. Additional brine solution containing sat of concentration 2g/L flows into the tank at a rate of 3L/min. The well-stirred mixture flows out the tank at a rate of 2L/min. Let P(t) be the amount of salt in the tank at time t. Formulate initial value problems accurately describes P(t), for 0<t<40. Solve the solution
In: Advanced Math
At 1 atm, how much energy is required to heat 89.0 g H 2 O ( s ) at − 24.0 ∘ C to H 2 O ( g ) at 115.0 ∘ C? Use the heat transfer constants found in this table.
q = kJ
In: Chemistry
[C++] Find the Recurrence Relation equations for the following functions:
Please explain how you got these equations.
BSTClass::Node* BSTClass::createNode(const string x) {
Node* newNode = new Node;
newNode->data = x;
newNode->left = nullptr;
newNode->right = nullptr;
return newNode;
}
void BSTClass::insertNode(const string x) {
insertNodeUtil(x, root);
}
void BSTClass::insertNodeUtil(const string data, Node* subTreePtr) {
if (root == nullptr) {
root = createNode(data);
}
else if (data <= subTreePtr->data) {
if (subTreePtr->left == nullptr)
{
subTreePtr->left = createNode(data);
}
else {
insertNodeUtil(data, subTreePtr->left);
}
}
else {
if (subTreePtr->right ==
nullptr) {
subTreePtr->right = createNode(data);
}
else {
insertNodeUtil(data, subTreePtr->right);
}
}
}
void BSTClass::printInOrder() {
printInOrderUtil(root);
cout << endl;
}
void BSTClass::printInOrderUtil(Node* subTreePtr) {
if (root == nullptr) {
cout << "The TREE is Empty
..." << endl;
}
else {
if (subTreePtr->left != nullptr)
{
printInOrderUtil(subTreePtr->left);
}
cout << subTreePtr->data << " ";
if (subTreePtr->right !=
nullptr) {
printInOrderUtil(subTreePtr->right);
}
}
}
bool BSTClass::findKey(const string key) {
return findKeyUtil(key, root);
}
bool BSTClass::findKeyUtil(const string key, Node* subTreePtr) {
if (root == nullptr) {
cout << "Key (" << key
<< ") is NOT found, it is an empty tree ..." <<
endl;
return false;
}
if (subTreePtr == nullptr) {
cout << "Key (" << key
<< ") is NOT found" << endl;
return false;
}
else if (subTreePtr->data == key) {
cout << "Key (" << key
<< ") is FOUND" << endl;
return true;
}
else if (key < subTreePtr->data) {
return findKeyUtil(key,
subTreePtr->left);
}
else {
return findKeyUtil(key,
subTreePtr->right);
}
}
int BSTClass::treeHeight() {
if (root == nullptr)
return 0;
else
return treeHeightUtil(root);
}
int BSTClass::treeHeightUtil(Node* subTreePtr) {
if (subTreePtr == nullptr) {
return 0;
}
else {
int lHeight =
treeHeightUtil(subTreePtr->left);
int rHeight =
treeHeightUtil(subTreePtr->right);
return (lHeight >= rHeight ?
lHeight + 1 : rHeight + 1);
}
}
In: Computer Science
The Decadent Desserts cookbook has recipes for desserts. The number of calories per serving for the recipes in the cookbook is normally distributed with a mean of 378 and a standard deviation of 34.5. If 18 recipes are randomly selected to serve at a reception, what is the probability that the average calories per serving for the sample is over 385?
In: Math
Crank Ltd Crank has been in business since the 1920’s and have three locations in the UK. Their Head Office and main manufacturing site is in Leicester. This site makes complex tubular assemblies for defence organisations, oil and gas and transportation. There is a site at Southampton making tubular shafts for golf clubs, and a site in Glasgow manufacturing aerospace Duct assemblies up to 8″ diameter. The procurement organisation is currently decentralised. At Leicester, there is a Purchasing Manager, whereas at Southampton and Glasgow, each site has a Chief Buyer in charge of small procurement teams. There is a new Chief Executive of Crank who fervently believes that he needs a new approach for the Group in the way procurement is structured. Over the past month, he has, quietly, been obtaining some salient facts.
The more important ones are
• Each site operates as a ‘Profit Centre’ and the Site Director has to deliver a targeted Return on Capital Employed;
• There are no Group purchase contracts;
• Five major purchases account for 61% of total Group expenditure – they are all raw material including different specifications of tubing;
• There are more than 40 suppliers for the five major purchases; • No formal tendering has taken place, on any site, for more than two years;
• Capital equipment is purchased by the Group Chief Engineer;
• The company has embraced modern logistics practices including JIT and OTIF (On Time In Full);
• There is no savings plan for purchasing;
• The purchasing teams do not liaise.
The Chief Executive intends to consider an alternative purchasing structure that can deliver benefits for the Group and each operational site. On the basis of your knowledge and the salient facts above what advice could you give him?
Tasks
(c) What alternative structures could be considered?
(d) What are the potential obstacles to change?
(e) What business benefits could accrue from a changed purchasing structure?
In: Operations Management
Using JES/ Jython
Function Name: decoder()
Parameters:
message1-string containing first part of secret message
message2-string containing second part of secret message
Write a function that decodes them by retrieving every other character from both encrypted messages.
Test Cases:
>>>decoder("Rsupnk","oFpansot")
Run Fast
>>>decoder("Fkrneoem ktthpes","eAvleiselnos")
Free the Aliens
In: Computer Science
What is the price of a money market security with a discount yield of 5.38%, 145 days to maturity, and a $1000 face value? Round to $0.01.
In: Finance
One year ago, your company purchased a machine used in manufacturing for $95,000.You have learned that a new machine is available that offers many advantages and you can purchase it for $170,000 today. It will be depreciated on a straight-line basis over 10 years and has no salvage value. You expect that the new machine will produce a gross margin (revenues minus operating expenses other than depreciation) of $50,000 per year for the next 10 years. The current machine is expected to produce a gross margin of $22,000 per year. The current machine is being depreciated on a straight-line basis over a useful life of 11 years, and has no salvage value, so depreciation expense for the current machine is $8,636 per year. The market value today of the current machine is $60,000. Your company's tax rate is 38 %, and the opportunity cost of capital for this type of equipment is 12 %.Should your company replace its year-old machine?
The NPV of replacing the year-old machine is ? (round to nearest dollar)
In: Finance
Customers have “mental rules” that impact their attitude about a business. What can a company do to help ensure that a customer’s rule is not broken? Give two examples.
In: Operations Management
For this program you will add and test 2 new member functions to the class in
//************************ intSLList.h ************************** // singly-linked list class to store integers #ifndef INT_LINKED_LIST #define INT_LINKED_LIST class IntSLLNode { public: IntSLLNode() { next = 0; } IntSLLNode(int el, IntSLLNode *ptr = 0) { info = el; next = ptr; } int info; IntSLLNode *next; }; class IntSLList { public: IntSLList() { head = tail = 0; } ~IntSLList(); int isEmpty() { return head == 0; } void addToHead(int); void addToTail(int); int deleteFromHead(); // delete the head and return its info; int deleteFromTail(); // delete the tail and return its info; void deleteNode(int); bool isInList(int) const; void printAll() const; private: IntSLLNode *head, *tail; }; #endif
The two member functions are:
insertByPosn(int el, int pos)
Assuming that the positions of elements of a list begin numbering at 1 and continue to the end of the list, you will insert a new node with info value el at position pos. pos will become the position of the new node in the modified list. For example, if pos = 1, insert the new node at the head of the list. If pos = 2, for example, insert the new node BEFORE the node currently at position 2. If the list is empty prior to insertion, insert the new node in the list and adjust head and tail pointers. If pos is too large, don't do anything. If pos is 0 or negative, don't do anything.
removeByPosn(int pos)
Assume position of elements are defined as above. If pos is zero or negative, do nothing. If the list is empty prior to the request to delete a node, do nothing. If pos is too large, do nothing.
To aid in verifying results, you should use the following modified version of printAll. This requires: #include <string>
void IntSLList::printAll(string locn) const {
cout << "Contents of the list " << locn << endl;
for (IntSLLNode *tmp = head; tmp != 0; tmp = tmp->next)
cout << tmp->info << " ";
if (head != 0)
cout << "Head is: " << head->info << " Tail is: " << tail->info << endl << endl;
}
For extra credit, you can also create the following:
reverseList()
Traverse the existing list beginning at the head and create a new (reversed) list with head newhead and tail newtail. Put new nodes in the new list by putting the new nodes at the head of the new list each time. Do not call any other member functions during this process. If the list to be reversed is empty, make sure that you account for this case. After the new (reversed) list is created, delete the old list using its destructor.
The test program to be used is:
int main()
{
IntSLList singly_linked_list = IntSLList();
singly_linked_list.addToHead(9);
singly_linked_list.addToHead(7);
singly_linked_list.addToHead(6);
singly_linked_list.printAll("at creation:");
singly_linked_list.insertByPosn(8, 2);
singly_linked_list.printAll("after insertion of 8 at position 2:");
singly_linked_list.insertByPosn(10, 4);
singly_linked_list.printAll("after insertion of 10 at position 4:");
singly_linked_list.insertByPosn(12, 6);
singly_linked_list.printAll("after insertion of 12 at position 6:");
singly_linked_list.insertByPosn(14, 8);
singly_linked_list.printAll("after attempted insertion of 14 at position 8:");
singly_linked_list.insertByPosn(5, 1);
singly_linked_list.printAll("after insertion of 5 at position 1:");
singly_linked_list.insertByPosn(4, 0);
singly_linked_list.printAll("after attempted insertion of 4 at position 0:");
singly_linked_list.removeByPosn(2);
singly_linked_list.printAll("after deletion of 6 at position 2:");
singly_linked_list.removeByPosn(6);
singly_linked_list.printAll("after deletion of 12 at position 6:");
singly_linked_list.removeByPosn(10);
singly_linked_list.printAll("after attempted deletion at position 10:");
// insert test for optional list reversal here
return (0);
}
The correct output from running the test program is:
Contents of the list at creation:
6 7 9 Head is: 6 Tail is: 9
Contents of the list after insertion of 8 at position 2:
6 8 7 9 Head is: 6 Tail is: 9
Contents of the list after insertion of 10 at position 4:
6 8 7 10 9 Head is: 6 Tail is: 9
Contents of the list after insertion of 12 at position 6:
6 8 7 10 9 12 Head is: 6 Tail is: 12
Contents of the list after attempted insertion of 14 at position 8:
6 8 7 10 9 12 Head is: 6 Tail is: 12
Contents of the list after insertion of 5 at position 1:
5 6 8 7 10 9 12 Head is: 5 Tail is: 12
Contents of the list after attempted insertion of 4 at position 0:
5 6 8 7 10 9 12 Head is: 5 Tail is: 12
Contents of the list after deletion of 6 at position 2:
5 8 7 10 9 12 Head is: 5 Tail is: 12
Contents of the list after deletion of 12 at position 6:
5 8 7 10 9 Head is: 5 Tail is: 9
Contents of the list after attempted deletion at position 10:
5 8 7 10 9 Head is: 5 Tail is: 9
In: Computer Science
Computer A has an overall CPI of 1.5 and can be run at a clock rate of 2.5GHz. Computer B has a CPI of 4 and can be run at a clock rate of 4GHz. We have a particular program we wish to run. When compiled for computer A, this program has exactly 100,000 instructions. How many instructions would the program need to have when compiled for Computer B, in order for the two computers to have exactly the same execution time for this program?
In: Computer Science