Questions
Java question - How can the code below be modified to accept multi digit input. String...

Java question - How can the code below be modified to accept multi digit input.

String e = "1+9+8";
int r = e.charAt(0)-'0';
for (int i = 1; i < e.length(); i+=2){
  
if (e.charAt(i) == '+'){
r += e.charAt(i+1)-'0';
}
else{
r -= e.charAt(i+1)-'0';
}

The only built in String methods that can be used are lowercase(), length(), and charAt(). Arrays and parseInt() cannot be used.

So we want to know how we can get an answer if a string such as "123+45+678-...." is entered.

In: Computer Science

What did you learn about this structure that was a surprise to you or resonated with...

What did you learn about this structure that was a surprise to you or resonated with you about building relationships in the workplace? Did the people who built this wall have to work together? Are there any lessons to be learned about building relationships across philosophical divides (differing world views) in the workplace?

Note: Please avoid comments or references to the southern border between Mexico and the USA. This is a highly controversial subject and your comments may be taken out of context and appear as harassment. Any comments about the southern border or Mexico will be immediately removed and points deducted from your score

In: Psychology

Write a program that takes a string from the user, identifies and counts all unique characters...

Write a program that takes a string from the user, identifies and counts all unique characters in that given string. You are bound to use only built-in string functions where necessary. For identification of unique characters and for counting of the characters make separate functions.

For character identification

Develop a program that takes a string argument, and returns an array containing all unique characters.

For character counting

Develop a program that takes an array returned from above function as an argument along with the given string and return an array containing the total count of each uniquely identified character present in the argument array.

In: Computer Science

Kindly summarize this Literature Review Section 3.2 Efficient Techniques and Performance Measurement Recently, developed techniques compare...

Kindly summarize this Literature Review Section 3.2 Efficient Techniques and Performance Measurement Recently, developed techniques compare the efficiency of similar service organizations by explicitly considering their use of multiple inputs to produce multiple outputs. These new efficiency techniques are often divided into two categories. One broad category consists of the linear programming procedures used in this paper (DEA). The second category is a set of regression-based techniques that derive inefficiency estimates from two-part error terms, and has been called the econometric or stochastic frontier approach. Both techniques use sample firms to construct an efficient production frontier. The frontier is efficient in the sense that a firm operating on the frontier could not increase output without increasing its input utilization, or it could not reduce its input utilization without decreasing output. Deviations from the frontier represent inefficiencies, and are termed X-inefficiencies in the finance and economics literature. Efficient frontier techniques avoid the need to develop a standard cost for each service provided and are more comprehensive and reliable that using a set of operating ratios and profit measures. These techniques permit managers and researchers to service organizations and identify units that are relatively inefficient, determine the magnitude of the inefficiency, suggest alternative strategies to reduce the inefficiencies, all in a composite measure. Moreover, these techniques provide an estimate of the overall efficiency level of the market that is under consideration. We know of only two studies that use efficient frontier techniques in the hotel industry. The first is that of Morey and Ditman (1995) who measure the relative performance of hotel general managers using DEA. The authors gathered input-output data for 54 hotels from a geographically dispersed area. They found that managers were operating 89 percent efficiency. In other words, given their output, managers on average could reduce their inputs by 11 percent. The study reported that the least efficient hotel was 64 percent efficient. These results are relatively high compared to those found in other industry studies that utilize DEA. Large efficiency scores are indicators of High performance and competition (Leibenstein 1966). Thus in an economic context, the market for lodging services appears to be operating efficiently. Anderson et al. (1998) argue for the benefits of using a stochastic frontier methodology in addition to DEA in order to accurately assess performance. Using a classical stochastic frontier model, they also find the hotel industry to be performing relatively efficiently, with efficiency measures above 90 percent. While both of these studies are informative, neither provides any information on the source of the inefficiencies. The source of the inefficiencies, whether technical or allocative in nature, is important information that managers need in order to take proactive positions to increase performance. We re-examine hotel efficiency using a method of DEA that provides significantly more detailed results and we further analyze the inefficiency sources. The following section describes our procedure.

SECTION 4 EFFICIENCY DETERMINATION

Section 4.1 The DEA Technique

Within the DEA framework, performance of an individual firm is evaluated with respect to an efficient frontier, which is constructed by taking linear combinations of existing firms. While there are several DEA approaches, wee use an unput-base approach, assuming that inputs are contracted proportionally with exogenous outputs. The procedure relies on sophisticated mathematics; however, the following simplified graphical example deomstates how th eefficiency measures are computed.

Figure 1 displays tha overall (OE) and (TE), and allocativ (AE) efficiency measures. In this example, we assume two inputs (X1 and X2), one output (Y), and constant returns to scale. Additionally, we assume that technology is fixed and that input prices are represented as PP. Firm A is X-efficient since it produces along output isoquant Y by utilizing the least inputs. Suppose thee is a firm operating at point C and producing an output equivalent of that produced along Y. C is uses more inputs than A to produce the output Y and is classified as inefficient with an overall efficiency score of 0D/0C )or equivalenly and inefficiency score of DC/0C).

Overall inefficiency can be decomposed into its techhnical and allocattive components. Without being able to alter input allocations, the bestt that firmC could have done was to operate at point B. The "extra" input usage that was incurred by firm C as a percentage of total input usage is the technical inefficiency measure and can be dpressed as BC/0C The technical efficiency of firm C is ecpresses as 0B/0C. Allocative inefficiency representts managerial failurd to use the optimal input mix. Here, allocative inefficiencies for firm C can be represented by DB/0B, and allocatvie effficiency is expressed as 0D/0B.

Technical efficiency can be further decomposed into technical (PTE) and scale (SE) efficiency measures. Pure technical inefficiency simply refers to deviations from the efficient frontier that result rom failure to utilize the employed resoures efficiently. Hence, this measure assumes that firms are operating at constant return to scale. Scale ineficiencies, on the other hand are losses due tofailure to operate at constant returns to scale. Figure 2 illustrates these two efficiency measures. In this figure, the Y-axis represents output and the X-axis represents input conbinations that contain an equal amount of both input 1 an dinput 2. The graph shows three observations denoted A, B, and C, respectively. Two frontiers are illustrated, a fronier assuming constant returns to scale instead of decreasing or increasing returns toscale.

After completing this analysis, we examine the SE measure to determine if it equals one. If the SE measure equals one, firms are operating at constant returns to scale. If SE does not equal one, we then determine whether the firms are oeprating at increasing or decreasing returns to scale (see Appendix A for a mathematical treatment of DEA).

In: Economics

using matlab Write a script that simulates a card game that works as follows: A dealer...

using matlab

Write a script that simulates a card game that works as follows: A dealer places 5 cards face down on the table and flips the first card. The player goes down the line, one at a time, and guesses if the next card is higher or lower than the card displayed, and then the next card is revealed. In the end, the player is awarded a point for each correct guess.

In terms of coding, your script should follow this basic outline (with deviations as you decide how to code it):

1) Your script should "shuffle" and randomly order 5 cards, listed from 1-5. Note: there should be only one of each card (this is a permutation, not a combination). You should NOT display the cards (though you may want to look at them while starting to test if your code is right).

2) "Flip" the first card and display it to the user.

3) Prompt the user to guess if the next card is higher or lower. You can do this a number of ways, but I'd suggest using the "input" built-in function and certain numbers to indicate lower or higher (e.g. 'input pi for lower and tau for higher' but maybe not pi and tau).

4) Flip the next card. Assign one point to the user if they are correct, and no points if they are incorrect.

5) Repeat steps 3 & 4 until all 4 cards have been displayed and the 5th card has been revealed to be lower or higher.

6) Display the number of points the user has received, either by unsuppressing a variable name or using the "disp", "sprintf" or "fprintf" MATLAB built-in functions.

In: Statistics and Probability

CASE 9‐4 Self‐Constructed Assets Jay Manufacturing, Inc., began operations five years ago producing the probo, a...

CASE 9‐4 Self‐Constructed Assets

Jay Manufacturing, Inc., began operations five years ago producing the probo, a new type of instrument it hoped to sell to doctors, dentists, and hospitals. The demand forprobos far exceeded initial expectations, and the company was unable to produce enough probos to meet that demand. Jay was manufacturing probos on equipment it built at the start of its operations, but it needed more efficient equipment to meet demand. Company management decided to design and build the equipment because no equipment currently available on the market was suitable for producing probos.

In 2017, a section of the plant was devoted to development of the new equipment and a special staff of personnel was hired. Within six months, a machine was developed at a cost of $170,000 that increased production and reduced labor cost substantially. Sparked by the success of the new machine, the company built three more machines of the same type at a cost of $80,000 each.

Required:

  1. In addition to satisfying a need that outsiders cannot meet within the desired time, what other reasons might cause a firm to construct fixed assets for its own use?
  2. In general, what costs should be capitalized for a self‐constructed asset?
  3. Discuss the appropriateness (give pros and cons) of including these charges in the capitalized cost of self‐constructed assets:
    1. The increase in overhead caused by the self‐construction of fixed assets
    2. A proportionate share of overhead on the same basis as that applied to goods manufactured for sale (consider whether the company is at full capacity)
  4. Discuss the proper accounting treatment of the $90,000 ($170,000 – $80,000) by which the cost of the first machine exceeded the cost of the subsequent machines.

In: Accounting

Part 1: (Due March 21, 2018 by 8 am) Start by writing a function (with comments)...

Part 1: (Due March 21, 2018 by 8 am) Start by writing a function (with comments) to achieve these: Determine if the matrix A is square. Augment A and b. Find the maximum absolute value in the first column and the row number that this belongs to. Interchange the first row with the row with the maximum first-column-entry. (To achieve this, create a sub-function that interchanges two specified rows for any matrix.) Submit a single m-file with a subfunction that switches rows. Complete project: Reduce the matrix into row-echelon form, using Gaussian elimination with partial pivoting (generalize the steps in Part 1 as they apply to all columns, so that the largest absolute of the values on the active column is used as the pivot.) Program to make all values below the pivot zero. Bring the system into a reduced row echelon form. Obtain x as a column matrix. Submit a single m-file with two subfunctions which switch rows and do row reduction. Label your program lastname_firstinit_ME3430_Project2.m. Use comments on the side of each line to explain the purpose of that line. NOTES ? Some built in functions to use: error, size, abs, max and the usual for, while, if structures. Ask before you use other built-in functions. ? Use for-loops instead of MATLAB vectorization. (Do not use the ":" operator to access matrix locations.) ? Test your function with various square and rectangular matrices. ? Include comments. ? Suppress all displaying of intermediate results other than the error messages that your program generates, such as “Error: the matrix is not square”, and “Error: No unique solution exists”.

In: Economics

You are 10 months out from the upcoming hurricane season. You are the Emergency Planner for...

You are 10 months out from the upcoming hurricane season. You are the Emergency Planner for a mid-sized town in South Florida with several critical infrastructures. Your mayor has as asked you to plan and prepare for the possibility of a direct hitting storm during the upcoming season.

Based on the “Scenario Location” below, identify three key public- private partnerships critical to the emergency planning process in Sunny City and explain the importance of each one. Explain how you would establish and maintain communications with these partnerships throughout the emergency planning process.

Scenario Location:

Sunny City is a fictional mid-sized town in Southeastern Florida. It has a rich history of agriculture, including citrus groves and cattle farms and has been growing in population over the past decade. Route 1 passes through the center of town. There are several bridges over various waterways including two large bridges over the inter-coastal waterway. A privately operated electrical power plant is located near the inter-coastal waterway. Just west of town, a small regional commuter airport was recently built which has drawn in several businesses. Trying to keep up with the growing nature of the town, new communication hubs with fiber-optics have been put in and a waste water treatment facility was built. There is talk about increasing the width of some of the main roads to handle the build-up of traffic, but in the meantime Public Works has been working overtime to keep the roads maintained and operational

In: Operations Management

python 3 We would like to add cursor-based APIs to the array-backed list API. To this...

python 3

We would like to add cursor-based APIs to the array-backed list API. To this end, we are including a cursor attribute, and two related methods. cursor_set will set the cursor to its argument index, and cursor_insert will insert its argument value into the list at the current cursor position and advance the cursor by 1.

E.g, given an array-backed list l that contains the values [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], running the following code

  l.cursor_set(5)
  l.cursor_insert('a')
  l.cursor_insert('b')
  l.cursor_insert('c')

will result in the updated list [0, 1, 2, 3, 4, 'a', 'b', 'c', 5, 6, 7, 8, 9]

When the cursor is set to the length of the list, cursor_insert should behave like append.

Programming rules:

  • You should only add code to the cursor_insert method; the rest of ArrayList is provided for reference and testing purposes only. cursor_set is already provided.
  • You must adhere to the same rules when using the built-in Python list as you did in the ArrayList lab.
  • Assume that cursor is set to a value between 0 and the length of the list (inclusive) when cursor_insert is called.
  • You may not use any other data structures (this includes the built-in Python list).

class ArrayList:
def __init__(self):
self.data = []
self.cursor = 0
  
def append(self, val):
self.data.append(None)
self.data[len(self.data)-1] = val
  
def cursor_set(self, idx):
self.cursor = idx
  
def cursor_insert(self, val):
# YOUR CODE HERE

In: Computer Science

COMPANY Case: Porsche: Guarding the Old While Bringing in the New Porsche (pronounced Porsh-uh) is a...

COMPANY Case: Porsche: Guarding the Old While Bringing in the New

Porsche (pronounced Porsh-uh) is a unique company. It has always been a niche brand that makes cars for a small and distinctive segment of automobile buyers. In 2009, Porsche sold only 27,717 cars in the five models it sells in the United States. Honda sold about 10 times that many Accords alone. But Porsche owners are as rare as their vehicles. For that reason, top managers at Porsche spend a great deal of time thinking about customers. They want to know who their customers are, what they think, and how they feel. They want to know why they buy a Porsche rather then a Jaguar, a Ferrari, or a big Mercedes coupe. These are challenging questions to answer; even Porsche owners themselves don’t know exactly what motivates their buying. But given Porsche’s low volume and the increasingly fragmented auto market, it is imperative that management understands its customers and what gets their motors running.

Since its early days, Porsche has appealed to a very narrow segment of financially successful people. These are achievers who see themselves as entrepreneurial, even if they work for a corporation. They set very high goals for themselves and then work doggedly to meet them. And they expect no less from the clothes they wear, the restaurants they go to, or the cars they drive. These individuals see themselves not as a part of the regular world but as exceptions to it. They buy Porsches because the car mirrors their self-image; it stands for the things owners like to see in themselves and their lives.

Most of us buy what Porsche executives call utility vehicles. That is, we buy cars primarily to go to work, transport children, and run errands. Because we use our cars to accomplish these daily tasks, we base buying decisions on features such as price, size, fuel economy, and other practical considerations. But Porsche is more than a utility car. Its owners see it as a car to be enjoyed, not just used. Most Porsche buyers are not moved by information but by feelings. A Porsche is like a piece of clothing—something the owner “wears” and is seen in. They develop a personal relationship with their cars, one that has more to do with the way the car sounds, vibrates, and feels, rather than the how many cup holders it has or how much cargo it can hold in the trunk. They admire their Porsche because it is a competent performance machine without being flashy or phony.

People buy Porsches because they enjoy driving. If all they needed was something to get them from point A to point B, they could find something much less expensive. And while many Porsche owners are car enthusiasts, some of them are not. One successful businesswoman and owner of a high-end Porsche said, “When I drive this car to the high school to pick up my daughter, I end up with five youngsters in the car. If I drive any other car, I can’t even find her; she doesn’t want to come home.”

For its first few decades, Porsche AG lived by the philosophy of Ferry Porsche, Ferdinand’s son. Ferry created the Porsche 356 because no one else made a car like he wanted. But as the years rolled on, Porsche management became concerned with a significant issue: Were there enough Porsche buyers to keep the company afloat? Granted, the company never had illusions of churning out the numbers of a Chevrolet or a Toyota. But to fund innovation, even a niche manufacturer has to grow a little. And Porsche began to worry that the quirky nature of the people who buy Porsches might just run out on them.

This led Porsche to extend its brand outside the box. In the early 1970s, Porsche introduced the 914, a square-ish, mid-engine, two-seater that was much cheaper than the 911. This meant that a different class of people could afford a Porsche. It was no surprise that the 914 became Porsche’s top selling model. By the late 1970s, Porsche replaced the 914 with a hatchback coupe that had something no other regular Porsche model had ever had: an engine in the front. At less than $20,000, more than $10,000 less than the 911, the 924 and later 944 models were once again Porsche’s pitch to affordability. At one point, Porsche increased its sales goal by nearly 50 percent to 60,000 cars a year.

Although these cars were in many respects sales successes, the Porsche faithful cried foul. They considered these entry-level models to be cheap and underperforming. Most loyalists never really accepted these models as “real” Porsches. In fact, they were not at all happy that they had to share their brand with a customer who didn’t fit the Porsche owner profile. They were turned off by what they saw as a corporate strategy that had focused on mass over class marketing. This tarnished image was compounded by the fact that Nissan, Toyota, BMW, and other car manufacturers had ramped up high-end sports car offerings, creating some fierce competition. In fact, both the Datsun 280-ZX and the Toyota Supra were not only cheaper than Porsche’s 944 but also faster. A struggling economy threw more sand in Porsche’s tank. By 1990, Porsche sales had plummeted, and the company flirted with bankruptcy.

But Porsche wasn’t going down without a fight. It quickly recognized the error of its ways and halted production of the entry-level models. It rebuilt its damaged image by revamping its higher-end model lines with more race-bred technology. In an effort to regain rapport with customers, Porsche once again targeted the high end of the market in both price and performance. It set modest sales goals and decided that moderate growth with higher margins would be more profitable in the long term. Thus, the company set out to make one less Porsche than the public demanded. According to one executive, “We’re not looking for volume; we’re searching for exclusivity.”

Porsche’s efforts had the desired effect. By the late 1990s, the brand was once again favored by the same type of achiever who had so deeply loved the car for decades. The cars were once again exclusive. And the company was once again profitable. But by the early 2000s, Porsche management was again asking itself a familiar question: To have a sustainable future, could Porsche rely on only the Porsche faithful? According to then CEO Wendelin Wiedeking, “For Porsche to remain independent, it can’t be dependent on the most fickle segment in the market. We don’t want to become just a marketing department of some giant. We have to make sure we’re profitable enough to pay for future development ourselves.”

So in 2002, Porsche did the unthinkable. It became one of the last car companies to jump into the insatiable sport utility vehicle (SUV) market. At roughly 5,000 pounds, the new Porsche Cayenne was heavier than anything that Porsche had ever made, with the exception of some prototype tanks it made during WWII. Once again, the new model featured an engine up front. And it was the first Porsche to ever be equipped with seatbelts for five. As news spread about the car’s development, howls could be heard from Porsche’s customer base.

But this time, Porsche did not seem too concerned that the loyalists would be put off. Could it be that the company had already forgotten what happened the last time it deviated from the mold? After driving one of the first Cayenne’s off the assembly line, one journalist stated, “A day at the wheel of the 444 horsepower Cayenne Turbo leaves two overwhelming impressions. First, the Cayenne doesn’t behave or feel like an SUV, and second, it drives like a Porsche.” This was no entry-level car. Porsche had created a two-and-a-half ton beast that could accelerate to 60 miles per hour in just over five seconds, corner like it was on rails, and hit 165 miles per hour, all while coddling five adults in sumptuous leather seats with almost no wind noise from the outside world. On top of that, it could keep up with a Land Rover when the pavement ended. Indeed, Porsche had created the Porsche of SUVs.

Last year, Porsche upped the ante one more time. It unveiled another large vehicle. But this time, it was a low-slung, five-door luxury sedan. The Porsche faithful and the automotive press again gasped in disbelief. But by the time the Panamera hit the pavement, Porsche had proven once again that Porsche customers could have their cake and eat it to. The Panamera is almost as big as the Cayenne but can move four adults down the road at speeds of up to 188 miles per hour and accelerate from a standstill to 60 miles per hour in four seconds flat.

Although some Porsche traditionalists would never be caught dead driving a front engine Porsche that has more than two doors, Porsche insists that two trends will sustain these new models. First, a category of Porsche buyers has moved into life stages that have them facing inescapable needs; they need to haul more people and stuff. This not only applies to certain regular Porsche buyers, but Porsche is again seeing buyers enter its dealerships that otherwise wouldn’t have. Only this time, the price points of the new vehicles are drawing only the well heeled, allowing Porsche to maintain its exclusivity. These buyers also seem to fit the achiever profile of regular Porsche buyers.

The second trend is the growth of emerging economies. Whereas the United States has long been the world’s biggest consumer of Porsches, the company expects China to become its biggest customer before too long. Twenty years ago, the United States accounted for about 50 percent of Porsche’s worldwide sales. Now, it accounts for only about 26 percent. In China, many people who can afford to buy a car as expensive as a Porsche also hire a chauffeur. The Cayenne and the Panamera are perfect for those who want to be driven around in style but who may also want to make a quick getaway if necessary.

The most recent economic downturn has brought down the sales of just about every maker of premium automobiles. When times are tough, buying a car like a Porsche is the ultimate deferrable purchase. But as this downturn turns back up, Porsche is better poised than it has ever been to meet the needs of its customer base. It is also in better shape than ever to maintain its brand image with the Porsche faithful and with others as well. Sure, understanding Porsche buyers is still a difficult task. But a former CEO of Porsche summed it up this way: “If you really want to understand our customers, you have to understand the phrase, ‘If I were going to be a car, I’d be a Porsche.’

.

Required Questions

Question 01: You are asked to develop a Mission statement and four Marketing objectives for Porsche for the next ten years (2021- 2025) . Draft an ideal mission statement and outline your four marketing objectives (5 marks

.

Question 02: Identify , explain and justify the main consumer behaviour characteristics that influences the Porche buyers.

In: Operations Management