Questions
Create a java program. War is a card game for two players. A standard deck of...

Create a java program.

  • War is a card game for two players.
  • A standard deck of 52 cards is dealt so that both players have 26 cards.
  • During each round of play (or "battle"), both players play a card from the top of their hand face up.
  • The player who plays the card of the higher rank wins both cards and places them at the bottom of his stack of cards.
  • If both cards played are of the same rank, then we have a WAR! Both players play three additional cards face down and then one more card face up.
  • The player who wins the war by playing the higher card wins all ten cards.
  • If the ranks are still the same, additional wars are played until one player wins the turn.
  • If either player runs out of cards to play, he loses the game.

Sample output might look like this:

player 1 plays Card is 9 of Clubs

player 2 plays Card is Ace of Diamonds

player 2 wins the round

player 1 plays Card is 10 of Diamonds

player 2 plays Card is Ace of Hearts

player 2 wins the round

player 1 plays Card is 7 of Clubs

player 2 plays Card is 6 of Hearts

player 1 wins the round

player 1 plays Card is 9 of Hearts

player 2 plays Card is 9 of Clubs

WAR TIME!

war card for player1 Card is xx

war card for player2 Card is xx

war card for player1 Card is xx

war card for player2 Card is xx

war card for player1 Card is xx

war card for player2 Card is xx

war card for player1 Card is 7 of Clubs

war card for player2 Card is 10 of Diamonds

player 2 wins the war round

player 1 plays Card is 6 of Hearts

player 2 plays Card is Ace of Hearts

player 2 wins the round

game over

player 2 wins the game


You already have a Deck Class and a Card Class. You can reuse them. However, you must make some changes and additions:

  • You must use enum for your ranks and suits
  • You must create a new class for a hand – each player has a hand that has a variable number of cards. Is a hand like a deck? Is there a possibility for inheritance? Or is it best to create a new class?

Your menu should look like this:

  1. Create new deck
  2. Shuffle deck
  3. Show deck
  4. Play War
  5. Exit

When option 4 is selected, you will start the War game. The program will ask the user for the maximum battle number. This will allow the game to stop in case it goes on too long. This will be in integer. Then next thing you will do is deal 26 cards to player 1 and 26 cards to player 2. Then you will show all the cards for each player. Then you will pause and ask the user to press any key to continue.

The game of war will play out as described above. Each time the players compare a card, it is called a battle. If the Max Battle Number is reached – the game stops and both players show all of their cards. If one player collects all the cards before the Max Battle Number is reached, then that player is declared the winner and the program asks the user to press any key to continue. Then the program returns to the main menu.

In: Computer Science

Capturing an Emerging Market The growing racial and ethnic diversity of the US population seems to...

Capturing an Emerging Market

The growing racial and ethnic diversity of the US population seems to
overwhelm some healthcare providers. Health systems that are used to
providing one-size-fits-all care are now faced with patient populations
that are increasingly heterogeneous and whose members often have
perspectives on healthcare different from those of the providers. However,

if a provider can adapt to the needs of this growing market, a lot of
opportunities will present themselves.
    For example, promoting the opening of a birthing center to a community

is challenging enough, but it becomes even more daunting when
the residents speak 40 different languages.One hospital in an urban
midwestern community not only took on this challenge but also turned
it into one of the hospital's greatest marketing successes.
    Thirteen hospitals within a ten-mile radius of the primary service
area provided obstetrics services to the community. An estimated
24,274 women of childbearing age lived in the primary service area.
Another 134,055 women of childbearing age lived in the secondary
service area. A service area analysis identified the following ethnic
breakdown for the population: 72.2 percent white (including 18.9 per
cent Hispanic),11.2 percent Asian or Pacific lslander, 9.1 percent other,
7.0 percent African American, and 0.5 percent American Indian.The
percentage of Asians in the service area was quadruple the state and
national averages, and the percentage of Hispanics was double the
state and national figures.The racial and ethnic breakdown, however,
failed to convey the unique features of the service area. Among the
white population, recent immigrants from the Middle East and Eastern
Europe supplemented the Hispanic population.The Asian immigrants
came predominantly from Korea, Pakistan, India, and the Philippines.
    To more narrowly define the major ethnic breakdown of the childbearing market, obstetrics discharge data by physician were reviewed.
Physicians were asked to identify the major ethnic and cultural groups
of their patients.The following major groups using obstetrics services

were identified: Indian, Pakistani, and Middle Eastern (29 percent);
Korean(23 percent); Hispanic (13 percent); and Assyrian (6 percent).
Research into cultural considerations for these groups identified a
significant subgroup of Indian, Pakistani, and Middle Eastern patients
who were Mustim. On the basis of this information, four target ethnic

markets were defined: Korean, Middle Eastern, Muslim (Middle Eastern, Pakistani, and Indian), and Hispanic (Mexican, Puerto Rican, and Cuban).
    To increase market share for obstetrics services at the hospital,
marketing strategies were developed to raise awareness of the new
family birthing center within these ethnic communities. To achieve
this goal in a highly competitive market, the following objectives were
adopted:
1. Differentiate services from those of competitors by means of
· graphic images and color coding for directional signage in the facility;
· multilingual and multicultural physicians (men and women), nursing staff,                    

cultural liaisons, and interpreters;
· culturally diverse artwork throughout the facility;
· large state-of-the-art labor/delivery/recovery/postpartum rooms with hot tubs

and space for family members;
· ethnic menus, along with microwaves and refrigerators for patient use;
· childbirth preparation classes taught in Spanish, Korean, Arabic, and Hindi by

native speakers;
· a family-centered program of care;
· superior quality measures.

2. Enhance the hospital's marketing presence through
· creating a new maternity services brand for the hospital, featuring the graphic   

image of infant footprints;
· aggressively marketing and promoting the new features and benefits of the

hospital's maternity services; and
· reinforcing the hospital's unique position as a provider of culturally sensitive,

family-centered maternity care.

3. On the basis of these objectives, the following marketing initiatives were

identified for the hospital:

· Tailor market research to build knowledge and understanding
of each ethnic group.

· Implement culturally appropriate advertising campaigns for
each targeted group, including native-language posters/fliers,
newspaper ads, billboards, and radio ads.

· Develop a comprehensive guide to hospital services in
Spanish, Arabic, Hindi, and Korean.

· Launch aggressive media-relations efforts to promote the
hospital's unique commitment to meeting the needs of its
“neighborhood of nations.”

· Implement a comprehensive community-relations program.

· Tailor a series of grand-opening events to each ethnic market,
with ethnic menus, appropriate dignitaries, and entertainment.

· Develop a strong community presence for customized ethnic
maternity services, with photos of the physical space and
amenities in the hospital newsletter distributed to 125,000
households in the primary and secondary service areas.

· Distribute fliers to the religious institutions in the target market.

Source: Adapted from Noonan and Savolaine (2001).


Case Study Discussion Questions

1. In what ways did the hospital disseminate its message to the
community(rather than relying on impersonal advertising)?
2. What indicators could the hospital have used to evaluate the
impact of these marketing efforts?

In: Nursing

Trade in Hormone-Treated Beef In the 1970s, scientists discovered how to synthesize certain hormones and use...

Trade in Hormone-Treated Beef

In the 1970s, scientists discovered how to synthesize certain hormones and use them to accelerate the growth rate of livestock animals, reduce the fat content of meat, and increase milk production. Bovine somatotropin (BST), a growth hormone produced by cattle, was first synthesized by the biotechnology firm Genentech. Injections of BST could be used to supplement an animal’s own hormone production and increase its growth rate. These hormones soon became popular among farmers, who found that they could cut costs and help satisfy consumer demands for leaner meat. Although these hormones occurred naturally in animals, consumer groups in several countries soon raised concerns about the practice. They argued that the use of hormone supplements was unnatural and that the health consequences of consuming hormone-treated meat were unknown but might include hormonal irregularities and cancer. The European Union responded to these concerns in 1989 by banning the use of growth-promoting hormones in the production of livestock and the importation of hormone-treated meat. The ban was controversial because a reasonable consensus existed among scientists that the hormones posed no health risk. Although the EU banned hormone-treated meat, many other countries did not, including big meat-producing countries such as Australia, Canada, New Zealand, and the United States. The use of hormones soon became widespread in these countries. According to trade officials outside the EU, the European ban constituted an unfair restraint on trade. As a result of this ban, exports of meat to the EU fell. For example, U.S. red meat exports to the EU declined from $231 million in 1988 to $98 million in 1994. The complaints of meat exporters were bolstered in 1995 when Codex Aliment Arius, the international food standards body of the UN’s Food and Agriculture Organization and the World Health Organization, approved the use of growth hormones. In making this decision, Codex reviewed the scientific literature and found no evidence of a link between the consumption of hormone- treated meat and human health problems, such as cancer. Fortified by such decisions, in 1995 the United States pressed the EU to drop the import ban on hormone-treated beef. The EU refused, citing “consumer concerns about food safety.” In response, both Canada and the United States in- dependently filed formal complaints with the World Trade Organization. The United States was joined in its complaint by a number of other countries, including Australia and New Zealand. The WTO created a trade panel of three independent experts. After reviewing evidence and hearing from a range of experts and representatives of both parties, the panel in May 1997 ruled that the EU ban on hormone-treated beef was illegal because it had no scientific justification. The EU immediately indicated it would appeal the finding to the WTO court of appeals. The WTO court heard the appeal in November 1997 and in February 1998 agreed with the findings of the trade panel that the EU had not presented any scientific evidence to justify the hormone ban. This ruling left the EU in a difficult position. Legally, the EU had to lift the ban or face punitive sanctions, but the ban had wide public support in Europe. The EU feared that lifting the ban could produce a consumer backlash. Instead the EU did nothing, so in February 1999 the United States asked the WTO for permission to impose punitive sanctions on the EU. The WTO responded by allowing the United States to impose punitive tariffs valued at $120 million on EU exports to the United States. The EU decided to accept these tariffs rather than lift the ban on hormone-treated beef, and as of 2010, the ban and punitive tariffs were still in place.

Read the Country Focus “Trade in Hormone-Treated Beef.” Applying the facts of the case, answer the following questions.

a) What was the main argument that the European Union used to ban importations of hormone-treated beef? Who benefited from this ban and who did not benefit from this ban? Explain how for each case.

b) What action did the European Union take when it realized that it could face punitive actions for imposing this ban? In your opinion, what were the advantages and disadvantages of taking this action?

c)   Based on the result of the EU-U.S. trade negotiations over hormone-, treated beef, what observations can you make about the realities of

international trade in terms of national sovereignty versus national benefit? Explain your answer.

In: Economics

Coca-Cola is a well-established consumer products company with a strong position in the global market. The...

Coca-Cola is a well-established consumer products company with a strong position in the global market. The sales of its core soda products have remained relatively stable for decades, yet the company has continued to grow and has remained extremely profitable. Discuss coca-Cola's history in light of the statement that " generating a steady stream of new products to market is extremely important to competitiveness." Does Coca Cola's success disprove that statement? Is the company an exception to the rule or an example of its application?

Provide 300 words in response to this discussion posting:

When operating within a significantly competitive global market, the ability for a company to adapt and respond to customer demands can be incredibly challenging in a market such as the food and beverages industry. The Coca Cola Company has been a global leader in the industry through sales of their traditional soda brand, but offer different products including seltzer water, tea and juices. Having been producing their standard Coca-Cola brand of soda since the 1800’s during a time when there were few alternatives, generations of consumers have been familiar with the company and the brand, some of which have grown up with the drinks and consequently developed brand loyalty to the products. The consistency with which Coca-Cola has produced their drinks, with a keen focus on marketing to local country’s specific tastes and habits, has helped maintain a strong and consistent demand for their products.

Contrasting to the comment on sustainability and level of competitiveness are tied in with generating new products, Coca Cola’s success is not inherently a disproval of that notion but shows how success can be attained through strong brand recognition, targeted and strategic marketing, and brand appeal. While competitors, including their largest and most direct competitor PepsiCo, identify new brands and food types to offer consumers, Coca Cola’s sodas and ancillary products are valuable enough to their customers to achieve consistent global success. Their core products are strong enough on their own to continue marketing without the need to constantly innovate for the sake of innovation. One innovation of the company’s that is typically noted as a disaster in marketing was the introduction of New Coke in the 1980’s, which was a re-branding of the product with a new flavor of soda to resemble their PepsiCo competitor’s flavors. The new drink misunderstood what customers enjoyed about their standard Coca-Cola soda: they either preferred the taste of normal Coke compared to Pepsi, or already had Pepsi and did not need another identical-tasting flavor. Coca-Cola’s competitive advantage was simply offering a high-quality and consistent soda.

Through their consistency, Coca-Cola can maximize their productivity. By creating a similar set of products for over a century, the firm can generate novel cost-savings methods that produce goods quicker and at a cheaper cost, save costs in transportation spend, and reach consumers for consistent brand awareness through novel marketing tactics. Coca Cola’s access to consistent revenue flows allows them to develop new methods to maintain a high-efficiency operation, minimizing workload to produce the maximum amount of product as possible. When considering the need to supply products globally, partnering with distributors and transportation firms that can maximize that efficiency can also help to reduce costs of transporting freight to and from warehouses. The sheer volume of production that the Coca Cola Company can produce helps them to leverage competitive packages from vendors, which will help generate additional savings by partnering with strategic business partners to optimize their transportation network. Smaller firms that are do not have the luxury of such significant brand recognition would struggle to compete against a company with the optimization Coca Cola has achieved in producing their drinks.

I believe, in typical market conditions, that a company should have to react and identify new opportunities to address the demands of a rapidly changing and growing marketplace. To remain relevant in any industry, few firms can sustain consistent growth without a flagship product that has seemingly transcended consumer “wants” to a “need” like Coca Cola enjoys. With strong brand identity and loyalty, it would be very difficult and take years of regression for Coca-Cola Company to experience a significant loss of market share to an up-and-coming competitor and would most likely have the capital to acquire that firm prior to losing too much market share to them. The ability to offer a very specific but very valuable core group of products allows the Coca Cola Company to focus their efforts on maximizing efficiencies and reducing overall costs on the products they create, rather than spending resources to develop or identify new offerings that may jeopardize their productivity or alienate their core consumer.

In: Economics

The nurse is beginning a 12-hour shift on the medical/surgical unit of the local children’s hospital....

The nurse is beginning a 12-hour shift on the medical/surgical unit of the local children’s hospital. He has four patients assigned to him: a 6-month-old infant boy, a 4-year-old preschool girl, a 7-year-old girl, and a 12-year-old girl. The nurse has assessed each child and is referring to the EMAR for each patient’s medications.

a. What are some of the factors the nurse should consider regarding the distribution of medication in children’s bodies?

b. What are the guidelines the nurse should utilize to ensure that the medication doses prescribed are accurate?

c. What are some of the different routes available to the nurse to administer medications to children?

2. The nurse on a medical/surgical unit of a children’s hospital has just received orders to administer an antibiotic via IV infusion and then to begin administering total parenteral nutrition (TPN) via IV infusion.

a. What are the rights of pediatric medication administration?

b. What are the various types of IV devices available to the nurse to administer medications/solutions?

c. What are the techniques to properly administer TPN to children?

3. Fillipia, a 3-year-old, is admitted to your unit with fever and lethargy. She is 36 pounds and 40 inches tall. Her current temperature is 101.8°F, HR 110, RR 22. Her orders include Rocephin 525 mg IM every 12 hours and acetaminophen 2 teaspoons PO every 4 hours as needed for temperature greater than 101.5°F. The safe dose range for Rocephin is 50–75 mg/kg/day and acetaminophen is 15 mg/kg/dose. The concentration for Rocephin is 350 mg/mL and acetaminophen is 160 mg/5mL.

a. Is this Rocephin dose safe? (Show your work)

b. How would you administer this medication?

c. Is this acetaminophen dose safe? (Show your work)

d. What would be your next steps?

In: Nursing

You have been assigned to compute the income tax provision for Motown Memories Inc. (MM) as...

You have been assigned to compute the income tax provision for Motown Memories Inc. (MM) as of December 31, 2019. The company’s income statement for 2019 is provided below: (Leave no answer blank. Enter zero if applicable.)

Motown Memories Inc.
Statement of Operations
at December 31, 2019
Net sales $ 50,000,000
Cost of sales 28,000,000
Gross profit $ 22,000,000
Compensation $ 2,000,000
Selling expenses 1,500,000
Depreciation and amortization 4,000,000
Other expenses 500,000
Total operating expenses $ 8,000,000
Income from operations $ 14,000,000
Interest and other income 1,000,000
Income before income taxes $ 15,000,000


You identified the following permanent differences:

Interest income from municipal bonds $ 50,000
Nondeductible meals $ 20,000
Nondeductible fines $ 5,000

MM prepared the following schedule of temporary differences from the beginning of the year to the end of the year:

Motown Memories Inc.
Temporary Difference Scheduling Template
Taxable
Temporary Differences
Beginning
Deferred
Taxes
Current
Year
Change
EOY
Cumulative
T/D
EOY
Deferred
Taxes
Accumulated depreciation $(1,680,000) $(1,000,000) $(9,000,000) $(1,890,000)
Deductible
Temporary Differences
BOY Deferred
Taxes
Current
Year
Change
EOY
Cumulative
T/D
EOY
Deferred
Taxes
Allowance for bad debts $42,000 $50,000 $250,000 $52,500
Reserve for warranties 21,000 20,000 120,000 25,200
Inventory §263A adjustment 50,400 60,000 300,000 63,000
Deferred compensation 10,500 10,000 60,000 12,600
Accrued pension liabilities 630,000 250,000 3,250,000 682,500
Total $753,900 $390,000 $3,980,000 $835,800

Required:

  1. Compute MM’s current income tax expense or benefit for 2019.
  2. Compute MM's deferred income tax expense or benefit for 2019.
  3. Prepare a reconciliation of MM’s total income tax provision with its hypothetical income tax expense of 21% in both dollars and rates.

In: Accounting

DC a 5-year-old child was admitted to the ER because of bleeding episode. He fell from...

DC a 5-year-old child was admitted to the ER because of bleeding episode. He fell from the swing while playing and had a 3-inch gash on his forehead which won’t stop bleeding even when ice was applied on it. This is the first time he had an accident. When the doctor came, he asked the parents if they have a history of bleeding in the family but both parents cannot remember any. The doctor said DC probably has a bleeding condition that could be hereditary. The doctor asked the mother specifically if she has any male relative with a similar condition. Both parents are curious why specifically the mother was the one being asked.

         DC’s mother recalls that as a growing up boy, DC would frequently have “dark marks” on his skin which she thought are stains from dirt when he plays. He would also have bleeding gums every now and then but she thought it was due to his tooth decay. DC is also fond of picking on his nose which would bleed when poked. Lately, they noticed that he limps and when asked why, Lately, JS says his knees hurts and it was observed to be swollen already .DC will have to probably be admitted for immediate transfusion of a clotting factor that was quite expensive.

1. Based on the symptoms presented by DC, what medical condition are you suspecting that he has? Defend your answer by enumerating the proofs from the scenario? Based on the symptoms presented by DC, what medical condition are you suspecting that he has? Defend your answer by enumerating the proofs from the scenario?

2. If the doctor said the condition could be hereditary, how did DC get it? What are the chances of having a sibling with the same condition as he has? Explain. What do you call this genetic pattern of transmission?

3. What would be the cause of his knee pains? What is this condition and why does this happen?

In: Nursing

You are a new graduate registered nurse working in the paediatric ward of your local hospital....

You are a new graduate registered nurse working in the paediatric ward of your local hospital.

Sam Nicolaides is a nine-year-old boy who until recently has been in good health. Sam lives with his mother and father and two siblings. Following a respiratory virus a few weeks ago he has been slow to recover, lacking in his usual energy. He has been hungry and thirsty all the time, and has recently begun wetting the bed, which he has not done for many years.

Sam presented to the Accident and Emergency department two day ago with nausea, abdominal pain and feeling generally unwell. His observations taken on admission were:

Blood pressure 80/50mmHG, pulse 140, respiratory rate 28 deep and sighing with an unusual sweet smell to the breath, oxygen saturation 100%, temperature 37.2 degrees Celsius. Urinalysis SG1025, pH 5, sugar++++ ketones+++ no other abnormalities. BGL 28mmol/L.

A medical diagnosis of Diabetes type 1 with keto-acidosis was made.

Question 1.

Briefly explain the pathophysiology causing the following symptoms Sam was experiencing on admission:

  1. Glycosuria
  2. Thirst
  3. Ketonuria
  4. Kussmaul breathing

Question 2.

List four (4) ongoing nursing assessments, other than vital signs, that will be required to monitor Sam’s fluid status and ensure safe fluid replacement therapy over the next 48 hours.

Question 3.  

Explain the concept of family centred care and why this is important to the physical and psychological care for Sam.

Question 4.

For the ongoing management of type 1 diabetes, current best practice recommends an intensive insulin therapy regime called multiple dose insulin (MDI) or basal/bolus regime. Explain:

  1. What this insulin regime involves and
  2. Discuss why this is considered best practice management for type 1 diabetes.

Question 5.

Explain what the HbA1c test is and why it is important in the management of patients with diabetes.

In: Nursing

1.   You purchased 10 shares of Resorts, Inc. stock at a price of $40 a share...

1.   You purchased 10 shares of Resorts, Inc. stock at a price of $40 a share exactly one year ago. You have received dividends totaling $2 a share. Today, you sold your shares at a price of $50 a share. What is your total dollar return on this investment?
       (a) $10       (b) $12       (c) $50       (d) $80 (e) $120
2.   Big Boy Equipment, Inc. is expected to pay an annual dividend in the amount of $1.5 a share next year. This dividend is expected to increase by 2 percent annually. The company’s stock is currently selling for $30 per share. What is the cost of equity?   (a) 6.50 percent   (b) 7 percent   (c) 7.5 percent   (d)8.0 percent (e)8.5 percent
3.   The Goodie Barn has a 6 percent coupon bond outstanding that matures in 2 years. The bond pays interest semiannually. What is the market price per bond if the face value is $1,000 and the yield to maturity is 4 percent?
   (a)$1000     (b)$1023.31    (c)$1038.08    (d)$1054.24 (e)$1066.51

Use the following information to answer questions 4 through 5.
You are analyzing a proposed project and have compiled the following information:
                                   Year   Cash flow
                                  0   -$1200
                                  1   $ 800
                                   2   $ 200
                                   3   $ 300
                       IRR: 5.1%
                       Required return:10%  

4.   Should the project be accepted based on the internal rate of return (IRR)? Why or why not?
   (a) yes; The project IRR is smaller than the required return.
       (b) yes; The project IRR is different from the required return.
   (c) yes; The required return is positive.
       (d) no; The project IRR is less than the required return.
   (e) no; The project IRR is greater than zero.

5.   What is the profitability index (PI)?
               (a) 0.93 (b) 0.97 (c) 0.99 (d) 1 (e)1.03


In: Finance

Question 1 of 4 A family plans to have 3 children. For each birth, assume that...

Question 1 of 4

A family plans to have 3 children. For each birth, assume that the probability of a boy is the same as the probability of a girl.

What is the probability that they will have three children of the same gender?

A- 0.5

B- 0.25

C- 0.375

D-0.125

E-none of these

Question 2 of 4

A person in a casino decides to play blackjack until he loses a game, but he will not play more than 3 games. Let L denote a loss and W denote a win.

What is the sample space for this random experiment?

A- S = {LLL, LLW, LWL, LWW, WLL, WLW, WWL, WWW}

B- S = {L, LW, LLW, LLL}

C- S = {L, LL, LLL}

D- S = {L, WL, WWL, WWW}

F- S = {L, WL, WWL}

Question 3 of 4

A person in a casino decides to play 3 games of blackjack. Let L denote a loss and W denote a win. Define the event A as "the person loses at least one game of blackjack."

What are the possible outcomes for this event?

A- {LLL, LLW, LWL, LWW, WLL, WLW, WWL}

B- {LLL, LLW, LWL, LWW, WLL, WLW, WWL, WWW}

C-{LWW, WLW, WWL}

D- {L, WL, WWL}

E-{L, LL, LLL}

Question 4 of 4

Four students attempt to register online at the same time for an Introductory Statistics class that is full. Two are on the football team and two are on the basketball team. They are put on a wait list. Prior to the start of the semester, two enrolled students drop the course, so the professor randomly selects two of the four wait list students and gives them seats in the class.

What is the probability that both students selected play the same sport?

A, 1/12

B, 1/6

C, 1/3

C, 1/2

D, It is impossible to tell because the outcomes are not equally likely.

In: Statistics and Probability