Questions
Mrs. Ayesha Said is a 39-year-old Muslim Arab housewife and mother of six who immigrated to...

Mrs. Ayesha Said is a 39-year-old Muslim Arab housewife and mother of six who immigrated to the United States from a rural town in southern Iraq 2 years ago. Her mother-in-law and her husband, Mr. Ahmed Said, accompanied her to the United States as participants in a post–Gulf War resettlement program, after they spent some time in a Saudi Arabian refugee camp. Their relocation was coordinated by a local international institution that provided an array of services for finding employment, establishing a household, enrolling the children in public schools, and applying for federal aid programs.

Mr. Ahmed, who completed the equivalent of high school, works in a local plastics factory. He speaks some English. He plans to attend an English-language class held at the factory for its many Iraqi employees. Mrs. Ayesha, who has very little formal schooling, spends her day cooking and caring for her children and spouse, with the assistance of her mother-in-law. She leaves their home, a three-bedroom upper flat in a poor area of the city, only when she accompanies her husband shopping or when they attend gatherings at the local Islamic center. These events are quite enjoyable because most of those using the center are also recently arrived Iraqi immigrants. She also socializes with other Iraqi women by telephone. Except for interactions with the American personnel at the institute, Mr. Ahmed and Mrs. Ayesha Said remain quite isolated from American society. They have discussed moving to Detroit because of its large Arab community.

Four of the Said children attend public elementary schools, participating in the English as a Second Language (ESL) program. Mr. Ahmed and Mrs. Ayesha are dismayed by their children’s rapid acculturation. Although Muslims do not practice holidays such as Halloween, Christmas, Valentine’s Day, and Easter, their children plead to participate in these school-related activities.

Mrs. Ayesha is being admitted to the surgical unit after a modified radical mastectomy to treat breast cancer. According to the physician’s notes, she discovered a “lump that didn’t go away” about 6 months ago while breast-feeding her youngest child. She delayed seeking care, hoping that inshallah, the lump would vanish. Access to care was also limited by Mrs. Ayesha’s preference for a female physician and her family’s financial constraints—that is, finding a female surgeon willing to treat a patient with limited financial means. Her past medical history includes measles, dental problems, headache, and a reproductive history of seven pregnancies. One child, born prematurely, died soon after birth. As you enter the room, you see Mrs. Ayesha dozing. Her husband, mother-in-law, and a family friend, who speaks English and Arabic and acts as the translator, are at her bedside.

  1. Describe Arab Americans with respect to religion, education, occupation, income, and English-language skills. Compare the Said family with Arab Americans as a group.

In: Nursing

600,000 students in 79 countries take a PISA test every three years to evaluate their learning...

600,000 students in 79 countries take a PISA test every three years to evaluate their learning in reading, math, and science. Students in the Beijing-Shanghai-Jiangsu-Zhejiang regions in China scored the highest average scores in all three subjects in 2018. Canada ranked around 12th overall but has had steadily declining scores in math and science. We have data on average math scores and characteristics of 500 school districts across Canada. This problem asks you to build up a regression model to look for factors that affect average math test scores in various school districts in Canada.

I run a basic regression equation that explains math scores (SCORE) as a function of:
1. STR = the student teacher ratio. (number of students per teacher)
2. SPEND = government spending per student in the school district in dollars per student.
3. HIESL= a dummy variable=1 if the percentage of students learning English as a new language is above 20% and =0 if it is below 20%.
The regression also includes the usual constant term.

There is a categorical variable called PROVINCE for the province of the school district. This variable =1 for Ontario, =2 for Quebec, =3 for Alberta, and =4 for British Columbia.

There is also a categorical variable called INCOME which is the average per capita income of households in the school district. INCOME = 1 if the district has average per capital income below $40000, =2 if the district has per capita income between $40000 and $60000, =3 if the district has per capita income >= $60000.

How do I add PROVINCE and INCOME into my regression model? Which specification is correct?

  • A.

    SCORE = b2STR + b3SPEND + b4HIESL + b5ON + b6QC + b7BC + b8AB + b9INC1 + b10INC2 + b11INC3

    where
    ON = 1 if the district is in Ontario and 0 otherwise
    QC = 1 if the district is in Quebec and 0 otherwise
    BC = 1 if the district is in BC and 0 otherwise
    AB = 1 if the district is in Alberta and 0 otherwise
    INC1 = 1 if the district is the low income range and 0 otherwise
    INC2 = 1 if the district is the middle income range and 0 otherwise
    INC3 = 1 if the district is the high income range and 0 otherwise

  • B.

    SCORE = b1 +b2STR + b3SPEND + b4HIESL + b5PROVINCE + b6INCOME

    where PROVINCE takes values 1 to 4
    and INCOME takes values 1 to 3.

  • C.

    SCORE = b1 + b2STR + b3SPEND + b4HIESL +  b5ON + b6QC + b7BC + b8AB + b9INC1 + b10INC2 + b11INC3

    where
    ON = 1 if the district is in Ontario and 0 otherwise
    QC = 1 if the district is in Quebec and 0 otherwise
    BC = 1 if the district is in BC and 0 otherwise
    AB = 1 if the district is in Alberta and 0 otherwise
    INC1 = 1 if the district is the low income range and 0 otherwise
    INC2 = 1 if the district is the middle income range and 0 otherwise
    INC3 = 1 if the district is the high income range and 0 otherwise

  • D.

    SCORE = b1 +b2STR + b3SPEND + b4HIESL + b5ON + b5QC + b6BC + b7INC2 + b8INC3

    where
    ON = 1 if the district is in Ontario and 0 otherwise
    QC = 1 if the district is in Quebec and 0 otherwise
    BC = 1 if the district is in BC and 0 otherwise
    INC2 = 1 if the district is the middle income range and 0 otherwise
    INC3 = 1 if the district is the high income range and 0 otherwise

  • E.

    SCORE = b1 +b2STR + b3SPEND + b4HIESL + b5ON + b6QC + b7BC + b8AB + b7INC2 + b8INC3

    where
    ON = 1 if the district is in Ontario and 0 otherwise
    QC = 1 if the district is in Quebec and 0 otherwise
    BC = 1 if the district is in BC and 0 otherwise
    AB = 1 if the district is in Alberta and 0 otherwise
    INC2 = 1 if the district is the middle income range and 0 otherwise
    INC3 = 1 if the district is the high income range and 0 otherwise

In: Economics

HUAWEI’S INTERNATIONALIZATION STRATEGY INTRODUCTION In October 2016, Shenzhen-based networking and telecommunications equipment and services company Huawei...

HUAWEI’S INTERNATIONALIZATION STRATEGY

INTRODUCTION

In October 2016, Shenzhen-based networking and telecommunications equipment and services company Huawei Technologies Ltd. (Huawei) unveiled its 14-port and 3-D Hexa-beam antennas to address the challenges associated with the 4.5G and 5G era at the 5th Annual Global Antenna and Active Antenna Unit Forum held in Paris. Commenting on the launch, Zhang Jiayi, president of Huawei’s antenna business unit, said, “Huawei focuses on satisfying the requirements of operators in the MBB (mobile broadband) era.”

Founded in 1987 in Shenzhen by Ren Zhengfei (Ren), a former military engineer in the People’s Liberation Army (PLA) – the unified organization of the armed forces of China, Huawei started as a sales agent for a Hong Kong-based company selling private branch exchange (PBX) switches. Soon, the company innovated and started selling its own PBX switches. Having established its domination over the Chinese telecommunications market, the company entered the global markets of Russia and Africa in 1996 and later mature The origin of Huawei Technologies Ltd. (Huawei) dated back to 1987 when Ren Zhengfei (Ren), a former military engineer in the People’s Liberation Army (PLA), founded the company in Shenzhen with the aim of making it the backbone of China’s communications industry.

The company started as a sales agent for a Hong Kong company selling private branch exchange (PBX) switches with an initial investment of US$ 3400. By 1990, it had acquired enough resources to open its first research laboratory. In the same year, i.e. 1990, the company made its own PBX and started selling the switches to hotel networks at prices lower than those of imported devices

HUAWEI’S INTERNATIONALIZATION STRATEGY

In the mid-1990s, the Chinese domestic telecommunications networking equipment market was dominated by giant international telecom equipment companies. Their dominance led to Huawei having a relatively weaker position in China. Ren believed that the Chinese telecommunications market was the largest and among the most open markets in the world attracting global telecommunication giants to the country. As a result, he felt, “The best food has all been eaten up by the global giants and what we can do is to have those leftovers.” This prompted Huawei to consider entering international markets. Commenting on its international expansion, Ren, said, “We were forced to go into the international market for our very survival.”

CHALLENGES IN THE GLOBAL TELECOM MARKETS

Though Huawei achieved huge success in several global markets, the US was a different story altogether. Despite bidding several times since the company first entered America, Huawei failed to win a single big contract from top-tier carriers such as AT&T, T-Mobile, and Verizon. The US telecom companies had had long relationships with home-grown suppliers such as Lucent, Motorola, and Cisco. Moreover, the US telecom majors felt that while the telecom equipment manufactured by Huawei was fine for emerging markets, it was not reliable or suitable for the 24/7 service required by networks in the US. Though by 2011, Huawei had developed some of the most innovative and fastest equipment in the telecom industry, it continued to face resistance in the US.

THE CHALLENGES CONTINUE...

While Huawei was making several efforts to crack the global telecom markets, in July 2015, Malcolm Turnbull, Communications Minister, Australia, stated that amidst security threats, telecom companies in Australia had been barred from using equipment from Huawei and ZTE. This meant that Huawei would lose its existing business in Australia since it provided equipment for consumer devices and backend networks for Vodafone and Optus. There could also be more trouble in store for Huawei with the Pentagon and the US military announcing plans in October 2015 to ban the use of Huawei equipment.....

LOOKING AHEAD

In November 2016, when the US telecom market announced its plans to build the nation’s 5G wireless network, Huawei was also gearing up to roll out its 5G wireless network by 2020. Though Huawei had earlier stated that it had given up on the US market, Ren hinted that the company had not given up on the country permanently and that it planned to make a “glorious” return to the US. However, Huawei stated that it would not focus on the US market currently but would concentrate on other global markets. According to Ken Hu (Hu), Huawei’s CEO-in-rotation, “For our 5G strategy, we currently focus on markets like China and Japan among others. In the US right now, we’re not making significant progress and we don’t have big plans for that market.”

Case study question

In the context of Huawei discuss the strategies for having a global footprint which is followed by companies in an International Business setting.

In: Operations Management

Spirits were high at the monthly meeting of the top management of Waterways. Installation was proceeding...

Spirits were high at the monthly meeting of the top management of Waterways. Installation was proceeding nicely on the 10 jobs for the city, and the company had just received confirmation that the local school board had accepted its bid to install irrigation systems in 25 school playgrounds. Unfortunately, not everyone was celebrating. Lee Williams, the vice-president of the installation and training division, was troubled. He has been supervising the city jobs and he believes the current system of assigning overhead costs to the jobs does not accurately reflect the actual cost of overhead.

“Several major things have changed since we set our overhead rate at 120% of direct labour cost,” Lee explained. “I’ve noticed that the new systems are requiring a lot of the more expensive glue and they were designed to accommodate only titanium fasteners. We are using special packaging to transport the systems to the sites, not to mention the new heavy equipment we had to purchase to prepare the ground for the install.”

Madison Tremblay, vice-president of sales and marketing, was quick to respond. “I can’t believe that you’re suggesting there’s something wrong with our bids,” he retorted. He was visibly annoyed. “This is the first time in several years that our sales group has been successful in increasing our market share,” he continued, “and now you want to mess with the pricing! I want you to explain that to the salespeople who have just received their first bonus commission cheques in a very long time.”

Ben Clark, who designed the new system, agreed with Madison, suggesting that maybe the problem was not with the cost, but was more likely cost control.

Their accountant, Jordan Leigh, did not like conflict. “I have an idea,” he said. “We have been investigating using a new costing system in our manufacturing plant called activity-based costing, or ABC. ABC is supposed to lead to more accurate overhead costing and it provides a better way to control overhead costs. With a little work, I think we could adapt it to our installation services.” When he off ered to do an analysis and bring his recommendations back to the next management meeting, the rest of the group agreed to wait for the results before making any changes.

Jordan’s first action was to identify and classify all the activities that consume resources during this specific type of installation into a number of cost pools, and then determine the overhead costs that should be assigned to each cost pool. At the same time, he determined a cost driver for each pool. The following table shows these cost pools along with the estimated overhead allocation to each one.

Activity Cost Pools Cost Drivers Estimated Overhead Estimated Use
per Activity
Supervision, security, maintenance Number of workdays $503,200 1,700
Liability insurance Number of employees 94,400 800
Equipment costs Hours of operation 78,660 11,400
Indirect supplies and delivery Length in metres 234,000 234,000
Employee benefits Direct labour cost 136,000 $544,000
$1,046,260


Then, based on the information used to prepare the bids, Jordan determined that each of the 25 projects for the school board would require the following overhead activities.

Activity Cost Pools Cost Drivers Estimated Use per Job
Supervision, security, maintenance Number of workdays 28
Liability insurance Number of employees 4
Equipment costs Hours of operation 260
Indirect supplies and delivery Length in metres 3,100
Employee benefits Direct labour cost $12,000


The material costs for each project were expected to be $14,100.

(a) Calculate the estimated cost of this type of installation using both the traditional method and activity-based costing. (Round overhead rate per hour to 2 decimal places, e.g. 52.75. Round overhead rate for employee benefits to 0 decimal places, e.g. 15%. Round final answers to 0 decimal places, e.g. 52.)

Traditional Method $
Activity-based Costing $

In: Accounting

Instructions: 1. Read the scenario regarding the email from an employee at The Super Market. 2....

Instructions:

1. Read the scenario regarding the email from an employee at The Super Market.

2. Reply to the email using an indirect strategy

• Inform Caitlin of the policy change.

• Explain how it will affect her should she choose to return in September.

• Although you must refuse her request, let her know that you would like her to stay.

• Use the Outline sheet to hep you structure your reply.

3. Compose your new email in a Word document.

4. Submit the assignment to the Workshop 2 Submission Folder in eConestoga.

Scenario

Caitlin Kelly has worked as a part-time cashier for six years while attending high school and college. Over those six years, Caitlin has been able to schedule her part-time job around her academic and social life by requesting and getting the shifts she wants.

Caitlin has been offered a full-time summer job with a local marketing firm. She also wants to join the firm’s soccer team, which plays or practices many nights during the week. She has written a message requesting a four-month leave of absence if she cannot work occasionally with irregular shifts.

You have been recently promoted to the role of assistant manager at The Super Market, and the manager has forwarded you Caitlin’s message, asking you to respond to her. The manager, Dominic Ricci, indicated that they would really like to see Caitlin stay over the summer, and if not, return in the fall. However, the manager has asked you to make sure she is aware of the organization’s new policy. The Super Market has instituted a new policy to ease the complexity of scheduling and to provide employees with a stable and consistent schedule. It states that The Super Market will work with part-time employees to develop a regular schedule, where they work the same assigned shifts on the same days and times each week. But once they have their assigned shift, they must keep it.

Unless part-time cashiers are prepared to work the regularly scheduled assigned shifts, they will be asked to resign. Furthermore, employees who quit their job may be rehired if positions become available when they return, but at a lower starting salary. In Caitlin’s case, if she were to quit and return after the summer, in September, she will lose her $19 hourly wage and have to start at a lower rate of $15.00 per hour, if a position is available.

Emails To: [email protected]

From: Caitlin Kelly Date:

Today’s date

Subject: Summer Leave

Hi

I just wanted to let you know that I have gotten an amazing opportunity to work at marketing firm full-time over the summer. Marketing is a career I am considering, so I am really excited about taking the job.

As well, the department asked me to play on their soccer team and they said that we will be practicing or playing many evenings after work. So I might be able to take a few night shifts over the summer. I will know which nights at least a week in advance.

I will be able to return to my regular part-time work in the fall, when school starts again. I have been working at the The Super Market for 6 years now so I was hoping that, if it were possible to work the odd night shift during the summer that would be great. Otherwise, I would like to take a 4-month leave of absence until school starts. Please let me know what is possible.

Thanks,

Caitlin

To: [email protected]

From: [email protected]

Date: Today’s date

Subject: FW: Summer Leave

Can you please respond to Caitlin’s email. We would really love to see her continue working here over the summer, but explain to her the new company policy. See what you can work out with her to accommodate her request. Thanks, Dom

In: Operations Management

In October 1929, the U.S. stock market suddenly crashed after a long period of growth. It...

In October 1929, the U.S. stock market suddenly crashed after a long period of growth. It was the beginning of the Great Depression era with falling incomes and prices that came to a definite end only right before Pearl Harbor, and the start of World War II.

In contrast, in 2001, the dotcom bubble burst, but the economy quickly got back on its feet a few quarters later. In 2007-2008 the US housing market crashed and set off a financial crisis that initially mirrored the great depression. After a few years, however, it became evident that the US economy had escaped such a threat with only a “great recession” rather than a “great depression”.

Discuss one or more of the following prompts:

  • Why did the Great Depression last much longer than the Great Recession?
  • What are the analogies and the differences in the policy responses to these similar shocks? (Distinguish monetary and fiscal policy).
  • Japan in the 1990s and the Euro area in the 2010s were much less successful in responding to the crisis. What do you think explains the difference? Lack of reforms? Monetary policy? Fiscal policy? Explain.

In: Economics

The Eastman Kodak Company, commonly known as Kodak, is an American technology company that concentrates on...

The Eastman Kodak Company, commonly known as Kodak, is an American technology company that concentrates on imaging products, with its historic basis on photography. Kodak began to struggle financially in the late 1990s as a result of the decline in sales of photographic film and its slowness in transitioning to digital photography. In August 2012, Kodak announced the intention to sell its photographic film (excluding motion picture film), commercial scanners and kiosk operations as a measure to emerge from bankruptcy.

Based on the analysis and management of Kodak, discuss with clear reasoning to the FIVE(5) stages of industrial life cycle with clear illustration of an example for each stages.  

In the imaging photography industry, evaluate the five factors that determine an industry’s intensity of competition. Based on this analysis, what are your expectations about the industry’s profitability in the short run (1 or 2 years) and the long run (5 to 10 years)?

If you have RM 1 Millions to invest, would you invest in this company. Perform a further analysis in a structured way to help you make better investment decision.

In: Accounting

A sunscreen company is attempting to improve upon their formula so that it lasts in water...

A sunscreen company is attempting to improve upon their formula so that it lasts in water longer. They have 4 lead scientists who each came up with a different formulas. In order to see if there is a difference in the time the sunscreen lasts the CEO collects a random sample of each of the four sunscreens the data is shown below. Test the claim that at least one sunscreen has a different lifespan in water at a 0.05 level of significance.

Sunscreen A Sunscreen B Sunscreen C Sunscreen D
81 80 39 45
42 31 54 56
88 63 31 59
57 49 59 68
60 63 67 52
60 62 50 85

The hypotheses for this ANOVA test would be:

H0:μA=μB=μC=μDH0:μA=μB=μC=μD

HA:HA: At least one mean is different. (claim)

α=0.05α=0.05

Complete the ANOVA table below: (round answers to 3 decimal places)

SS df MS F p-value
Between
Within

The decision of the test is to:

  • reject H0H0
  • do not reject H0H0

The final conclusion is:

  • There is not enough evidence to support the claim that at least one sunscreen lasts a different amount of time.
  • There is enough evidence to reject the claim that at least one sunscreen lasts a different amount of time.
  • There is enough evidence to support the claim that at least one sunscreen lasts a different amount of time.
  • There is not enough evidence to reject the claim that at least one sunscreen lasts a different amount of time

A school district has four schools, six class in from each school were randomly selected and the number of students in the class were recorded. Test the claim that at least one school has a different class size at a 0.10 level of significance.

School A School B School C School D
42 46 30 34
32 34 37 32
31 42 33 27
44 39 32 25
25 30 35 22
38 48 36 21

The hypotheses for this ANOVA test would be:

H0:μA=μB=μC=μDH0:μA=μB=μC=μD

HA:HA: At least one mean is different. (claim)

α=0.10α=0.10

Complete the ANOVA table below: (round answers to 3 decimal places)

SS df MS F p-value
Between
Within

A sunscreen company is attempting to improve upon their formula so that it lasts in water longer. They have 4 lead scientists who each came up with a different formulas. In order to see if there is a difference in the time the sunscreen lasts the CEO collects a random sample of each of the four sunscreens the data is shown below. Test the claim that at least one sunscreen has a different lifespan in water at a 0.05 level of significance.

Sunscreen A Sunscreen B Sunscreen C Sunscreen D
85 46 36 76
55 69 54 69
41 54 43 76
69 59 65 80
79 31 31 50
72 54 55 84

The hypotheses for this ANOVA test would be:

H0:μA=μB=μC=μDH0:μA=μB=μC=μD

HA:HA: At least one mean is different. (claim)

α=0.05α=0.05

Complete the ANOVA table below: (round answers to 3 decimal places)

SS df MS F p-value
Between
Within

In: Statistics and Probability

Task #1 Writing a Copy Constructor 1.Copy the files Address.java(Code Listing 8.1), Person.java(Code Listing 8.2),Money.java(Code Listing...

Task #1 Writing a Copy Constructor

1.Copy the files Address.java(Code Listing 8.1), Person.java(Code Listing 8.2),Money.java(Code Listing 8.3), MoneyDemo.java(Code Listing 8.4), andCreditCardDemo.java(Code Listing 8.5) from the Student CD or as directed by your instructor. Address.java, Person.java, MoneyDemo.java, and CreditCardDemo.java are complete and will not need to be modified. We will start by modifying Money.java.

2.Overload the constructor. The constructor that you will write will be a copy constructor. It should use the parameter Money object to make a duplicate Moneyobject, by copying the value of each instance variable from the parameter object to the instance variable of the new object.

Task #2 Writing the equals and toString methods

1.Write and document an equals method. The method compares the instance variables of the calling object with instance variables of the parameter object for equality and returns true if the dollars and the cents of the calling object are the same as the dollars and the cents of the parameter object. Otherwise, it returns false.

2.Write and document a toString method. This method will return a String that looks like currency, including the dollar sign. Remember that if you have less than 10 cents, you will need to put a 0 before printing the cents so that it appears correctly with 2 decimal places.

3.Compile, debug, and test by running the MoneyDemo program. You should get the following output:

The current amount is $500.00

Adding $10.02 gives $510.02

Subtracting $10.88 gives $499.14

$10.02 equals $10.02

$10.88 does not equal $10.02

Task #3 Passing and Returning Objects

1.Create theCreditCardclass according to the UML diagram. It should have data fields that include an owner of type Person, a balance of type Money, and a creditLimit of type Money.

2.It should have a constructor that has two parameters, a reference to a Person object to initialize the owner and a reference to a Money object to initialize the creditLimit. The balance can be initialized to a Money object with a value of zero. Remember you are passing in objects (passed by reference), so you are passing the memory address of an object. If you want your CreditCard to have its own creditLimit and balance, you should create a new object of each using the copy constructor in the Moneyclass

3. It should have accessor methods to get the balance and the creditLimit. Since these are Money objects (passed by reference), we don’t want to create a security issue by passing out addresses to components in our CreditCard class, so we must return a new object with the same values. Again, use the copy constructor to create a new object of type Money that can be returned.

4. It should have an accessor method to get the information about the owner, but in the form of a String that can be printed out. This can be done by calling the toString method for the owner (an instance of the Person class).

5. It should have a method that will charge to the CreditCard by adding the amount passed in the parameter to the balance, but only if it will not exceed the creditLimit. If the creditLimit will be exceeded, the amount should not be added, and an error message can be printed to the console.

6. It should have a method that will make a payment on the CreditCard by subtracting the amount passed in the parameter from the balance.

7. Compile, debug, and test it out completely by running the CreditCardDemo program.

8. You should get the output:

Diane Christie, 237J Harvey Hall, Menomonie, WI 54751

Balance: $0.00

Credit Limit: $1000.00

Attempting to charge $200.00

Charge: $200.00 Balance: $200.00

Attempting to charge $10.02

Charge: $10.02 Balance: $210.02

Attempting to pay $25.00

Payment: $25.00 Balance: $185.02

Attempting to charge $990.00

Exceeds credit limit

Balance: $185.02

Code Listing 8.1 (Address.java)

/** This class defines an address using a street,

city, state, and zipcode. */

public class Address

{

// The street number and name

private String street;

// The city in which the address is located

private String city;

// The state in which the address is located

private String state;

// The zip code associated with the city and street

private String zip;

/**

Constructor

@param road Describes the street number and name.

@param town Describes the city.

@param st Describes the state.

@param zipCode Describes the zip code.

*/

public Address(String road, String town, String st, String zipCode)

{

street = road;

city = town;

state = st;

zip = zipCode;

}

/**

The toString method

@return Information about the address.

*/

public String toString()

{

return (street + ", " + city + ", " + state + " " + zip); } }

Code Listing 8.2 (Person.java)

/**

This class defines a person by name and address.

*/ public class Person

{

// The person's last name private String lastName;

// The person's first name private String firstName;

// The person's address private Address home;

/** Constructor

@param last The person's last name.

@param first The person's first name.

@param residence The person's address.

*/

public Person(String last, String first, Address residence)

{ lastName = last;

firstName = first;

home = residence; }

/**

The toString method @return Information about the person.

*/ public String toString()

{

return(firstName + " " + lastName + ", " + home.toString()); } }

Code Listing 8.3 (Money.java)

/** This class represents nonnegative amounts of money. */

public class Money

{

// The number of dollars private long dollars;

// The number of cents private long cents;

/** Constructor

@param amount The amount in decimal format. */

public Money(double amount)

{

if (amount < 0)

{

System.out.println("Error: Negative amounts " + "of money are not allowed.");

System.exit(0);

}

else { long allCents = Math.round(amount * 100); dollars = allCents / 100; cents = allCents % 100; } }

// ADD LINES FOR TASK #1 HERE

// Document and write a copy constructor

/**

The add method @param otherAmount The amount of money to add. @return The sum of the calling Money object and the parameter Money object. */

public Money add(Money otherAmount)

{ Money sum = new Money(0);

sum.cents = this.cents + otherAmount.cents;

long carryDollars = sum.cents / 100;

sum.cents = sum.cents % 100;

sum.dollars = this.dollars + otherAmount.dollars + carryDollars; return sum; }

/** The subtract method @param amount The amount of money to subtract. @return The difference between the calling Money object and the parameter Money object. */

public Money subtract (Money amount)

{ Money difference = new Money(0);

if (this.cents < amount.cents)

{

this.dollars = this.dollars - 1;

this.cents = this.cents + 100;

}

difference.dollars = this.dollars - amount.dollars;

difference.cents = this.cents - amount.cents;

return difference; }

/** The compareTo method

@param amount The amount of money to compare against.

@return -1 if the dollars and the cents of the calling object are less than the dollars and the cents of the parameter object. 0 if the dollars and the cents of the calling object are equal to the dollars and cents of the parameter object. 1 if the dollars and the cents of the calling object are more than the dollars and the cents of the parameter object. */

public int compareTo(Money amount)

{ int value;

if(this.dollars < amount.dollars) value = -1;

else if (this.dollars > amount.dollars) value = 1;

else if (this.cents < amount.cents) value = -1;

else if (this.cents > amount.cents) value = 1;

else value = 0; return value; }

// ADD LINES FOR TASK #2 HERE

// Document and write an equals method

// Document and write a toString method }

Code Listing 8.4 (MoneyDemo.java)

/** This program demonstrates the Money class. */

public class MoneyDemo

{

public static void main(String[] args)

{

// Named constants

final int BEGINNING = 500; // Beginning balance

final Money FIRST_AMOUNT = new Money(10.02);

final Money SECOND_AMOUNT = new Money(10.02);

final Money THIRD_AMOUNT = new Money(10.88);

// Create an instance of the Money class with

// the beginning balance.

Money balance = new Money(BEGINNING);

// Display the current balance. System.out.println("The current amount is " + balance.toString());

// Add the second amount to the balance

// and display the results.

balance = balance.add(SECOND_AMOUNT); System.out.println("Adding " + SECOND_AMOUNT + " gives " + balance.toString());

// Subtract the third amount from the balance

// and display the results.

balance = balance.subtract(THIRD_AMOUNT);

System.out.println("Subtracting " + THIRD_AMOUNT + " gives " + balance.toString());

// Determine if the second amount equals

// the first amount and store the result. boolean equal = SECOND_AMOUNT.equals(FIRST_AMOUNT);

// Display the result.

if(equal)

{

// The first and second amounts are equal.

System.out.println(SECOND_AMOUNT + " equals " + FIRST_AMOUNT);

}

else

{

// The first and second amounts are not equal. System.out.println(SECOND_AMOUNT + " does not equal " + FIRST_AMOUNT); }

// Determine if the third amount equals

// the first amount and store the result.

equal = THIRD_AMOUNT.equals(FIRST_AMOUNT);

// Display the result.

if(equal)

{

// The third and first amounts are equal.

System.out.println(THIRD_AMOUNT + " equals " + FIRST_AMOUNT);

}

else

{

// The third and first amounts are not equal.

System.out.println(THIRD_AMOUNT + " does not equal " + FIRST_AMOUNT); } } }

Code Listing 8.5 (CreditCardDemo.java)

/** This program demonstrates the CreditCard class. */

public class CreditCardDemo

{

public static void main(String[] args) {

// Named constants final Money CREDIT_LIMIT = new Money(1000);

final Money FIRST_AMOUNT = new Money(200);

final Money SECOND_AMOUNT = new Money(10.02);

final Money THIRD_AMOUNT = new Money(25);

final Money FOURTH_AMOUNT = new Money(990);

// Create an instance of the Person class. Person owner = new Person("Christie", "Diane", new Address("237J Harvey Hall", "Menomonie", "WI", "54751"));

// Create an instance of the CreditCard class. CreditCard visa = new CreditCard(owner, CREDIT_LIMIT);

// Display the credit card information.

System.out.println(visa.getPersonals()); System.out.println("Balance: " + visa.getBalance()); System.out.println("Credit Limit: " + visa.getCreditLimit()); System.out.println(); // To print a new line

// Attempt to charge the first amount and

// display the results.

System.out.println("Attempting to charge " + FIRST_AMOUNT);

visa.charge(FIRST_AMOUNT);

System.out.println("Balance: " + visa.getBalance());

System.out.println();

// To print a new line

// Attempt to charge the second amount and

// display the results.

System.out.println("Attempting to charge " + SECOND_AMOUNT);

visa.charge(SECOND_AMOUNT);

System.out.println("Balance: " + visa.getBalance());

System.out.println(); // To print a new line

// Attempt to pay using the third amount and

// display the results.

System.out.println("Attempting to pay " + THIRD_AMOUNT);

visa.payment(THIRD_AMOUNT);

System.out.println("Balance: " + visa.getBalance());

System.out.println();

// To print a new line

// Attempt to charge using the fourth amount and

// display the results.

System.out.println("Attempting to charge " + FOURTH_AMOUNT);

visa.charge(FOURTH_AMOUNT);

System.out.println("Balance: " + visa.getBalance());

} }

In: Computer Science

In 2002 the Supreme Court ruled that schools could require random drug tests of students participating...

In 2002 the Supreme Court ruled that schools could require random drug tests of students participating in competitive after-school activities such as athletics. Does drug testing reduce use of illegal drugs? A study compared two similar high schools in Oregon. Wahtonka High School tested athletes at random, and Warrenton High School did not. In a confidential survey, 7 of 135 athletes at Wahtonka and 27 of 141 athletes at Warrenton said they were using drugs. Regard these athletes as SRSs from the populations of athletes at similar schools with and without drug testing. Do the data give good reason to think that drug use among athletes is lower in schools that test for drugs? Let Group 1 be the schools that test for drugs Let Group 2 be the schools that do not test for drugs

(b) What is the...

...test statistic?  (Use 2 decimal places)
...p-value?  (Use 4 decimal places)


(c) What is your decision?

Reject the null because the p-value is less than α.

Fail to reject the null because the p-value is less than α.   

Reject the null because the p-value is greater than α.

Fail to reject the null because the p-value is greater than α.

In: Statistics and Probability