Questions
Mary Barra started working at General Motors when she was a teenage intern in 1980. She...

Mary Barra started working at General Motors when she was a teenage intern in 1980. She started on the factory floor as an inspector. She held many jobs across GM, including executive assistant, head of internal communications, executive director of North American vehicle operations, VP of Global HRM, Senior VP for Global Product Development, and finally, in 2014 CEO.

When she took over as CEO at General Motors, Mary Barra surprised people when she began the process of transforming GM not by starting at the top and developing a new strategic plan per se. Rather, she focused on foundational issues designed to help transform GM’s culture. She focused on simple but important changes such as the company’s dress policy. As you learned in this chapter, organizational culture is made up of rituals, stories, and routines. It is something you can “feel” within an organization. Some scholars refer to it as a company’s “secret sauce.” Part of any new employee’s adjustment process includes learning their new organization’s culture. However, culture change is especially challenging. How people dress is an important signal to an organization’s culture.

After Barra changed the 10-page dress code to two simple words (which were “Dress Appropriately”), she had to problem-solve with leaders throughout the organization. As she asked herself, “if they cannot handle ‘dress appropriately,’ what other decision can't they handle? And I realized that often, if you have a lot of overly prescriptive policies and procedures, people will live down to them.” Thus, her focus on simplifying the dress code helped her see where the resistance to doing things in a new way might come from and how to overcome such concerns when it came to bigger decisions such as which parts of the business to retain or sell off.

Her philosophy is that everyone is better off if they stop making assumptions about what other people want or need. She also asked GM employees to try new things. For example, to encourage teams at GM to work together, she asked 250 engineers and designers to participate in a paper sailboat race. As John Calabrese, GM’s VP of Global Engineering puts it, “She wanted them to have fun at a highly stressful time, but also encourage teamwork and collaboration.” She made other changes in the culture as evidenced by the phrases heard at GM. The idea of “customer first” is not unique for a company such as Amazon but for GM, it was something new. She has also put data from customers at the center of product development as well as manufacturing decisions.

Barra states, “You can’t fake culture. You’ve got to have an environment where people feel engaged, where they’re working on things that are important and they have an opportunity to have career development… I want to create the right environment and that’s what we’re working on.” While Barra’s approach is different from past CEOs, the approach appears to be paying off. GM’s stock price was under $28 per share as a low in 2014. In 2018, it was trading at over $44 a share.

1)How do you think simplifying the dress code can contribute to the process of culture change?

2) Is having a very simple, two-word dress code empowering or ambiguous, or both? What do you see as the reasons for your response?

3)Thinking about different industries, which do you think are most suited for this type of policy? Which might be most suited? Please explain your rationale for each.

4) What do you think Mary Barra means when she says ‘You can’t fake culture”?

5)Do you think Mary Barra is well-positioned to change the company culture, given her long tenure at GM? Why or why not?

Please help. Thanks

In: Operations Management

Step 1: Capturing the input The first step is to write a functionGetInput()that inputs the expression...

Step 1: Capturing the input

The first step is to write a functionGetInput()that inputs the expression from the keyboard and returns the tokens---the operands and operators---in a queue. You must write this function.

To make the input easier to process, the operands and operators will be separated by one or more spaces, and the expression will be followed by #. For example, here’s a valid input to your program:

6 4 15 * – #

Back in Codio, modify “main.cpp” by defining the following function above main(). Note the additional #include statements, add those as well:

#include <iostream>

#include <stack>

#include <queue>

#include <string>

#include <sstream>

#include <cctype>

using namespace std;

queue<string> GetInput()

{

queue<string> Q;

stringtoken;

cin >> token;

.. // TODO: loop andinputrestof expression, adding to queue. // Do not add the sentinel # to the queue..

return Q;

}

Now modify the main() function to call GetInput, and change the cout statement to output the size of the queue returned by GetInput. This is a simple check to make sure the queue contains the elements of the expression. Build and run, and enter an expression such as

6 4 15 * – #

The output should be a size of 5---3 operands and 2 operators (the # should not be stored in the queue). If you want to be sure the queue is correct, write a quick loop to pop the contents of the queue one by one, and output. When you’re done, comment out these debug output statements.

Step 2: Evaluating the expression (assuming valid input)

Now that the input has been captured, step 2 is to evaluate the expression. The idea is simple: when you see an operand (an integer), push it on a stack. When you see an operator, pop off two operands, perform the operation, and push on the result. When the input has been processed, the answer is on top of the stack. Go ahead and draw out an example on paper and convince yourself it works: 6 4 15 * - should yield -54.

Write a function EvaluatePostfix that takes a queue containing the input, and returns two values: the integer result, and true / false(denoting valid input or not). Here’s the function definition:

bool EvaluatePostfix(queue<string> input, int& result)

{

stack<int> operands;

.. // evaluate expression:.

result = operands.top(); // answer is on top

return true; // successful evaluation

}

For now, assume valid input, and don’t bother with error checking.Loop until the queue is empty, popping one token at a time. Since the tokens are strings, and a string is an array of characters, you can access the first element of a string using[0]. This makes it easy to tell if a token is an integer operand:

string s = input.front();// next token in the queue:

input.pop();

if (isdigit(s[0]))// integer operand:

{

operands.push(stoi(s));// in C++, usestoito convert string to int

}

else // operator{

...

}

To determine the operator, compare s[0] to ‘+’, ‘*’, etc. Once you have the function written, modify main() to call the function and output the result. Build, run and test with a variety of expressions. Here’s a few:

6 4 15 * – # => -54

6 4 –5 * # => 10

21 10 30 * + 80 / # => 4

Step 3: Handling invalid input

The last step is to extend the program to handle invalid input. Modify the EvaluatePostfix function to handle the following:

1. What if the stack contains more than one value at the end (or is empty)? This can happen when the input is empty, or the expression doesn’t contain enough operators. Example: 1 2 3 + #. In this case EvaluatePostfix should return false.

2. What if the stack does not contain 2 operands when an operator is encountered? This can happen when the expression doesn’t contain enough operands. Example: 1 2 + + #. In this case EvaluatePostfix should return false.

3. What if the operator is something other than +,-, * or /. In that case, EvaluatePostfix should return false.

You’ll need to modify main() to check the value returned by EvaluatePostfix. If false is returned, output the word “invalid” followed by a newline. Build, run and test.

In: Computer Science

IS 633 Assignment 1 Due 9/27 Please submit SQL statements as a plain text file (.txt)....

IS 633 Assignment 1

Due 9/27

Please submit SQL statements as a plain text file (.txt). If blackboard rejects txt file you can submit a zipped file containing the text file. Word, PDF, or Image format are not accepted. You do not need to show screen shot. Make sure you have tested your SQL statements in Oracle 11g.

Problem 1. Please create the following tables for a tool rental database with appropriate primary keys & foreign keys. [30 points]

Assumptions:

  1. Each tool belongs to a category.
  2. Each category may have a parent category but the parent category should not have parent category (so at most two levels). E.g., a Tool A belongs to electric mower, and electric mower belongs to mower. Mower has no parent category.
  3. Each tool can be rented at different time units. The typical time units are hourly, daily, and weekly. There is a different price for each time unit and tool combination. E.g., tool A may be rented at $5 per hour, $30 per day, and $120 per week.
  4. Each customer can rent a tool for a certain number of time units. If the tool is returned late a late fee will be charged.

  

The list of tables is:

Tables:

Cust Table:

cid, -- customer id

cname, --- customer name

cphone, --- customer phone

cemail, --- customer email

Category table:

ctid, --- category id

ctname, --- category name

parent, --- parent category id since category has a hierarchy structure, power washers, electric power washers, gas power washers. You can assume that there are only two levels.

Tool:

tid, --- tool id

tname, --- tool name

ctid, --- category id, the bottom level.

quantity, --- number of this tools

Time_unit table allowed renting unit

tuid, --- time unit id

len, --- length of period, can be 1 hour, 1 day, etc.

min_len, --- minimal #of time unit, e.g., hourly rental but minimal 4 hours.

Tool_Price:

tid, --- tool id

tuid, --- time unit id

price, -- price per period

Rental:

rid, --- rental id

cid, --- customer id

tid, --- tool id

tuid, --- time unit id

num_unit, --- number of time unit of rental, e.g., if num_unit = 5 and unit is hourly, it means 5 hours.

start_time, -- rental start time

end_time, --- suppose rental end_time

return_time, --- time to return the tool

credit_card, --- credit card number

total, --- total charge

Problem 2. Insert at least three rows of data to each table. Make sure you keep the primary key and foreign key constraints. [20 points]

Problem 3. Please write ONE SQL statement for each of the following tasks using tables created in Problem 1. You can ONLY use conditions listed in the task description. Task 1 and 2 each has 5 points. Tasks 3 to 6 each has 10 points. [50 points]

Task 1: return IDs of rentals started in August 2019.

Hint: function trunc(x) converts x which is of timestamp type into date type.

Task 2: Return names and quantity of all tools under the category carpet cleaner. You can assume there is no subcategory under carpet cleaner

Task 3: return number of rentals per customer along with customer ID in the year 2019 (i.e., the start_time of the rental is in 2019).

Task 4: return IDs of tools that has been rented at least twice in 2019.

Task 5: return the price of renting a small carpet cleaner (the name of the tool) for 5 hours.

Hint: find unit price for hourly rental and then multiply that by 5.

Task 6: return names of customers who have rented at least twice in year 2019 (i.e., rental’s start time is in 2019).

In: Computer Science

you may not use the Python ord() or chr() functions you may not use the Python...

you may not use the Python ord() or chr() functions

you may not use the Python ord() or chr() functions

you may not use the Python ord() or chr() functions

You will write a total of four functions, each of which will take two inputs and return a string:

  1. c_encrypt()
  2. c_decrypt()
  3. vig_encrypt()
  4. vig_decrypt()

The first argument will be a string containing the plaintext (or clear text) message to be encrypted for the two encrypt functions, and a string containing a ciphertext to be decrypted. The second argument will be the key.

For this assignment, you will always leave all characters in plaintext or ciphertext that are not letters (i.e., spaces and punctuation marks) unchanged.

Plaintext message letters may be either upper or lower case, but you should output only upper case ciphertext.

Remember the string function upper() you used in lab.

Note that you are writing two functions for each cryptosystem, an encrypt and a decrypt, so one partial test of the correctness of your work is whether first encrypting and then decrypting returns the original string (except that you may have converted some lower case letters to upper case).

Caesar Cipher

Caesar part of the homework: Write c_encrypt() and c_decrypt(), both of which take two arguments, the first one a string and the second one an integer key.

Both should return a string.

This will be much easier if both functions use the cencrypt() shift function you wrote for the lab.

As with the lab, you may not use the Python ord() or chr() functions

Vigenère Cipher

The Vigenère Cipher was more or less completely unbreakable from its introduction sometime in the 1500s until well into the 1800s.

The key in Vigenère is a key word that is used over and over again to give a different key to the Caesar cipher for each letter of the encryption (and decryption), with 'A', in good Python form, representing a rotation of 0. (We Pythonistas start at 0, not 1!)

So if the key is ABACUS, then we encrypt:

  • the first letter of our message with a Caesar cipher with a key/rotation of 0, because A is the first letter of the alphabet,
  • the second letter with a key/rotation of 1 (for the 'B'),
  • the third letter with a rotation of 0 (for the second 'A' of ABACUS),
  • the fourth letter with a key/rotation of 2 for the 'C',
  • the fifth letter with a key/rotation of 20 for the 'U',
  • the sixth letter with a key/rotation of 18 for the 'S',
  • and wrap back to the start of our keyword ABACUS and encrypt the seventh letter with a key/rotation of 0 for the first 'A' in ABACUS

Back in the 1800s people wanting to use this system would make use of a Vigenère square, also known as the tabula recta, shown in the middle of the Wikipedia entry for the Vigenère cipher, but we can use Python.

Vigenère part of the homework: Write vig_encrypt() and vig_decrypt() functions. Each takes two strings as inputs, with the first being the plaintext/ciphertext, and the second being the key. Both should be calling functions you wrote earlier to help make the work easier.

The key will be a string consisting only of letters, but the letters might be in upper, lower, or mixed case. Important: If the plaintext to be encrypted has non-alphabetic characters (e.g., spaces or punctuation):

  • Leave the non-alphabetic character unchanged just as you did for Caesar Cipher.
  • Do not advance in use of the key for non-alphabetic characters in the plaintext. So for vig_encrypt('Hi Mom!', 'LEMON'), the H is encrypted according to the L from the key, the i (after conversion to I) is encrypted according to the E in the key, and the M in the plaintext is encrypted according to the M in the key (rather than according to the O in the key).

One check on your work: vig_encrypt('ATTACKATDAWN', 'LEMON') should return the string LXFOPVEFRNHR; another is that vig_encrypt('Hi Mom!', 'LEMON') should return the string SM YCZ!

you may not use the Python ord() or chr() functions

you may not use the Python ord() or chr() functions

you may not use the Python ord() or chr() functions

In: Computer Science

Molly’s Home Cooking, a regional restaurant with locations in three small Southern towns, one of which...

Molly’s Home Cooking, a regional restaurant with locations in three small Southern towns, one of which is a college town, specializes in comfort foods and regional specialties. Two of the restaurants have been open for over five years. The Molly’s located in the college town opened in May 2018. The restaurants are either freestanding near other businesses or in a strip shopping/eating area. With a menu consisting of all fresh, cooked-to-order foods, Molly’s features different items daily and serves traditional Southern desserts. Some of the menu items include meatloaf, turkey cranberry salad, specialty sandwiches, salad options, barbecued beef, and fresh pecan pie. While open for lunch and dinner daily, Molly’s also offers breakfast, featuring homemade biscuits, on weekends. On the drink menu, customers will find tea, coffee, soda, and water. A couple of beers and wines are on the menu, but Molly’s does not want to be thought of as a bar. The restaurant also caters special events such as weddings and business lunches and sells boxed meals (barbecue) that feed four to six people for outdoor events such as tailgates.

Menu items are reasonably priced, but are more expensive than many fast food restaurants, while less expensive than most “sit down” restaurants. Each restaurant has the same setup, where customers place and pay for their orders at the front counter and then get glasses for drinks. They fill their own drinks and get their silverware and napkins at the back of the restaurant. Customers select their own tables and servers bring food to the table. If ordered, desserts are brought to the table at the end of the meal so that it may be served hot and with ice cream or whipped cream, if preferred. Customers may add desserts at the end of the meal and pay at the counter when finished eating. If customers prefer take-out orders, they may call in advance and pick up the order. Servers let them know how long it will take for the order to be ready.

Prior to opening a restaurant, the owners have a week of “test and training” days where they invite people from local communities for lunch or dinner. For example, they may offer local businesspeople a free lunch or invite owners from other surrounding businesses to bring their families. For the Molly’s in the college town, the owners and employees extended lunch invitations to several faculty, staff, and students and asked them each to invite a few guests. Molly’s wants to introduce members from each target market to the delicious foods on their menus. Not only does this strategy generate brand awareness, but it also creates word-of-mouth and positive public relations.

With regard to promotion, Molly’s Home Cooking, like many other small businesses, has a limited promotion budget. They use social media, primarily Facebook, where they promote daily specials. For the restaurant located in the college town (about a mile from campus), Molly’s placed an advertisement in the university’s student newspaper early in the fall semester. They also placed signs in front of the restaurant to attract visitors.

Molly’s has many repeat customers at each established restaurant. Those restaurants also attract consumers who are traveling or sightseeing in nearby areas. The newest Molly’s in the college town opened right before the majority of students went home for summer internships. Many faculty do not teach in the summer, so the town becomes very quiet during the summer months. Molly’s Home Cooking wants to increase awareness, get more repeat customers, and increase profits.

  1. For Molly’s Home Cooking in the college town, what promotion strategies do you recommend to attract faculty, staff, and students from the university?

  2. Without spending much on promotion or changing menu prices, how can Molly’s generate loyal customers in established markets and in the college town?

  3. Other than running one ad in the student newspaper, Molly’s has the same setup, menus, prices, and promotion (Facebook page) in each market. Given that Molly’s has a very limited budget, should the restaurant change anything for different target markets (e.g., travelers, families, local businesses, college population)?

In: Operations Management

ECO Vietnam is planning to improve the transportation to Gia Bic Village by providing more ecofriendly...

ECO Vietnam is planning to improve the transportation to Gia Bic Village by providing more ecofriendly option. The current fuel powered bus has been used for the past 4 years and was originally planned to be used for 10 years. It costed $1,000,000 to acquire, and was being depreciated straightline over 8 year period. However, it was found that the fuel powered bus began to emit black CO2 gases, and would violate their mission and vision as an ecotourism provider. The company would therefore like to investigate two mutually exclusive projects in order to replace the fuel powered bus. One option is an electric bus and another option is a hybrid electric bus. Both should be able to fit around 40 ecotourists. They have already conducted and paid $20,000 for an assessment of the potential of using electric and hybrid electric buses in ecotourism operations. The board of directors usually would like to gain back the investment amount within 5 years. The current fuel powered bus can be sold to another tourism operator at a salvage value of $170,000 if a new bus is acquired. The current corporate tax rate is 20%.

A new electric bus for use in protect areas cost $6,500,000, while the charging station for the bus costs $5,000 including installation. The firm’s financing costs are $32,000 per year. Administrative and legal fees associated with the capital acquisition are expected to be $9,000 and $4,000, respectively. The economic life of the investment is 7 years and will depreciate straight-line to a zero value over 10 years. Management team expects the electric bus can be sold after 7 years at a price of $2,000,000. ECO Vietnam expects the electronic bus will reduce fuel expenses by $980,000 annually, with additional revenues of $75,000 per year. Hopefully, with the word-of-mouth, more ecotourist will be attracted to visit this village, and should bring in 11% growth in revenues per year. Electricity fees initially are $80,000 and are expected to grow at 3% each year. To support the use of environmentally friendly transportation, the government will subsidize $50,000 annually for the first 5 years to companies not using fuel-powered buses.

The other option, a second hand hybrid electric bus costs $2,800,000, including maintenance fees. Administrative and legal fees associated with this acquisition are expected to be $5,000 and $8,000, respectively. The economic life of the investment is 5 years and will depreciate on a five-year MACRS to a salvage value of $0. Management team expects the hybrid electric bus can be salvaged at the end of it’s economic life at price of $280,000. ECO Vietnam believes fuel expenses will be reduced by $670,000 annually, with a 3% decrease in savings per year as the battery becomes less efficient.

Additional revenues will be the same as the electric bus of $75,000 per year, with a 11% growth in revenues per year. Electricity fees start at $15,000 and are expected to grow at 3% each year. For this kind of hybrid bus, additional spare parts of $5,000 will need to be prepared immediately, and accounts payable will increase about $3,000 annually once the bus is in use.

Year 5-year MACRS
1 20.00%
2 32.00%
3 19.20%
4 11.52%
5 11.52%
6 5.76%

Currently ECO Vietnam has 20,000 zero coupon bonds with 10 year maturity, selling for 40% of the par value, 1,500,000 share of common stock, selling for $18 per share, with a beta of 1.3. Market risk premium is 6.50%, and the risk-free rate is 1.25%. The bus project is a little bit less risky than the company’s usual projects, so ECO Vietnam determined to apply an adjusted factor of -3% to the cost of capital. Given the above information about the projects and the cost of capital for ECO Vietnam, do all the calculations that are necessary in order to make a value creating decision. The general format is up to you, as long as all the components for making such decision are present. You should focus on using the right methods, rather than on getting the right answer.

Explain your recommendation to the board of directors

In: Finance

Customer Profitability Score Exercise: (10 marks) If the average annual cost per customer of a software...

Customer Profitability Score

Exercise:

If the average annual cost per customer of a software house is $1592, customer A generates a profit of $365, and Customer B generates a profit of $1425. Calculate the CPS and compare the results.

Please type your answer below.

       Search Engine Rankings (by keyword) and
       click-through rate

Why is this indicator important?

Along with page views and bounce rates (see KPI on page 155), search engine rankings (by keyword) and click-through rate are among a number of metrics that are used in website traffic analytics for assessing the effectiveness of an organisation’s internet strategy in attracting and gaining value from visitors.

Search engine rankings (by keyword) is simply a measure of website ranking based on relevant keywords. Unlike web directories, which are maintained by human editors, search engines operate algorithmically or are a mixture of algorithmically and human input.

The goal of achieving a high search engine ranking is to increase website visits. Sinply put, the higher the ranking the greater the likelihood that a person browsing the web (a searcher) will visit your site (obviously they are more likely to look at a website that appears on the first page than at one that appears on page 9 or 10 – see Tips/warnings). This is called the click-through rate (CTR), which simply means the percentage of time that a searcher clicks on a website displayed in their search results versus a different site. CTRs are impacted significantly by the search engine ranking for a particular keyword. At present, the most dominant search engine worldwide is Google.

How do I measure it?

Data collection method

The online collection of rankings from search engines, such as Google.

Formula

A search engine ranking is simply a website’s position on the search engine ranking. Consider the following as an example of measuring a click-through rate. A reported in the book The Small Business Owner’s Handbook to Search Engine Optimization (see References), a site that has earned a Google ranking of number one for a particular keyword produces a Google click-through rate of 42% versus the site that is ranked number 10, which produces a meager 6.06% ctr.

Example

This example comes from www.SEbook.com (see References) for predicting an increase in online sales for each keyword. For example say an organisation scored a Google website ranking of number one for a keyword that, according to the SEOBook.com Keyword Selector Tool (which provides a list of up to 15 of the most popular search queries for each word you enter), was searched on 100 times per day in Google. The site ranking number one would

       Search Engine Rankings (by keyword) and
       click-through rate

receive a Google CTR of approximately 40%. This would translate into 40 visits to the website each day (100 searches x 40% CTR = 40 visits), or 1,200 visits per month.

Now we will convert the 1,200 visits into dollars. For this we will assume that the website delivers the average 2-4% conversion rate (sales from visits). This means that the 1,200 visits should produce approximately 24 to 48 orders per month (1,200 unique visitors x 2-4% = 24 to 48). We will also assume that your average online order is approximately %50. We will also assume that your average online order is approximately %50. Therefore, a single keyword with a Google website ranking of number one could drive between $1,200 and $2,400 of online sales for your business each month, or $14,400 to $28,800 annually.

Exercise:

Answer the following question.

1.         What is the difference between organic click-through rate and inorganic click-through rate?

Please type your answer below.

2.         How is click through rate linked to Search Engine Optimization?

Please type your answer below.

3.         How can organic click through rate be improved?

Please type your answer below.

In: Operations Management

Please fix these errors C++ In file included from main.cpp:14:0: Inventory.h:1:0: error: unterminated #ifndef #ifndef INVENTORY_H_...

Please fix these errors C++

In file included from main.cpp:14:0:
Inventory.h:1:0: error: unterminated #ifndef
 #ifndef INVENTORY_H_
 
main.cpp: In function ‘int main()’:
main.cpp:82:35: error: ‘adds’ was not declared in this scope
                    noun= adds(noun);
                                   ^
main.cpp:88:32: error: ‘display’ was not declared in this scope
                    display(noun);
                                ^
In file included from Inventory.cpp:4:0:
Inventory.h:1:0: error: unterminated #ifndef
 #ifndef INVENTORY_H_

----------------------------------------------------------------------------------

CODE: main.cpp

#include<iostream>
#include<string>
#include<vector>
#include "Inventory.h"

using namespace std;

int main()
{
Node * noun=NULL;
Node * verb=NULL;
int choice=0;
while(choice!=8)
{
cout<<"1. Push Noun\n";
cout<<"2. Pop Noun\n";
cout<<"3. Push Verb\n";
cout<<"4. Pop Verb\n";
cout<<"5. Concatenate\n";
cout<<"6. Add an s\n";
cout<<"7. Display Both Stacks\n";
cout<<"8. Exit\n";
cout<<"Enter your choice: ";
cin>>choice;
switch(choice)
{
case 1:
{
cout<<"Enter a noun: ";
string n;
cin>>n;
noun = push(noun,n);

  
}
break;
case 2:
{
cout<<"NOUN POPPED: ";
Node * t = pop(&noun);
if(t!=NULL)
cout<<t->data<<endl;
}
break;
case 3:
{
cout<<"Enter a verb: ";
string n;
cin>>n;
verb = push(verb,n);
  
}
break;
case 4:
{
cout<<"Verb POPPED: ";
Node * t = pop(&verb);
if(t!=NULL)
cout<<t->data<<endl;
}
break;
case 5: {
cout<<"Top two words on noun stack concatenated\n";
noun = concat(noun);
  
}
break;
case 6:
  
{
cout<<"Add s to the top word on noun stack\n";
noun = adds(noun);
}
break;
case 7:
{
cout<<"NOUN STACK\n";
display(noun);
cout<<"VERB STACK\n";
display(verb);
  
}
case 8:
{
}
break;
default: cout<<"Enter a valid choice\n";
  
}
}
return 0;
}

CODE: Inventory.cpp

#include<iostream>
#include<string>
#include<vector>
#include "Inventory.h"

using namespace std;

//display
void display(Node * head)
{
if(head==NULL)
{
  
return;
}
vector<string> stack;
Node * cur = head;
  
while(cur!=NULL)
{
stack.push_back(cur->data);
cur=cur->next;
}
for(int i = stack.size()-1;i>=0;--i)
{
cout<<stack.at(i)<<" ";
}
cout<<endl;
}

Node * adds(Node *head)
{
Node * top1 = pop(&head);
if(top1!=NULL)
{
//add s
string sol= top1->data + "s";
head=push(head,sol);
}
return head;
}

CODE: inventory.h

#ifndef INVENTORY_H_
#define INVENTORY_H_
#include<iostream>

using namespace std;

class Node
{
public:
string data;
Node * next;
Node()
{
data="";
next=NULL;
}
Node(string data)
{
data=data;
next=NULL;
}
};

Node * push(Node * head, string data)
{
if(head==NULL)
{
head=new Node();
head->data=data;
return head;
}
Node * cur = head;
while(cur->next!=NULL)
{
cur=cur->next;
}
Node * temp = new Node();
temp->data=data;
cur->next=temp;
return head;
}


Node * pop(Node ** h)
{
Node * head = *h;
if(head==NULL)
return NULL;
if(head->next==NULL)
{
  
Node * temp = head;
*h = NULL;
return temp;
}
Node * cur = head;
Node * prev = head;
  
while(cur->next!=NULL)
{
prev=cur;
cur=cur->next;
}
prev->next=NULL;

return cur;
}

Node * concat(Node * head)
{
Node * top1 = pop(&head);
Node * top2 = pop(&head);
  
if(top1!=NULL && top2!=NULL)
{
string solution = top1->data + top2->data;
head= push(head,solution);
  
}
return head;
}

In: Computer Science

Prompt the user to enter a string of their choosing. Store the text in a string....

Prompt the user to enter a string of their choosing. Store the text in a string. Output the string. (1 pt)

Ex:

Enter a sample text:
we'll continue our quest in space.  there will be more shuttle flights and more shuttle crews and,  yes;  more volunteers, more civilians,  more teachers in space.  nothing ends here;  our hopes and our journeys continue!

You entered: we'll continue our quest in space.  there will be more shuttle flights and more shuttle crews and,  yes;  more volunteers, more civilians,  more teachers in space.  nothing ends here;  our hopes and our journeys continue!


(2) Implement a print_menu() function, which has a string as a parameter, outputs a menu of user options for analyzing/editing the string, and returns the user's entered menu option and the sample text string (which can be edited inside the print_menu() function). Each option is represented by a single character.

If an invalid character is entered, continue to prompt for a valid choice. Hint: Implement the Quit menu option before implementing other options. Call print_menu() in the main section of your code. Continue to call print_menu() until the user enters q to Quit. (3 pts)

Ex:

MENU
c - Number of non-whitespace characters
w - Number of words
f - Fix capitalization
r - Replace punctuation
s - Shorten spaces
q - Quit

Choose an option:


(3) Implement the get_num_of_non_WS_characters() function. get_num_of_non_WS_characters() has a string parameter and returns the number of characters in the string, excluding all whitespace. Call get_num_of_non_WS_characters() in the print_menu() function. (4 pts)

Ex:

Number of non-whitespace characters: 181


(4) Implement the get_num_of_words() function. get_num_of_words() has a string parameter and returns the number of words in the string. Hint: Words end when a space is reached except for the last word in a sentence. Call get_num_of_words() in the print_menu() function. (3 pts)

Ex:

Number of words: 35


(5) Implement the fix_capitalization() function. fix_capitalization() has a string parameter and returns an updated string, where lowercase letters at the beginning of sentences are replaced with uppercase letters. fix_capitalization() also returns the number of letters that have been capitalized. Call fix_capitalization() in the print_menu() function, and then output the the edited string followed by the number of letters capitalized. Hint 1: Look up and use Python functions .islower() and .upper() to complete this task. Hint 2: Create an empty string and use string concatenation to make edits to the string. (3 pts)

Ex:

Number of letters capitalized: 3
Edited text: We'll continue our quest in space.  There will be more shuttle flights and more shuttle crews and,  yes;  more volunteers, more civilians,  more teachers in space.  Nothing ends here;  our hopes and our journeys continue!


(6) Implement the replace_punctuation() function. replace_punctuation() has a string parameter and two keyword argument parameters exclamation_count and semicolon_count. replace_punctuation() updates the string by replacing each exclamation point (!) character with a period (.) and each semicolon (;) character with a comma (,). replace_punctuation() also counts the number of times each character is replaced and outputs those counts. Lastly, replace_punctuation() returns the updated string. Call replace_punctuation() in the print_menu() function, and then output the edited string. (3 pts)

Ex:

Punctuation replaced
exclamation_count: 1
semicolon_count: 2
Edited text: we'll continue our quest in space.  there will be more shuttle flights and more shuttle crews and,  yes,  more volunteers, more civilians,  more teachers in space.  nothing ends here,  our hopes and our journeys continue.


(7) Implement the shorten_space() function. shorten_space() has a string parameter and updates the string by replacing all sequences of 2 or more spaces with a single space. shorten_space() returns the string. Call shorten_space() in the print_menu() function, and then output the edited string. Hint: Look up and use Python function .isspace(). (3 pt)

Ex:

Edited text: we'll continue our quest in space. there will be more shuttle flights and more shuttle crews and, yes, more volunteers, more civilians, more teachers in space. nothing ends here; our hopes and our journeys continue!

In: Computer Science

Ratio Analysis Smith-John Widgets Inc. Conclusion Industry Average 2009 2010 2011 2009 2010 2011 A.   Profitability...

Ratio Analysis
Smith-John Widgets Inc. Conclusion Industry Average
2009 2010 2011 2009 2010 2011
A.   Profitability
1 Profit Margin
2 Return on assets
3 Return on Common Equity
B. Asset Utilization
4 Receivables turnover
5 Inventory Turnover
6 Fixed asset Turnover
7 Total Asset Turnover
C. Liquidity
8 Current ratio
Calculations For Quick Ratio
9 Quick Ratio
D. Debt Utilization
10 Debt Total Assets

Smith's Inc, Inc., produces widgets for the wind chime industry. The company sells all products on accounts with net 30 day terms. The company has been without someone to assess the financial condition for some time (using only a bookkeeper to post activity to the general ledger accounts) and, therefore, is asking you to help with a more current assessment of the company’s position.

Part A: Below you will find a series of accounts that represent the trial balance of the business firm. These accounts encompass both income statement and balance sheet accounts.

2009   2010   2011

Accumulated depreciation 176,580 209,050 242,275

Retained earnings     337,602   510,731 648,528

Sales 3,702,480   3,961,654   3,981,462

Cash 35,750    62,635 86,595

Bonds payable 421,000 334,000   325,000

Accounts receivable   246,580   293,430   349,182

Depreciation expense 31,265 32,470 33,675

Common stock shares outstanding 80,000   80,000 80,000

Plant and equipment, at cost   984,021 1,026,880 1,151,210

Taxes 79,484   93,223   74,198

Accounts payable 62,685 116,696 188,569

Common stock, $1 par 75,000 75,000 75,000

Inventory   185,652 243,117 312,622

Prepaid expenses 6,575 21,525   26,325

Cost of goods sold 2,665,786   2,879,049   2,936,630

Interest expense 12,532 10,325 10,235

Selling and administrative expenses   765,800 773,458 788,927

Marketable securities 12,545 23,564 24,153

Other current liabilities   123,256   150,674   195,265

Capital paid in excess of par (common) 275,000 275,000   275,000

Part B: Based on the financial statements that were prepared with this data, complete the following financial ratio calculations and provide a narrative discussion of these results as compared to industry averages (provided.)

Ratios required:

Ratio Industry Average

1. Profit margin 3.2%

2. Return on assets (use ending assets) 6.0%

3. Return on common equity (use ending common equity) 15.6%

4. Receivable turnover (use ending receivables) 8.5 x

5. Inventory turnover (use ending inventory) 12.0 x

6.Fixed asset turnover (use ending fixed asset balance) 5.75 x

7. Total asset turnover (use ending assets) 1.89 x

8. Current ratio 3.10

9. Quick ratio 1.40

10. Debt to total assets (use ending assets) 37.0%

Your solution should include the required ratios for each year and then provide a narrative discussion regarding the results as they compare to the industry averages. This analysis should discuss whether or not Smith's Inc. is better or worse than the industry average but it should not stop there. You should also include a discussion as to why or how the difference can be explained, i.e., the reason for the variance. The final solution is to be provided in the Word document, with the module and part clearly identified. The narrative discussion will reference the appropriate ratio and the comparison to the appropriate industry average.

Smith's Inc.., produces wind chimes for the wind chime industry. The company sells all products on accounts with net 30 day terms. The company has been without someone to assess the financial condition and, therefore, is asking you to help.

Part A: Below you will find the trial balance of the business firm and need to be placed into the correct statement.

Required: Prepare a Income Statement and Balance Sheet for the company.

Part B: Based on the financial statements that were prepared with data above, complete the following financial ratio calculations and provide a narrative discussion of these results as compared to industry averages (provided.)

In: Accounting